Page 2 of 3

Re: Issue 3 16k internal RAM mod

Posted: Fri Jul 21, 2017 12:11 pm
by 1024MAK
Of course, the next photo you post will be a photo showing it working :P - no pressure, much :lol:

Mark

Re: Issue 3 16k internal RAM mod

Posted: Fri Jul 21, 2017 3:49 pm
by Lardo Boffin
That may take a while with so many pads to desolder, tracks to cut and wires to solder! :oops:

Re: Issue 3 16k internal RAM mod

Posted: Sat Jul 22, 2017 12:33 am
by Lardo Boffin
Not quite finished as I ran out of time but

IC4 socket pads desoldered
Tracks cut and continuity tested
One wire attached (it looked easier to put it under the socket)
Socket soldered in

IMG_6439.JPG
(2.79 MiB) Downloaded 524 times

Only 5 wires to go and it is fingers crossed time!

Re: Issue 3 16k internal RAM mod

Posted: Sun Jul 23, 2017 12:01 am
by Lardo Boffin
Underside finished-
IMG_6463.JPG
(2.76 MiB) Downloaded 505 times

Top side finished-

IMG_6462.JPG
(2.58 MiB) Downloaded 505 times

And running The Gauntlet!

IMG_6460.JPG
(4.11 MiB) Downloaded 505 times

I think that took about 2 hours in total. :?

Re: Issue 3 16k internal RAM mod

Posted: Sun Jul 23, 2017 10:03 am
by Lardo Boffin
Does anyone know how the zeddy determines that it has 16k? I understand that the ROM does a check when reset etc. but how does it actually find out?

I guess where the question is leading is whether it is possible to mod the hardware such that a switch or similar could be fitted to change between 1k and 16k mode by fooling the ROM? Mostly in case there are programs that only run in 1k or you wish to test that a program will run on 1k in actual hardware.

Just a curious thought :)

Re: Issue 3 16k internal RAM mod

Posted: Sun Jul 23, 2017 10:09 am
by sirmorris
Start reading at the label 'RAM-CHECK' ;)

Re: Issue 3 16k internal RAM mod

Posted: Sun Jul 23, 2017 1:08 pm
by Moggy
Excellent work there,Lardo nice one. :D

Re: Issue 3 16k internal RAM mod

Posted: Sun Jul 23, 2017 11:07 pm
by Lardo Boffin
sirmorris wrote: Sun Jul 23, 2017 10:09 am Start reading at the label 'RAM-CHECK' ;)
Thanks SirMorris - that's certainly more interesting than the book on C# I had planned to read tonight!

The test is pretty simple then - if for whatever reason the 16k RAM 'stopped working' after the first K then presumably it would think it was a 1k computer and behave as such.

So the next question is for the hardware gurus - is it possible to cause this in hardware, i.e. allow only the first 1024 memory addresses to be written to based on a mechanical switch or similar?

Or if RAMTOP was altered by poking it would this have the effect of fooling the zeddy until the next reset? Although I strongly suspect there would be more to it than this!

Lardo

Re: Issue 3 16k internal RAM mod

Posted: Mon Jul 24, 2017 10:29 am
by 1024MAK
It's alive :lol:

Well done Lardo 8-) :D

Funny, I posted about the RAM check in this post not long ago...

Yes, it is possible in hardware. If this was RAM controlled by your own address decoding circuitry, you just disable the RAM at all addresses other than the wanted area (and with the ZX81, of course being careful to allow a shadow/echo for the screen display). But if using the ULA's address decoding, that is not so easy. The alternative (that I need to think about some more) will be posted later maybe :|

For type in programs you can indeed POKE RAMTOP with a new value, then NEW, then type in your program.

For your own programs, you can do the same. In chapter 28 of the ZX81 BASIC Programming book (the one Sinclair supplied with ZX81s) it details which system variables are saved and hence loaded from tape. RAMTOP is NOT listed as being saved. So if you POKE it, and do a NEW before loading the program, if the program is just BASIC, or it uses RAMTOP to see the memory size, it should work okay.
This will not work if the program changes RAMTOP or ignores RAMTOP. Or even just assumes that everything above 1k (2k) of RAM is an echo :(

Mark

Re: Issue 3 16k internal RAM mod

Posted: Wed Jul 26, 2017 3:11 am
by gammaray
Why not set the ROM to check for up to 32K? What problems arise?
0000 START OUT (+FD),A
LD BC,+7FFFBFFF
JP 03CB,RAM-CHECK
03CB RAM-CHECK LD H,B
LD L,C
LD A,+3F
03CF RAM-FILL LD (HL), +02
DEC HL
CP H
JR NZ,03CF,RAM-FILL
03D5 RAM-READ AND A
SBC HL,BC
ADD HL,BC
INC HL
JR NC,03E2,SET-TOP
DEC (HL)
JR Z,03E2,SET-TOP
DEC (HL)
JR Z,03D5,RAM-READ
03E2 SET-TOP LD (RAMTOP),HL