News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

MODE / Inks resetting?

Started by evolutional, 21:39, 24 September 21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

evolutional

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?

Targhan

RUNning a problem from Basic does that. To prevent this, LOAD it and CALL it instead.
Targhan/Arkos

Arkos Tracker 2.0.1 now released! - Follow the news on Twitter!
Disark - A cross-platform Z80 disassembler/source converter
FDC Tool 1.1 - Read Amsdos files without the system

Imperial Mahjong
Orion Prime

m_dr_m

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.

evolutional

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!

Powered by SMFPacks Menu Editor Mod