I'm in the middle of implementing a simple game cart for ZX81 having 32kB RAM, 2 kind of selectable joy (either Kempston or 56780) and 2-16 MB of flash from which it should be possible to load programs at boot.
It works - mostly... The problem is the remaining not working part...
e.g. Sir Clive' s face is perfectly visible, retro snake also works, and even i can play with starfsfx. But there are quite a few games that falls apart on loading but in emulator they work.
JBRacing, Against the elements ... just to name a few.
What I think is that the RUN routine after the loading is not perfect, but I cannot find any info on that. What I do is that I load the .p file's content to $4009, set $4000 to $FF, $4001 to $80, push $0676 to stack and JP SLOW.
Any hint/idea how should it be done?
I check recently the SD81Booster's run-after-load implementation (thanks wilco2009) but that is not really helpful to me so I am open to any hint/link/discussions about this...
On the other hand I'm not sure about my WRX implementation also (or whatever of high res graphics I have...) . I use GAL for creating the /CE of the exRAM. /OE is tied to GND now (nth iteration). exRAM is enabled when the following are all true:
- A14 or A15 is high (CPU addresses $4000-$FFFF)
- /MREQ is low OR /M1 is low OR /RFSH is low
- /RD is low OR /WR is low OR /RFSH is low
It pretty complicated but this way the M1 phase is completely covered (/M1, /RFSH)
Oh, one more important signal: A14 on SRAM. It is
- /M1 AND CPU_A15
So in case of T1 and T2 of M1 phase of the Z80 it is always the lower 16kB accessed, otherwise the Z80's A15 selects. So reading $8000-$FFFF on /M1 phase the $4000-$7FFF area is read back, reading in refresh or any other /MREQ phase the actual $8000-$FFFF area is read (ofc $8000-$BFFF is the same as $C000-$FFFF).
Do I see it properly, this is how the WRX High Res should be implemented on HW level?
I managed to solve most of the programs to load. Ofc there are a few exceptions, like the ones that required char ROM replacements, but basically normal WRX programs work.
Answering the comments/questions:
- The cart has 32kB RAM, it shall work with stock ZX81 or the ones that have internal 16k expansion. The cart disables internal RAM access. You may use it as a 16kB cart, I think.
- 'JP $0676' I'll check that but I'm afraid that is not enough as the ZX81 has to be switched back to SLOW mode. Anyway, I will check it.
Stay tuned, within a couple weeks I will have a better version. Maybe a video also. (I'm about to order the second round of beta PCBs)
It has 32kB RAM. It has a reset button. It has a 56780 or Kempston (selectable by a jumper) joy port. It has a flash IC (supported 2-16MB) with custom selectable content. It has a microSD slot from which you can load programs. Flash and SD can load .p files.
WRX Hi-Res. pseudo high res works.
It is not the final rev, 1117-5.0 is planned to be replaced as it draws too much current (~220mA) and it is pretty hot. It will be replaced a with small, switching PSU board).
- Posts: 4826
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Which switching board/regulator or DC/DC convertor were you thinking of?
Once I have a final, rev3 board, I plan to sell for 35eur + pp. I don't know how to advertise this. I hope there will be some interest.
ZX81 iss 1 (bugged ROM, kludge fix, normal, rebuilt)
TS 1000 iss 3, ZXPand AY and +, ZX8-CCB, ZX-KDLX & ChromaSCART
Tatung 81 + Wespi
TS 1500 & 2000
Spectrum 16k (iss 1 s/n 862)
Spectrum 48ks plus a DIVMMC future and SPECTRA