Flash and Joy - WIP

Discussions about Sinclair ZX80 and ZX81 Hardware
dikdom
Posts: 16
Joined: Sat Aug 12, 2023 12:10 am

Flash and Joy - WIP

Post by dikdom »

Hello,

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?

Thanks,
d
Without some crucial components: RAM, ROM, Flash chip and one of the GAL is also missing. And patched as rev1 is just a v0.1
Without some crucial components: RAM, ROM, Flash chip and one of the GAL is also missing. And patched as rev1 is just a v0.1
User avatar
mrtinb
Posts: 1950
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Flash and Joy - WIP

Post by mrtinb »

It's a little uncertain whether your hardware requires a ZX81 which already have 32k of RAM (which are few), or your cartridge provides the 32k RAM needed for the software.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
dr beep
Posts: 2205
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: Flash and Joy - WIP

Post by dr beep »

I think jp $676 would be enough after loading
dikdom
Posts: 16
Joined: Sat Aug 12, 2023 12:10 am

Re: Flash and Joy - WIP

Post by dikdom »

Thanks for the replies!

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)
dikdom
Posts: 16
Joined: Sat Aug 12, 2023 12:10 am

Re: Flash and Joy - WIP

Post by dikdom »

So, here it is, the rev2 board.
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).
IMG_20230921_003720.jpg
Question?
User avatar
1024MAK
Posts: 5197
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: Flash and Joy - WIP

Post by 1024MAK »

Looking good 8-)

Which switching board/regulator or DC/DC convertor were you thinking of?

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer being good this year.
dikdom
Posts: 16
Joined: Sat Aug 12, 2023 12:10 am

Re: Flash and Joy - WIP

Post by dikdom »

The one with having the XC1314G controller IC. Small, efficient enough. I need to try out, here lies one on my desk, just have time to it.

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.
User avatar
Paul
Posts: 1546
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Flash and Joy - WIP

Post by Paul »

dikdom wrote: Sat Sep 23, 2023 11:45 am I hope there will be some interest.
From which country will you be sending?
In theory, there is no difference between theory and practice. But, in practice, there is.
Lardo Boffin
Posts: 2203
Joined: Sat Nov 26, 2016 2:42 am

Re: Flash and Joy - WIP

Post by Lardo Boffin »

Will you post to the UK? Certainly looks interesting!
ZX80
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
dikdom
Posts: 16
Joined: Sat Aug 12, 2023 12:10 am

Re: Flash and Joy - WIP

Post by dikdom »

Paul wrote: Sat Sep 23, 2023 2:46 pm From which country will you be sending?
Hungary / Europe
Post Reply