News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Joseman

Strange behaviour between cpc464 & cpc6128

Started by Joseman, 23:07, 16 July 17

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joseman

Hi

Today Kukulcan warned me about a bug on my version of 'ninja grannies', it didn't work on a CPC464 with ram expansion and DDI.

I looked to the source code and saw a extrange behaviour on the CPC464.

With my firmware routine, i save the stack pointer direction (#00F7), put it on #C000 to be firmware friendly, do the 'restore highjumpblock' and all the things... at the end i restore the sp to his original position (#00F7)... on the cpc6128 it returns correctly to the #00F7 - Bank 0... BUT!!!! on the CPC464 it returns to the lower rom (#00F7) direction!!!! sending the program to hell!!

It's obvious that the problem is that the lower rom must be disabled, but why on the CPC6128 it works (no returning to the lower rom) and on the CPC464 not? ??? ?

Some Guru Coder to shed some light on this?

Thankyou!!

Nich

Quote from: Joseman on 23:07, 16 July 17
Today Kukulcan warned me about a bug on my version of 'ninja grannies', it didn't work on a CPC464 with ram expansion and DDI.

It's obvious that the problem is that the lower rom must be disabled, but why on the CPC6128 it works (no returning to the lower rom) and on the CPC464 not? ??? ?

Some Guru Coder to shed some light on this?

The CALL to reinitialise the firmware differs between CPC machines. You are using CALL &08BD to reinitialise the firmware in your patch, but this doesn't work on CPC464 and CPC664 machines.

To detect the address to CALL, use the following code in your loader (not the patch!):

LD HL,(&BD38)
RES 7,H
LD (call_init_firmware+1),HL


where call_init_firmware is the address in your patch where the CALL which reinitialises the firmware is located. In other words, you need to modify your patch before you set it up.

Joseman

Quote from: Nich on 14:48, 22 July 17
The CALL to reinitialise the firmware differs between CPC machines. You are using CALL &08BD to reinitialise the firmware in your patch, but this doesn't work on CPC464 and CPC664 machines.

To detect the address to CALL, use the following code in your loader (not the patch!):

LD HL,(&BD38)
RES 7,H
LD (call_init_firmware+1),HL


where call_init_firmware is the address in your patch where the CALL which reinitialises the firmware is located. In other words, you need to modify your patch before you set it up.

Thankyou for the help @Nich!!

The funny thing is that the load of the files is made correctly by the 464 with my routine (apparently the firmware & amsdos seems to work ok), only the lower rom disable thing is preventing  the game to run...

when i have time i will try to disable only the the lower rom, just to try if it works correctly.

BUT, i will implement your code to make 100% compatible!

thanks again!!


Powered by SMFPacks Menu Editor Mod