Giter VIP home page Giter VIP logo

zxinterfacez's Introduction

ZX Interface Z

Build status

Interface Z - an expansion card for the ZX Spectrum which supports

  • VGA Output
  • USB devices such as joysticks, flash drives and keyboards
  • Networking and Wifi
  • Micro SD Card
  • YM2149 audio

Project status: Currently under development and only suitable for people that want to help out with development and testing.

Current version is ALPHA1.

See FEATURES for more details on the ZX Interface Z features. (click here for PDF document)

Overview

Block diagram of Interface Z diagram

Models supported

The following models are supported:

  • ZX Spectrum 16K
  • ZX Spectrum 48K
  • ZX Spectrum 128K (gray)
  • ZX Spectrum 128K (toastrack)
  • ZX Spectrum +2A
  • ZX Spectrum +3

Hardware

This section refers to the schematics and printed circuit board design of the Interface Z. The digital design on the FPGA is described in the [FPGA design] section.

Licensing

Schematics and PCB are released under CC-BY-SA 2.0. This applies to all versions of the schematics and PCBs.

Version

Current hardware version is 2.4. This is a pre-production version, not intented for general public availability.

FPGA design

The FPGA design is written primarly in VHDL, targeting an Altera/Intel Cyclone IV device (EP4CE6E22C8N). There is no flash to store bitfile contents - the FPGA bitfile is loaded by the ESP32 MCU and stored inside the ESP32 flash.

Licensing

Unless otherwise stated in each HDL or design support file, the FPGA design files are released under BSD 3-Clause License.

Firmware

This section applies to the firmware running on the ESP32 MCU.

Licensing

Unless otherwise stated in each source support file, the firmware source files are released under GPL version 3 license.

Software

This section applies to the software intended to run on a separate computer (such as a PC, Mac or other).

Licensing

Unless otherwise stated in each source support file, the software source files are released under GPL version 3 license.

Developing

See DEVELOPING for development information regarding ZX Interface Z (click here for PDF document)

See USER GUIDE for build instructions.

More information

zxinterfacez's People

Contributors

alvieboy avatar rickard-von-essen avatar dependabot[bot] avatar nihirash avatar

Stargazers

Matthias Waldhauer avatar Martin Lukasek avatar pollito avatar Alexander Kovalenko avatar barbiani avatar Pierpaolo Pierozzi avatar  avatar Denjhang Liu avatar Gary Stringer avatar  avatar Enthusiast Guy avatar Sicco Pier van Gosliga avatar  avatar  avatar BogDan Vatra avatar  avatar Andrey Smirnov avatar  avatar Nikolay Zapolnov avatar TurBoss avatar D. Rimron-Soutter avatar Tailzer avatar Augusto Campos avatar  avatar Dave Minter avatar  avatar Oleg avatar  avatar Pedro Pinto avatar  avatar Vasco Lameiras avatar Rui Ribeiro avatar

Watchers

 avatar  avatar  avatar Martin Boqvist avatar BogDan Vatra avatar David Anderson avatar  avatar barbiani avatar Rui Ribeiro avatar  avatar  avatar  avatar  avatar

zxinterfacez's Issues

Hardware: MP2233DJ is marked "Obsolete"

MP2233DJ (the IC used for the power supplies) is now marked as Obsolete by LCSC. The part is still available on Mouser, but stock is relatively low, and price a bit high (we need two per board).
Alternatives should be found in antecipation of the IC leaving market.

romCS line for +2A/+3

+2A/+3 spectrums have an extra ROMCS line present on the connector A15. This pin is also used for video out on other models. Allow this line to be driven low by the FPGA.

Support saving screenshots to SD card

Support grabbing the screen content, either with the USR menu (omitting the menu) or using a custom key on a USB connected device. Save the screen to a predefined path either on the SD Card or a USB mass storage device.

Hardware: Support generation of CPU clock

Add support for generating the CPU clock. This is useful to run spectrums without ULA. As per schematics, the CK pin is connected to the base of a transistor driver.

Use a buffer/inverter with OE control to drive the CK line with 5V logic.
This may require freeing up a few FPGA pins. Suggestion is:

  • Disconnect USB_SUSPEND and tie the PHY suspend to 0. We don't use it at the moment.
  • Redirect USB_FLT into an unused CLK input pin. Synthesis tests show this is possible.

Feature: Web Interface

Design the main structure of the web interface.
The main web interface will be stored inside a "spiffs" filesystem. A preliminary version can be found inside "esp32/spiffs".
The interface shall have multiple tabs, one for each major area. All pages shall be static, dynamic content will be fetched using AJAX.

Hardware: place block of LEDs 5mm apart

The current rightmost LED area has the LEDs quite close to each other, which makes it difficult to have openings on the case.

Separate the LEDs by 5mm. This will ensure proper clearance.

Host mode build problem - esp_system.h missing

