News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Prohibition Game 128K version not working on Amstrad CPC 6128 plus

Started by 40Crisis, 13:10, 18 March 17

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

40Crisis

Prohibition 128K version doesn't load on Amstrad CPC 6128 Plus.

I found out two reasons for that:

1) like many infogrames games it seems that the loader uses some rom calls incompatible with CPC Plus roms.
It's because AMSDOS rom has different location for these calls.
If you downgrade cpc plus roms with CPC 6128 roms, it seems to load fine.
You can find downgrade roms on this page:
http://www.cpcwiki.eu/index.php/Plus_System_Cartridge

2) Game uses im2 interrupt mode which behaves differently on CPC+ compared on CPC.
When calculating interrupt address for IM2 using I register and value on bus,
high byte and low byte read from memory table are inverted on CPC+ compared to CPC.


Using unprotected 128K version like two mag or nich ones, I was able to address this problem.

For two mag version:

search hex pattern 21,EC,00,7C,32,00,3E,7D in disk image and replace it with 21,EC,00,7D,32,00,3E,7C


For Nich version:

search hex pattern search 21,EC,00,7C,32,CA,3E,7D in disk image and replace it with 21,EC,00,7D,32,CA,3E,7C



You can try the two mag patch on original 128K disk dump but I'm not sure it works. Even though with downgraded roms it loads and execute ok in Winape and Arnold,
you are killed at first enemy shot. I think this behaviour is related to protection check failure.


Someone could try it on a real CPC plus ?

arnoldemu

Quote from: 40Crisis on 13:10, 18 March 17
Prohibition 128K version doesn't load on Amstrad CPC 6128 Plus.

I found out two reasons for that:

1) like many infogrames games it seems that the loader uses some rom calls incompatible with CPC Plus roms.
It's because AMSDOS rom has different location for these calls.
If you downgrade cpc plus roms with CPC 6128 roms, it seems to load fine.
You can find downgrade roms on this page:
http://www.cpcwiki.eu/index.php/Plus_System_Cartridge

2) Game uses im2 interrupt mode which behaves differently on CPC+ compared on CPC.
When calculating interrupt address for IM2 using I register and value on bus,
high byte and low byte read from memory table are inverted on CPC+ compared to CPC.


Using unprotected 128K version like two mag or nich ones, I was able to address this problem.

For two mag version:

search hex pattern 21,EC,00,7C,32,00,3E,7D in disk image and replace it with 21,EC,00,7D,32,00,3E,7C


For Nich version:

search hex pattern search 21,EC,00,7C,32,CA,3E,7D in disk image and replace it with 21,EC,00,7D,32,CA,3E,7C
nice find.

I don't think this patch is all good.

To make it work on both correctly, then the IM table needs to be filled with the same value and it needs to have 257 bytes.


ld hl,&a000
ld e,l
ld d,h
ld (hl),&a1
ld bc,257-1
ldir
im 2
ld a,&a0
ld i,a

;; table has a1x257


&a1a1: ;; int handler

EDIT: Game hangs on arnold wip version for me when using Plus.

This will work with plus and cpc.

On CPC, the value on the bus is mostly ff (but if there is extra hardware it could be different - e.g. playcity) so IM2 will read &a000+&ff and &a000+&100

On Plus, the value always has bit 0 cleared, but all other bits can be any value.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

40Crisis

Quote from: arnoldemu on 13:57, 18 March 17
I don't think this patch is all good.

To make it work on both correctly, then the IM table needs to be filled with the same value and it needs to have 257 bytes.


ld hl,&a000
ld e,l
ld d,h
ld (hl),&a1
ld bc,257-1
ldir
im 2
ld a,&a0
ld i,a

;; table has a1x257


&a1a1: ;; int handler

EDIT: Game hangs on arnold wip version for me when using Plus.

This will work with plus and cpc.

On CPC, the value on the bus is mostly ff (but if there is extra hardware it could be different - e.g. playcity) so IM2 will read &a000+&ff and &a000+&100

On Plus, the value always has bit 0 cleared, but all other bits can be any value.

I already know the proper way to program IM2 to be both compatible with CPC and CPC+.
But it's too much work to patch Prohibition to do so, that's why the patch will only work with a CPC+ as it's very simple.

Which version did you try to load in Arnold ?
If it's the original one, you need to downgrade roms otherwise it won't load.



arnoldemu

Quote from: 40Crisis on 14:24, 18 March 17
I already know the proper way to program IM2 to be both compatible with CPC and CPC+.
Sorry I didn't mean to offend.

Quote from: 40Crisis on 14:24, 18 March 17
But it's too much work to patch Prohibition to do so, that's why the patch will only work with a CPC+ as it's very simple.

Which version did you try to load in Arnold ?
If it's the original one, you need to downgrade roms otherwise it won't load.
It was Nich's crack version just as you suggested :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Powered by SMFPacks Menu Editor Mod