25 Commits

Author SHA1 Message Date
Philip Smart
c0c5201534 Bug fixes 2026-06-04 16:29:21 +01:00
Philip Smart
5a14318018 Added missing MZ80B files 2026-06-04 12:06:04 +01:00
Philip Smart
f5670c66d0 MZ-1E30 SASI HDD interface, IPL Reset, debug shell hooks, XIP cache fix
New MZ-1E30 SASI hard disk interface for MZ-2500:
- SASI.c/h: reusable SASI bus controller with full state machine
  (BUS_FREE/SELECTION/COMMAND/DATA_IN/DATA_OUT/STATUS/MESSAGE phases)
- MZ1E30.c/h: board-level wrapper with ROM (ports A8/A9) and SASI (A4/A5)
- Sector-level I/O via ESP32 SD card IPC (no PSRAM allocation for 22MB images)
- Inline response polling in sasiReadStatus for Z80 tight-loop compatibility
- Supports READ(6), WRITE(6), SEEK(6), TEST_UNIT_READY, REQUEST_SENSE, INQUIRY
- 4 target disks, 256-byte blocks, SuperTurboZ Enhanced ROM compatible

Debug shell hook system:
- Generic driver-registered trace hooks (fdctrace, mmutrace, qdtrace)
- All machine drivers register machineName; FDC/QD interfaces register trace hooks
- Extensible for new machines without modifying dbgsh.c

Web GUI: IPL Reset button, MZ-1E30 interface with noLoadAddr ROM config

Config parser: always store ROM file in romConfig even with romAddrCount=0
(interfaces with port-based ROM access need the filename without loadaddr)

WD1773 XIP cache coherency fix: DMA disk loads bypass XIP cache, leaving
stale calloc zeros. xip_cache_clean_all + invalidate_all after DMA ensures
Core 1 sees fresh PSRAM data. Fixes intermittent ExtDSK misdetection as D88.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-04 12:04:58 +01:00
Philip Smart
756d54a22c MZ-2500 virtual mode, D88 native format, driver callback refactoring
Virtual mode interrupt support:
- Gate array needs physical M1 bus cycles (fetchPhysicalMem in fetchOpcode)
  for internal clocks (8253 timer, interrupt controller) to advance
- MZ2500 driver overrides cpu->_Z80.reti and cpu->_Z80.fetch with custom
  handlers (MZ2500_retiHandler, MZ2500_fetchByte) — zero core changes
- Physical RETI bus sequence (ED 4D plant + M1 fetch) clears IC in_service
- One-shot INT suppression prevents premature interrupts during I=0x02 init
- Physical RETI cleanup at suppression boundary clears accumulated in_service

D88 native format handler (WD1773.c):
- Sparse/contiguous auto-detection for track mapping strategy
- Physical (C,H) → D88 index mapping built from sector headers (Balloon Fight)
- Index-based identity mapping for standard/H-swapped disks (Galaga, CP/M)
- d88PhysMap array with proper allocation/cleanup

Driver architecture cleanup:
- All MZ-2500 interrupt logic in MZ2500.c driver (not Z80CPU.c core)
- Custom RETI/fetchByte set directly on cpu->_Z80 function pointers
- Core Z80CPU.c unchanged from pre-MZ-2500 state for other machines
- Debug shell: psync command, intcount with /INT pin diagnostic
- MZ8BFI: MAX_DISK_DRIVES reduced to 2 for PSRAM heap

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-03 12:19:00 +01:00
Philip Smart
6758c2892c Updates to fix Z80 write cycles, MZ1500 persona and other addtions including updates to ESP32 web interface and fixing NCM reconnection should the host not connect on first try 2026-05-27 10:58:37 +01:00
Philip Smart
cc040f7f49 Celstite test programs 2026-05-17 11:43:12 +01:00
Philip Smart
4196e58420 MZ-1500 persona, expansion boards, Celestite LAN, QDF format, virtual mode
New drivers:
- MZ-1500 persona driver with MZ-700/MZ-1500 mode switch, PCG bank switching,
  PSG stubs, physical I/O forwarding for virtual mode