$ make -C host
make: Entering directory '/home/rickardvonessen/src/ZXInterfaceZ/esp32/host'
cc -O2 -g -Wall -Wextra -DIDF_VER=\"0.1\" -I/home/linuxbrew/.linuxbrew/Cellar/glib/2.62.4/include/glib-2.0 -I/home/linuxbrew/.linuxbrew/Cellar/glib/2.62.4/lib/glib-2.0/include -I/home/linuxbrew/.linuxbrew/opt/gettext/include -I/home/linuxbrew/.linuxbrew/Cellar/pcre/8.43/include -I./FreeRTOS/Source//include -I./FreeRTOS/Source//portable/GCC/Linux -I./FreeRTOS/ -Iesplayer -I. -I/home/alvieboy/Temp/esp-idf//components/esp_system/include/ -I/home/alvieboy/Temp/esp-idf//components/soc/soc/esp32/include/ -I/home/alvieboy/Temp/esp-idf//components/esp_common/include/ -I/home/alvieboy/Temp/esp-idf//components/spi_flash/include/ -I/home/alvieboy/Temp/esp-idf//components/soc/include/ -I/home/alvieboy/Temp/esp-idf//components/esp_event/include/ -I/home/alvieboy/Temp/esp-idf//components/esp_wifi/include/ -I/home/alvieboy/Temp/esp-idf//components/esp_timer/include/ -I/home/alvieboy/Temp/esp-idf//components/fatfs/vfs/ -I/home/alvieboy/Temp/esp-idf//components/fatfs/src/ -I/home/alvieboy/Temp/esp-idf//components/wear_levelling/include/ -I/home/alvieboy/Temp/esp-idf//components/esp_netif/include/ -I/home/alvieboy/Temp/esp-idf//components/esp_eth/include/ -I/home/alvieboy/Temp/esp-idf//components/spiffs/include/ -I/home/alvieboy/Temp/esp-idf//components/mbedtls/mbedtls/include -I/home/alvieboy/Temp/esp-idf//components/app_update/include/ -I/home/alvieboy/Temp/esp-idf//components/bootloader_support/include/ -I/home/alvieboy/Temp/esp-idf//components/esp_http_client/include/ -I/home/alvieboy/Temp/esp-idf//components/esp_http_server/include/ -I/home/alvieboy/Temp/esp-idf//components/esp_http_server/src/port/esp32 -I/home/alvieboy/Temp/esp-idf//components/esp_http_server/src/util -I/home/alvieboy/Temp/esp-idf//components/nghttp/port/include/ -I/home/alvieboy/Temp/esp-idf//components/nvs_flash/include/ -I/home/alvieboy/Temp/esp-idf//components/tcpip_adapter/include/ -I/home/alvieboy/Temp/esp-idf//components/driver/include/ -I/usr/include/cjson    -c -o ../main/aplist_resource.o ../main/aplist_resource.c
In file included from ../main/aplist_resource.c:2:0:
../main/fpga.h:5:24: fatal error: esp_system.h: No such file or directory
compilation terminated.
<builtin>: recipe for target '../main/aplist_resource.o' failed
make: *** [../main/aplist_resource.o] Error 1
make: Leaving directory '/home/rickardvonessen/src/ZXInterfaceZ/esp32/host'

Also while building the file esp32/sdkconfig gets modified. Should this file be committed to the repository?

Hardware: move ZX Spectrum connector forward

The current placement for the ZX Spectrum connector is good if no case is used. If we place the board in a case, it's difficult to fully insert the interface into the ZX Spectrum.

Move the connector 3mm outwards. This should allow for the interface to completely insert into the expansion connector.

YM2149: sound should be silenced upon NMI

YM2149 sound should be silenced upon NMI, otherwise it will make awful, unwanted noise. Configured volumes should be restored at NMI exit (but not for SNA load).

esp32: make flash fails with ./filesize: Command not found

$ make flash                                                                                                              
fatal: No names found, cannot describe anything.
Toolchain path: /home/rickard/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: esp-2020r2
Compiler version: 8.2.0
Python requirements from /home/rickard/src/esp-idf/requirements.txt are satisfied.

App "esp32_interfacez" version: d416435-dirty
GEN fpga.bin
make: ./filesize: Command not found
make: *** [Makefile:16: fpga.bin] Error 127

I can't find any ref other ref to filesize.

SDCARD: Pullup on IO2

The current pullup on IO2/SDMMC_D0 interferes with serial bootloader and makes it impossible to program the ESP32 via serial USB port.

This pullup should be connected using MOSFET as we already do for SDMMC_D2/IO12.

Feature: HDMI output

It would be great to have audio/video output via HDMI. It's a more future prof connection than VGA + Analog audio.

POSIX: Detailed design and implementation of POSIX file interface

Detailed design and implementation of POSIX file interface.

  • Support commands for POSIX file operations in spectcmd.c
  • Support RST$08 interface for Spectrum interfacing.

This will need a file handle interface to separate ESP32 handles from Spectrum handles. To be understood if we also need some sort of driver infrastructure.

