Gold Card / Super Gold Card ROM patching...

Nagging hardware related question? Post here!
User avatar
Pr0f
QL Wafer Drive
Posts: 1298
Joined: Thu Oct 12, 2017 9:54 am

Gold Card / Super Gold Card ROM patching...

Post by Pr0f »

Not sure if this has been asked before, but my search didn't come up with anything specific, so here goes.

The Gold Card and Super Gold Card, copy the current ROM image in the lower 48K and then 'modify or patch' it for use with these cards. Does anyone have any more detailed notes on exactly which areas of the ROM are patched, and how the GC/SGC deals with the many different ROM versions out there, where the patched routines may for instance move location within the ROM?


User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Gold Card / Super Gold Card ROM patching...

Post by tofro »

The best information on that can be had from the SMSQ/E sources - SMSQ/E does pretty much the same thing on a GC/SGC.

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Pr0f
QL Wafer Drive
Posts: 1298
Joined: Thu Oct 12, 2017 9:54 am

Re: Gold Card / Super Gold Card ROM patching...

Post by Pr0f »

I have those downloaded, will have to have a peek at them.

I am guessing that the GC/SGC still respect the trap and vector addresses from the ROM's, otherwise things like the I2C on the Minerva wouldn't work.


User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Gold Card / Super Gold Card ROM patching...

Post by tofro »

Pr0f wrote:I have those downloaded, will have to have a peek at them.

I am guessing that the GC/SGC still respect the trap and vector addresses from the ROM's, otherwise things like the I2C on the Minerva wouldn't work.
No, they obviously can't - They replace the complete ROM with RAM and use their own interrupt service routines - I think Minerva I2C has received special care in SMSQ/E, though.

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Pr0f
QL Wafer Drive
Posts: 1298
Joined: Thu Oct 12, 2017 9:54 am

Re: Gold Card / Super Gold Card ROM patching...

Post by Pr0f »

Strictly speaking the ROM is copied to the RAM and occupies the same address space it would have done in a standard QL, so the vectors could all still be valid...


Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Gold Card / Super Gold Card ROM patching...

Post by Derek_Stewart »

Hi,
Pr0f wrote:Strictly speaking the ROM is copied to the RAM and occupies the same address space it would have done in a standard QL, so the vectors could all still be valid...
So if you are correct, to get SMSQ/E working on a BBQL with ram expansion, the copy to ram should disabled.

Somehow I think it is not tgat simple.


Regards,

Derek
User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: Gold Card / Super Gold Card ROM patching...

Post by tofro »

Pr0f wrote:Strictly speaking the ROM is copied to the RAM and occupies the same address space it would have done in a standard QL, so the vectors could all still be valid...
Well, directly after the copy the vectors still point to the same addresses in copied code as in ROM - But we don't want a 100% copy - as soon as you start to patch, this might simply no longer be possible, because routines have to be moved for lack of space etc.

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Pr0f
QL Wafer Drive
Posts: 1298
Joined: Thu Oct 12, 2017 9:54 am

Re: Gold Card / Super Gold Card ROM patching...

Post by Pr0f »

Derek_Stewart wrote:Hi,
Pr0f wrote:Strictly speaking the ROM is copied to the RAM and occupies the same address space it would have done in a standard QL, so the vectors could all still be valid...
So if you are correct, to get SMSQ/E working on a BBQL with ram expansion, the copy to ram should disabled.

Somehow I think it is not tgat simple.
Derek - no offence, but the question in the original post was regarding the original QL ROM based OS - I made no mention of SMSQ in my initial post. It's perfectly possible to run QDOS on a GC or SGC I believe. I realise that running SMSQ requires quite a bit more work - but that wasn't my question - sorry.


User avatar
Pr0f
QL Wafer Drive
Posts: 1298
Joined: Thu Oct 12, 2017 9:54 am

Re: Gold Card / Super Gold Card ROM patching...

Post by Pr0f »

tofro wrote:
Pr0f wrote:Strictly speaking the ROM is copied to the RAM and occupies the same address space it would have done in a standard QL, so the vectors could all still be valid...
Well, directly after the copy the vectors still point to the same addresses in copied code as in ROM - But we don't want a 100% copy - as soon as you start to patch, this might simply no longer be possible, because routines have to be moved for lack of space etc.

Tobias
Exactly - and it's what modifications take place that I am interested in.


User avatar
Dave
SandySuperQDave
Posts: 2765
Joined: Sat Jan 22, 2011 6:52 am
Location: Austin, TX
Contact:

Re: Gold Card / Super Gold Card ROM patching...

Post by Dave »

Can't you just make an image of the edited ROM, then compare it against the original? A lot of stuff has to align up still, so it's only going to be simple substitutions of specific locations/vectors etc?


Post Reply