- Memory Mapping Question [SOLVED]
- 07 Jan 2015 09:44:09 am
- Last edited by MateoConLechuga on 07 Jan 2015 06:23:11 pm; edited 5 times in total
Okay, so bear with me here, I probably going to make some silly mistake that I should know not to do:
So I am mapping ram page 5 to $C000-$FFFF. Here's the code I've got going now at the beginning:
But it just crashes on start. Any help is much appreciated; I'm just so used to having as much ram as I need, but now I need more.
Code:
And when I exit, this.
Code:
Notes:
saveSP ($8904) and BackupPage ($88FA) are stored in saveSScreen.
Around 600 bytes stored at plotsscreen
These are all accessed.
This is actually working just fine; I am silly and was trying to access an external variable while pages were swapped. Wow. Totally blanked that the VAT is also stored there.
So I am mapping ram page 5 to $C000-$FFFF. Here's the code I've got going now at the beginning:
But it just crashes on start. Any help is much appreciated; I'm just so used to having as much ram as I need, but now I need more.
Code:
di
ld (saveSP),sp
ld sp,statVars+400
in a,($05)
ld (BackupPage),a
ld a,$05
out ($05),a
ei
And when I exit, this.
Code:
di
ld a,(BackupPage)
out ($05),a
ld sp,(saveSP)
ei
Notes:
saveSP ($8904) and BackupPage ($88FA) are stored in saveSScreen.
Around 600 bytes stored at plotsscreen
These are all accessed.
This is actually working just fine; I am silly and was trying to access an external variable while pages were swapped. Wow. Totally blanked that the VAT is also stored there.