ZX128 software for SAM COUPE

This is my new SAM COUPE utility SNAPER for loading modified snapshots in format SNA(128kB) or original SNA(48kB). SNAPER is writed in SAM BASIC and use only short machine code for copy data from sam ram to 1MB external ram. Is possible run 48kB snapshots in slow and fast speed(turbo 6MHz) and create/use new palette for all 16 ZX colours.

More info about this project:

SAM COUPE is 8 bit computer compatible with ZX Spectrum 48. Use internal memory 256 or 512 kB and ram paging in low 32kB and high 32kB of adress space Z80 CPU. Practically is impossible port any software from ZX Spectrum 128 to SAM COUPE because ZX128 use only memory paging in last 16kB (in area 49152-65535). For SAM COUPE exist original 1MB external memory upgrade with possibility connect in high 32kB of adress space external ram and use paging on two new ports 128 and 129. Port 128 set 16kB pages on adress 32768-49151 and port 129 on adress 49152-65535.

ZX Spectrum 128 contain ram with size 128kB and is divided to 8 pages with size 16kB. Layout of adress space 64kB:
00000-16383 = ZX rom
16384-32767 = ram page 5 (used as videoram 1)
32768-49151 = ram page 2
49152-65535 = paging area with possibility set ram pages 0-7. Page 7 contain second videoram.
Ram paging is on port 32765 on bits D0-D2. Next bits on this port are used for rom and videoram switching and possibility disable paging (switch to ZX48kB mode).

Part of original ZX128 software can be easy modified for run on SAM COUPE with 1MB external memory. I use yet only SNA48/128 files loading in this way :

1) set on SAM COUPE graphic mode 1 (ZX mode)
2) set ZX color palette
3) load to internal SAM ram ZX rom with 48 basic (my zx rom contain only small patch for possibility run zx snapshots)
4) load ram 16384-32767 from zx snapshot to SAM ram
5) load ram 32768-49151 from zx snapshot to external ram page 2
6) load all ZX128 pages from snapshot to identical number of external ram pages
After full memory loading set all Z80 registers, disable SAM rom and connect from adress 0 SAM ram with ZX rom and active write protect in low 16kB. My patch in ZX rom connect external ram in high 32kB of adress space, set on adress 32768-49151 external ram page 2 and in area 49152-65535 correct page for snapshot. Patch at end set correct stack pointer, and jump to starting adress. It's all.

Original SNA files for ZX128 is impossible load and run. It's need some patches before use. Way for modify SNA(128kB) files for SAM COUPE :

- As first you need ZX emulator for PC with new zx rom. ZX128 rom 32kB must be replaced with new 32kB file (join 2x 16kB original ZX48 rom). And why ? We need on ZX emulator ignore ZX rom paging - sam soupe can emulate only one 16kB zx rom without paging. After create new rom file start emulator and set ZX128 mode. ZX will start to 48 basic with enable 128kB ram paging
- load any snapshot or game from TAP file and goto debugger ideally at start adress of game
- find in game code all instructions for memory paging (use port 32765) and replace port number to 16513 (= port 129 in low adress of port and 16384 on high adress). ZX128 and +2A/+3 models use uncomplette port addressing and this adress will backward compatible with SAM COUPE and with ZX models.
- also value for writing to paging port can be rewrited to 0-7 only (reset all high bits)
- as last patch must be rewrited ports for music chip AY-3-8912 to new adress. Original AY ports #FFFD and #BFFD access on SAM coupe to MIDI ports and slow down CPU. After rewrite this ports to adress #FF01 and #BF01 will software backward compatible with AY chip on ZX and on SAM COUPE will CPU run at original speed.
- run snapshhot in ZX emulator, and save new modified game as SNA(128kB) snapshot for direct loading on SAM COUPE.

Warning ! ZX Spectum run at 3.5MHz but Z80 code in external 1MB ram will run always at full speed 6.0 MHz (yes, it's faster than code in SAM COUPE internal ram at 4.8 MHz). This way enable only run software using zx videoram 1 in page 5 and will work ram mirroring of ram page 2 and area 32768-49151. But videoram switching is impossible. Some ZX software don't use it.












ROBOCOP 3 (128kB)

SUBACUATIC - with new ZX palette

SGT HELMUT ZERO - with new ZX palette

EXTREME - with new ZX palette

EXTREME - with original palette

CYBERNOID 2 - with new ZX palette

EXOLON - with new ZX palette

EXOLON - with grey palette



SNAPER v0.3 (games 1)  (12.10.2013)
SNAPER v0.3 (games 2)  (12.10.2013)

next disc images with games will released soon...