<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 12 Nov 2004 09:52:41 +0000
From   : Richard_Talbot-Watkins@...
Subject: Re: SRAM

Andrew W wrote on 11/11/2004 16:37:33:

> So I assume Exile would prior to this somehow test 'sockets' 0-D(?) to
> see where the SRAM was located?

Yeah, it probably does something a bit like:

SEI         \ disable interrupts to stop the OS from changing the ROM bank
LDX #15     \ start at bank 15
.loop
STX &FE30   \ enable bank X
LDY &8000   \ load Y with ?&8000
INC &8000   \ increment ?&8000
INY         \ increment Y
CPY &8000   \ and compare it with the memory we tried to increment
BEQ foundram      \ if equal, we have found SRAM
DEX
BPL loop    \ try next bank

.notfoundram
\ if we got here, there is no SRAM

.foundram
\ if we got here, we have the SRAM bank in X, and it is still paged in

Maybe it does something a little more clever to notice 8k/12k RAM as well
(which is of course no good), and if it was written well it might even try
to skip over SRAM with a valid ROM image in it...

> I see, this is what I was beginning to suspect. So it can use virtually
> all of the 32K for the game/screen including much of below PAGE?
> Fascinating stuff :-)

Yeah, one of the first things it does is copies itself to &100 and above.
There is actually executable code over most of the stack area, the vector
table (excluding the IRQ1 vector), the OS/VDU workspace (excluding the jump
table for the BREAK key, and the byte that represents *FX200), the NMI
workspace, and right up to the beginning of the screen at either &4000 or
&6000.  Not a byte wasted for sure!



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
postmaster@...

This footnote also confirms that this email message has been checked
for all known viruses.

**********************************************************************
Sony Computer Entertainment Europe
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>