API should implement equivalent methods for the following POSIX functions:

  • getcwd
  • chdir
  • open
  • close
  • read
  • write
  • opendir
  • readdir
  • closedir
  • ioctl
  • fcntl

The directory handles are still TBD, because we need to map those to the internal ESP32 directory handles as well.
The DEVELOPMENT document shall be updated to include detailed information about the command API.
The SPECTRUMAPI document shall be updated to include the RST$08 API.

VGA/Audio adaptor hardware issues

A few issues have been spotted with the included VGA/Audio adapter in revision 2.2.

  • The audio jack is too close to the VGA connector, making it impossible to connect both at same time except with a very narrow male jack.
  • The ESP32 causes voltage drops on the 3.3V line whenever it transmits, and this causes the buffers to output lower than expected voltages, leading to audible noise on the audio output.

/WAIT de-assertion on CLK-less Spectrums

Some spectrums (notably some early toastrack) do not route the CLK signal to the expansion connector, however we currently rely on CLK for de-assertion of the WAIT signal for proper synchronization.
To be investigated. Might need a DPLL in order to generate a fake clock signal we can use.

ZX Spectrum 128K compatibility issues

As I understand(I might be wrong) - this device uses ports #3, #5, #7 etc.

Main issue of this solution that it makes device totally incompatible with ZX Spectrum 128K and later(+2/+2A/+3/128K compatible computers) - cause IORQULA block only #FE port and doesn't block AY's ports, memory management unit, disk and printer ports(on +3).

Main issue that original ZX SPECTRUM machines uses bit mask decoding of port instead full address decoding.

You should use ports that didn't cross with audio ports, memory ports, +3 FDC and internal cetronics port of +2A/+3.

Information about bit masks present here: https://www.worldofspectrum.org/faq/reference/ports.htm

Thank you for your work!

I wish you can make it best!

LineBuffer.h and linebuffer.h conflict on case insensitive filesystems.

My usual linux laptop just dead so I've cloned repo from macOS - there was collision between both files(same issue will get all windows users and some linux users).

I've solved it by creating case sensitive volume but not everyone will make it(btw, some linux users using case insensitive mode of ext4 file system).

I recommend rename LineBuffer.h to LineBuffer.hpp that will solve this issue at all.

Angular WebUI: enhancements

  • Logo
  • Custom theme and branding
  • Wifi configuration
  • Fix unit test
  • Fix icons
  • Strip unused Icons and bundle icons and fonts
  • Add some simple e2e tests
  • Serial log in web UI

/req/wifi doesn't report assigned DHCP IP

Currenlty the API /req/wifi returns

{
  "mode" : "ap", 
  "sta": {
   	"ssid": "ssid",
        "hostname": "interfacez", 
        "ip": "dhcp", 
        "netmask": "255.255.255.0", 
        "gw": "127.0.0.1", 
  },
  "ap" : {
   	"ssid": "ssid",
        "hostname": "interfacez",
        "channel": 1,
        "ip" : "127.0.0.1",
        "netmask" : "255.255.255.0",
        "gw" : "127.0.0.1"
  }
}

Where ip: dhcp but I think it would be better to add "dhcp": true, "ip": "<currently leased IP>".

VGA: Add small overlay support

Add small overlay support for suitable video modes. This overlay should be a framebuffer with some sort of alpha channel.

The current video RAM capture memory is 8192 bytes. 6912 bytes are needed for the Spectrum framebuffer, leaving 1280 bytes available for the overlay.
Using RGB332 (8bpp) we can have either:

  • 160x8
  • 128x10
  • 106x12

For alpha support. it should eventually be fixed or a color with alpha shall be defined for the background only.

The framebuffer shall only be accessible by ESP32, not spectrum.

roms/videomode.asm missing

Building roms fails with:

cd roms; make
make: *** No rule to make target 'videomode.asm', needed by 'INTZ.ROM'.  Stop.

esp32: make flash is missing resource.bin target

In the esp32/Makefile target flash depends on resource.bin.

$ make resource.bin
Toolchain path: /home/rickardvonessen/.espressif/tools/xtensa-esp32-elf/esp-2020r2-8.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: esp-2020r2
Compiler version: 8.2.0
Python requirements from /home/rickardvonessen/src/esp-idf/requirements.txt are satisfied.
make: *** No rule to make target 'resource.bin'.  Stop

Loose microUSB connector

The current surface-mount microUSB can easily become loose from the board. Convert it into a through-hole (mixed) part for robustness,

Feature: Kempston joystick interfaces

Support 2x DSUB 9-pin Kempston (Port 31) joystick interfaces. It is possible to support 2 fire buttons and to have a small amount
of power available on pins 5 and 7 for joysticks that require it (EG: Megadrive pads).

nWAIT line

Currently nWAIT line is not driven, but we need to use it for simultaneous RAM access by the ESP32 and spectrum. A driver for this line should be added and connected to FPGA.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.