Purely theoretical ROM swap

For experts to discuss very technical stuff and newbies to ask why the Spectrum they bought off ebay doesn't work.
Post Reply
User avatar
spider
Dynamite Dan
Posts: 1099
Joined: Wed May 01, 2019 10:59 am
Location: Derby, UK
Contact:

Purely theoretical ROM swap

Post by spider »

As title, consider it a "question from the curious" , I'm half sure its been tried or thought of.

In theory what would happen to a 16/48 Spectrum if you replaced the ROM with a (the official last one) ZX81 ROM ?

And vice-versa , a Spectrum ROM into the ZX81 ?

Would either way get very far ? I realise probably not however putting any physical limitations aside (different socket size?) would the ZX81 get as far as to the vague 'ram check' or even the copyright message ? I don't see the '81 doing very well with the speccy ROM however.

:)

I would try but I don't have access to a working 81 emulator and can't download/use on on the machine I'm writing this post on.


I did wonder about that 'much updated' 81 ROM that iirc was 16K instead of 8K but I've not looked at its documentation to see how much it differs from standard.
flange
Drutt
Posts: 49
Joined: Tue Dec 12, 2023 5:27 pm

Re: Purely theoretical ROM swap

Post by flange »

I couldn't say what would be the result re the Spectrum, but I have converted a few ZX81's into ZX80's ( as I didn't fancy paying half a grand for a "doesn't power up not tested no returns" piece of drek) This involved fitting a few resistors to various pins on the CPU to stop the NMI from running and burning a suitable EPROM with ZX80 code, so anythings possible I suppose.
flange
Drutt
Posts: 49
Joined: Tue Dec 12, 2023 5:27 pm

Re: Purely theoretical ROM swap

Post by flange »

A link and a video that may be of interest.

https://www.sinclairzxworld.com/viewtopic.php?f=5&t=465


AndyC
Dynamite Dan
Posts: 1410
Joined: Mon Nov 13, 2017 5:12 am

Re: Purely theoretical ROM swap

Post by AndyC »

I mean, you could probably find out exactly by just supplying a zx81 ROM image into a spectrum emulator. It won't be very useful regardless, because the zx81 ROM will have absolutely no idea how to drive the screen or poll the keyboard, it'll just fill RAM up with garbage and sit around waiting.
Ralf
Rick Dangerous
Posts: 2292
Joined: Mon Nov 13, 2017 11:59 am
Location: Poland

Re: Purely theoretical ROM swap

Post by Ralf »

Correct me if I'm wrong but ZX81 has a totally different graphic mode than Zx Spectrum. It doesn't have screen memory at 16384. It doesn't have ULA chip which automatically converts the screen memory to the display. If I rememver correctly it uses Z80 CPU to generate picture which take about 80% of CPU time.

So if you put Z81 ROM into Zx Spectrum then you'll see nothing or maybe just some trash at the screen. The processor will be reading and executing instructions from the ROM, one after another, but it won't result in anything meaningful at the screen.
User avatar
balford
Drutt
Posts: 35
Joined: Mon Nov 13, 2017 2:01 pm
Location: Ireland

Re: Purely theoretical ROM swap

Post by balford »

I've done this through emulation in the past (curiosity, boredom, take your pic...)

A Spectrum running the ZX81 ROM will run the familiar Spectrum 'reset' sequence, including the appearing and disappearing red lines bit. This is because the initial RAM test code in the '81 ROM is identical to that in the Spectrum. It'll then hang, though, as the display routine in the ZX81 ROM will head off into uninitialised RAM, which will contain mostly FF's after power up. This equates to the RST 38 instruction, which brings us right back to the display routine which sends us back into RAM repeatedly. Result - white border and black screen.

The other way around (Spectrum ROM on a ZX81) is thoroughtly uninteresting as the machine just hangs at a white screen (as there's no code in the Spectrum ROM to run the ZX81's CPU driven video output). The ROM code enters an infinite loop as the NMI generator sends it into the Spectrum's buggy routine which ends up continually resetting the maching by JP'ing to 0.
Fixing ZX Spectrums in the 21st Century
https://github.com/brendanalford/zx-diagnostics
User avatar
Sokurah
Manic Miner
Posts: 288
Joined: Tue Nov 14, 2017 10:38 am
Contact:

Re: Purely theoretical ROM swap

Post by Sokurah »

Once upon a time, decades ago, I thought the ZIP format was amazing "you could compress data"?! (it may have been .LZ or LHA - who can remember after this long)

My thought was ... "why wouldn't you just keep compressing your data until it didn't take up any space at all"?

Well, that was before I was wise and knew how things worked ... and that's what I feel after reading the initial question in this thread :lol:
Website: Tardis Remakes / Mostly remakes of Arcade and ZX Spectrum games.
My games for the Spectrum: Dingo, The Speccies, The Speccies 2, Vallation & Sqij.
Twitter: Sokurah
User avatar
spider
Dynamite Dan
Posts: 1099
Joined: Wed May 01, 2019 10:59 am
Location: Derby, UK
Contact:

Re: Purely theoretical ROM swap

Post by spider »

Thanks all.

I knew it had been tried (or highly likely it had)

Was not able to use an emulator yesterday and yes I could of waited I suppose but thought I'd ask ;) that's the only reason why I did not try myself.

Its good it "got so far" in some respects I suppose. I knew it would not fully work.
Post Reply