Hey - I'm pretty new to CPC dev so I apologize if this is a n00b question :D
I'm writing a tape loader bootstrapper that has the following parts:
1. BASIC, set mode, set inks, RUN the next file...
2. Assembly loader / bootstrapper that loads in the screen (via CASREAD)
3. ... then loads the main asm program (again, via CASREAD) and jumps to it
The problem I'm hitting seems to be that as soon as the asm loader is loaded and executed (eg: RUN completes), the CPC resets the mode and the inks all go back to those the ROM initializes. This is causing the loading screen to be loaded in MODE 1 with the default palette - not what I was hoping for - especially as the asm loader doesn't touch the gate array.
Does anyone know what the cause for this behaviour is? Is there something I can do to prevent this?
RUNning a problem from Basic does that. To prevent this, LOAD it and CALL it instead.
Don't apologise, that's heartwarming to see beginners on CPC.
Yep, the firmware does several inits (including de-activating ROMs!) when running a binary program, to give the program a clean state.
Quote from: Targhan on 22:43, 24 September 21
RUNning a problem from Basic does that. To prevent this, LOAD it and CALL it instead.
Ah perfect, thank you. A bit of wrangling to find a MEMORY location that was suitable and it worked, thanks!