News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

gx4000 and a possible method for converting 128k games to run from cart

Started by arnoldemu, 19:37, 10 January 15

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

arnoldemu

I have been doing more testing on GX4000 and I converted a program which is in progress (it's one of my own) which used 128K.
I was using the extra ram for storing sprites, scrolling tiles and the scroll map.

To make it work on the GX4000, I put the code/data into cartridge pages.

7FC4 went to page 1, 7FC5 went to page 2 and 7FC6 went to page 3.

I then used RMR2 and set the lower rom to exist at &4000-&7fff. The same location that the extra ram would normally page into.

Now instead of


LD BC,&7FC4
out (c),c
[code]

My code became:

[code]
ld bc,&7f00+%1010100+page
out (c),c


To use this you need to activate the lower rom.

So


ld bc,&7f00+%1010100+page
out (c),c
ld bc,&7f00+%1000100
out (c),c


Select the page before enabling lower rom so you can also run code from &0000-&3fff ;)

The only problem I could see was careful managing of lower rom enable/disable. So if you were also changing modes you have to remember if lower rom is active or not.

But in this way, a 128k game can be more easily reworked for GX4000 and run from 64KB and use cart.

Of course anything that writes to the ram can't run from ROM. so you can't for example have a music tracker running from rom. It's runtime variables need to be in ram.



My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

McKlain


Powered by SMFPacks Menu Editor Mod