- MZ-2200 persona driver (based on MZ-2000)
- MZ-1R23/MZ-1R24 Kanji ROM / Dictionary ROM board (B8h/B9h IDM)
- MZ-1R37 640KB EMM (ACh/ADh, no auto-increment, 20-bit addressing)
- PIO-3034 320KB EMM (configurable base, 19-bit, auto-increment)
- Celestite LAN/Memory composite board:
  - W5100 TCP/IP via ESP32 WiFi (connect, send, recv, ping)
  - Integrated MZ-1R12 32/64KB CMOS RAM with SD persistence
  - Integrated MZ-1R37 640KB EMM with SD persistence
  - UFM flash, unlock state machine, interrupt controller

Celestite networking (Phase 2):
- New IPC commands: NET_CFG, NET_SOCK, NET_SEND, NET_RECV, NET_PING
- ESP32 BSD socket handlers with non-blocking connect and recv
- Shared volatile struct for cross-core results (bypasses responseQueue)
- Inline IDM read check for socket status and recv data
- Z80 test programs: celestite_test.asm (17 tests), celestite_stress.asm (loop)

MZ-1500 virtual mode fixes:
- I/O writes forwarded to physical hardware (PSG, bank switching, PCG)
- E000-E7FF always stays physical during bank switching
- PCG bank (F000-FFFF) properly remapped to PHYSICAL when open

QDF format support:
- Japanese standard QD format auto-detected on load (81936 bytes)
- Hunt pattern changed to 00+16 (mark+sync) for inter-block gap handling
- Sync stripping handles long preambles (9+ bytes)
- MZQDTool updated with -j flag and format conversion

Other:
- Debug shell load command: len parameter now optional
- FSPI filename field: memcpy instead of strncpy for binary data
- Interface availability expanded across MZ-700/1500/80A/2000/2200
- Web GUI: param hints for Celestite, updated driver interface lists

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-17 11:34:55 +01:00
Philip Smart
55c6fdd3da Updated schematics, PCB, smalll web server changes 2026-05-15 10:08:21 +01:00
Philip Smart
5bbb3bcf5f MZ2000 persona, Z80 April 2026, bug fixes and z80 timing fixes 2026-05-13 20:55:04 +01:00
Philip Smart
516426a8c7 Bug fixes 2026-04-30 13:58:33 +01:00
Philip Smart
0ae9764e77 Optimisations for debug and hotpaths 2026-04-30 10:00:15 +01:00
Philip Smart
32ac09c92e Sharp MZ80A updates and performance tuning 2026-04-30 08:58:26 +01:00
Philip Smart
6753eec367 Updates for the MZ80A version and ESP32 NCM 2026-04-18 22:32:41 +01:00
Philip Smart
8ef9652935 Updates to MZQD Tool for Sharp MZ Series QD image creation 2026-04-01 17:20:52 +01:00
Philip Smart
c0b9a6a5af Added MZQD tool to create QD files for Sharp MZ Series 2026-04-01 16:42:12 +01:00
Philip Smart
113b836c91 Added JLCPCB Positions and Production files 2026-04-01 16:40:21 +01:00
Philip Smart
2b89372f29 Added JLCPCB bom list 2026-04-01 16:36:34 +01:00
Philip Smart
d4176afb30 Added default SD card 2026-03-29 22:05:52 +01:00
Philip Smart
77da26ca50 Added datasheets 2026-03-29 11:57:06 +01:00
Philip Smart
881364b9fe Fixed a Partition boot issue due to XIP Cache 2026-03-28 18:53:44 +00:00
Philip Smart
30466c912c Reset all version files to v2.0 for public release baseline
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-27 23:55:18 +00:00
Philip Smart
125b907506 Tidying up warnings 2026-03-25 19:58:49 +00:00
Philip Smart
b6c7e8bc42 Bootloader Stack increased to 8K 2026-03-25 18:15:25 +00:00
Philip Smart
24b71488c6 First push into git 2026-03-25 14:25:54 +00:00
Philip Smart
21375f667b Initial git setup 2026-03-24 22:22:37 +00:00