News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_remax

Converted GX4000 .cpr - The topic (repository link in first post)

Started by remax, 22:14, 04 May 15

Previous topic - Next topic

0 Members and 5 Guests are viewing this topic.

Urusergi

Quote from: Phantomz on 22:07, 14 March 16
Thanks for that. I just had a quick look, I've now found the down cursor, so I would think that the up cursor should be close by, the down cursor = 02 @ 8523 in winape

Tomorrow I take a look at this  ;)

Phantomz

Quote from: Urusergi on 01:05, 15 March 16
Tomorrow I take a look at this  ;)

Cheers  ;D

Pretty sure it's these 3A DE 99 FE 02 D8 AF @ 8516  ;) Just unsure what to change them too at the moment.  ;)

Had a quick mess about, but a bit short on time at the moment, when I changed it to 3A DE 01 FE 02 D8 AC I got 1 just need it to be 6.

dthrone

Quote from: Phantomz on 03:02, 15 March 16
Cheers  ;D

Pretty sure it's these 3A DE 99 FE 02 D8 AF @ 8516  ;) Just unsure what to change them too at the moment.  ;)

Had a quick mess about, but a bit short on time at the moment, when I changed it to 3A DE 01 FE 02 D8 AC I got 1 just need it to be 6.




The "0" key number (up cursor) for feeding to the firmware keypress routine is set with the XOR A at &851C (byte AF).  Ideally an extra byte needs to be squeezed in there so you can have LD A,&xx but that will mess things up  :(




ok, I've got a patch.  Replace the code at &851C with "00 CD 70 A0".  Insert the following code at &A070 "3E 00 CD 1E BB C9".  You can swap the 00 at &A071 with whatever key number you want to replace the up cursor with.  Just tested and works ok  :)




Phantomz

Quote from: dthrone on 10:16, 15 March 16



The "0" key number (up cursor) for feeding to the firmware keypress routine is set with the XOR A at &851C (byte AF).  Ideally an extra byte needs to be squeezed in there so you can have LD A,&xx but that will mess things up  :(




ok, I've got a patch.  Replace the code at &851C with "00 CD 70 A0".  Insert the following code at &A070 "3E 00 CD 1E BB C9".  You can swap the 00 at &A071 with whatever key number you want to replace the up cursor with.  Just tested and works ok  :)

Nice work  :D , I've just tested it in winape and it works  ;)

I can find 3A DE 99 FE 02 D8 AF CD 1E BB and change to 3A DE 99 FE 02 D8 00 CD 70 A0 in the cart no problem.

But I'm having trouble finding where to put 3E 30 CD 1E BB C9 in the cart  :doh:

I see you have infinite health, what did you change to get this?


I've changed the buttons around incase we can't get this sorted, and have only got 1 button to change items.

I've moved Pause to the Console Pause Button, Quit game to Joypad 2 Button 1.

Scroll Scenery with Joypad 2 Dpad Left and Right.

You now change items with Joypad 1 Button 2.

dthrone

Quote from: Phantomz on 15:17, 15 March 16
Nice work  :D , I've just tested it in winape and it works  ;)

I can find 3A DE 99 FE 02 D8 AF CD 1E BB and change to 3A DE 99 FE 02 D8 00 CD 70 A0 in the cart no problem.

But I'm having trouble finding where to put 3E 30 CD 1E BB C9 in the cart  :doh:

I see you have infinite health, what did you change to get this?


I've changed the buttons around incase we can't get this sorted, and have only got 1 button to change items.

I've moved Pause to the Console Pause Button, Quit game to Joypad 2 Button 1.

Scroll Scenery with Joypad 2 Dpad Left and Right.

You now change items with Joypad 1 Button 2.




Which page no. and address are they in the cart?  I'll let you know the best spot for extra code based on that.


oops, that poke I just wrote is no good as the game won't start, it has to be entered after :doh:


Looks like there's an existing trainer on cpc-power you could use?  Otherwise I can write a patch.




Urusergi

Quote from: dthrone on 15:57, 15 March 16Which page no. and address are they in the cart?  I'll let you know the best spot for extra code based on that.
oops, that poke I just wrote is no good as the game won't start, it has to be entered after :doh:

Looks like there's an existing trainer on cpc-power you could use?  Otherwise I can write a patch.

It's more complicated  ;D

First you have to change this:
&CD, &16, &85
&CD, &20, &85

And after:
&3A,&DE,&99,&FE,&02,&D8,&AF,&CD,&1E,&BB,&20,&27,&3E,&02,&CD,&1E,&BB,&C8,&3E,&02,&CD,&1E,&BB,&20,
&F9,&3A,&DF,&99,&3D,&FE,&FF,&20,&02,&3E,&05,&32,&DF,&99,&4F,&06,&00,&21,&E0,&99,&09,&7E,&B7,&28,
&E8,&18,&1D,&AF,&CD,&1E,&BB,&20,&FA,&3A,&DF,&99,&3C,&FE,&06,&20,&01,&AF,&32,&DF,&99,&4F,&06,&00,
&21,&E0,&99,&09,&7E,&B7,&28,&E9

By this:
&32,&DF,&99,&4F,&06,&00,&21,&E0,&99,&C9,&3A,&DE,&99,&FE,&02,&D8,&3E,&30,&CD,&1E,&BB,&20,&21,&3E,
&31,&CD,&1E,&BB,&C8,&3E,&31,&CD,&1E,&BB,&20,&F9,&3A,&DF,&99,&3D,&FE,&FF,&20,&02,&3E,&05,&CD,&16,
&85,&09,&7E,&B7,&28,&EE,&18,&18,&3E,&30,&CD,&1E,&BB,&20,&F9,&3A,&DF,&99,&3C,&FE,&06,&20,&01,&AF,
&CD,&16,&85,&09,&7E,&B7,&28,&EF

dthrone

Quote from: Urusergi on 16:35, 15 March 16
It's more complicated  ;D

First you have to change this:
&CD, &16, &85
&CD, &20, &85

And after:
&3A,&DE,&99,&FE,&02,&D8,&AF,&CD,&1E,&BB,&20,&27,&3E,&02,&CD,&1E,&BB,&C8,&3E,&02,&CD,&1E,&BB,&20,
&F9,&3A,&DF,&99,&3D,&FE,&FF,&20,&02,&3E,&05,&32,&DF,&99,&4F,&06,&00,&21,&E0,&99,&09,&7E,&B7,&28,
&E8,&18,&1D,&AF,&CD,&1E,&BB,&20,&FA,&3A,&DF,&99,&3C,&FE,&06,&20,&01,&AF,&32,&DF,&99,&4F,&06,&00,
&21,&E0,&99,&09,&7E,&B7,&28,&E9

By this:
&32,&DF,&99,&4F,&06,&00,&21,&E0,&99,&C9,&3A,&DE,&99,&FE,&02,&D8,&3E,&30,&CD,&1E,&BB,&20,&21,&3E,
&31,&CD,&1E,&BB,&C8,&3E,&31,&CD,&1E,&BB,&20,&F9,&3A,&DF,&99,&3D,&FE,&FF,&20,&02,&3E,&05,&CD,&16,
&85,&09,&7E,&B7,&28,&EE,&18,&18,&3E,&30,&CD,&1E,&BB,&20,&F9,&3A,&DF,&99,&3C,&FE,&06,&20,&01,&AF,
&CD,&16,&85,&09,&7E,&B7,&28,&EF




Sorry, I can't read hex  :P


What are you trying to do, what is more complicated and why?

Phantomz

Quote from: dthrone on 16:45, 15 March 16



Sorry, I can't read hex  :P


What are you trying to do, what is more complicated and why?

The HEX is for me  ;) ;D

I'll see what I can do in abit  ;) It doesn't help that the disk I used is different to the one used in the snap, will need to make another cpr first, the first disk I tried gave me in game corruption.

no idea why they have made the up cursor a pain in the butt, no other controls gave me any trouble, well apart from the two buttons for quit, but I sorted that out.

Can't we just do a simple change to get 5 or 6 for Joypad 2 or G or F for Joypad 2 buttons?

I've got close, got 7 instead of 6 with 3A DE 01 AB 02 D8 AA = 7 and got H instead of G with 3A DE 01 FE 02 D8 AA = H

Why does the up cursor need to be such a pain  :doh: :laugh:

dthrone

Quote from: Phantomz on 17:06, 15 March 16
The HEX is for me  ;) ;D

I'll see what I can do in abit  ;) It doesn't help that the disk I used is different to the one used in the snap, will need to make another cpr first, the first disk I tried gave me in game corruption.

no idea why they have made the up cursor a pain in the butt, no other controls gave me any trouble, well apart from the two buttons for quit, but I sorted that out.

Can't we just do a simple change to get 5 or 6 for Joypad 2 or G or F for Joypad 2 buttons?

I've got close, got 7 instead of 6 with 3A DE 01 AB 02 D8 AA = 7 and got H instead of G with 3A DE 01 FE 02 D8 AA = H

Why does the up cursor need to be such a pain  :doh: :laugh:




ok, I've found the string, it's at 019C in block 3.  Which .cpr are you happy with apart from the up cursor bit?


I can patch it by hand directly in the .cpr file and recompile the .cpr manually.


Sorry, I've not looked at the conversion software nor am I aware of how you are going about the remappings  :(   This really is a very simple few byte patch though I promise  :)

Phantomz

Quote from: dthrone on 17:47, 15 March 16



ok, I've found the string, it's at 019C in block 3.  Which .cpr are you happy with apart from the up cursor bit?


I can patch it by hand directly in the .cpr file and recompile the .cpr manually.


Sorry, I've not looked at the conversion software nor am I aware of how you are going about the remappings  :(   This really is a very simple few byte patch though I promise  :)

I think I've got it sorted out now, it should work ok, I've used @Urusergi work  ;)

It just needs play testing as I can't find stuff and can't test with your snap as now loading from cpr.



dthrone

Quote from: Phantomz on 17:53, 15 March 16
I think I've got it sorted out now, it should work ok, I've used @Urusergi work  ;)

It just needs play testing as I can't find stuff and can't test with your snap as now loading from cpr.


I've just made the changes to the disk incase you want to write a poke or trainer, it's below.  ;)

Oh great, I guess there's more than one way to skin a cat  :)

Thanks for taking some on this, I'll certainly be playing it on my GX and I hope other people give it a try too  :D

I'll let you know if I encounter any problems.

Phantomz

Quote from: dthrone on 20:07, 15 March 16

Oh great, I guess there's more than one way to skin a cat  :)

Thanks for taking some on this, I'll certainly be playing it on my GX and I hope other people give it a try too  :D

I'll let you know if I encounter any problems.

You're welcome  :D I can't believe the trouble that cursor up gave, no idea why they made that key the way they did, very odd.  ::)

Thanks goes to @Urusergi too  ;)

Did you say you could do a poke, so we could have a cart with infinite energy too or isn't it possible?

Urusergi

Quote from: dthrone on 16:45, 15 March 16Sorry, I can't read hex  :P


What are you trying to do, what is more complicated and why?

:-[ Sorry! I quoted incorrectly, the message was for Phantomz.
We need 2 bytes for LD A,0 instead XOR A and the idea was to create a subroutine with this piece of code which is repeated twice:
LD (&99DF),A
    LD C,A
    LD B,&00
    LD HL,&99E0


Originally it occupies 9 bytes * 2 = 18 Bytes

with a subroutine: 9 Bytes + 1 Byte (RET) + 6 Bytes (CALL * 2) = 16 Bytes  ;D

Urusergi

Quote from: Phantomz on 17:06, 15 March 16no idea why they have made the up cursor a pain in the butt, no other controls gave me any trouble, well apart from the two buttons for quit, but I sorted that out.

Can't we just do a simple change to get 5 or 6 for Joypad 2 or G or F for Joypad 2 buttons?

I've got close, got 7 instead of 6 with 3A DE 01 AB 02 D8 AA = 7 and got H instead of G with 3A DE 01 FE 02 D8 AA = H

Why does the up cursor need to be such a pain  :doh: :laugh:

Simple! It's an optimization, XOR A and LD A,0 are equivalent, but LD A,0 (scancode 0 = cursor UP) is one byte more expensive than XOR A, then we have a problem if we want to change it to a different key.

dthrone

Thanks Urusergi, I didn't have a disassembler available when I read it so it didn't make a lot of sense  :P

I'm surprised the up cursor thing hasn't come up before for games that test the keys using firmware bb18, xor a would almost always be used over ld a,&00.

Yes, I can do a .cpr with an optional poke, I'll use one of the remaining spare buttons to turn it on/off in-game, I think that will be easiest  :)

Phantomz

Quote from: Urusergi on 23:14, 15 March 16
Simple! It's an optimization, XOR A and LD A,0 are equivalent, but LD A,0 (scancode 0 = cursor UP) is one byte more expensive than XOR A, then we have a problem if we want to change it to a different key.

I know it's optimization, just thought it was odd as they didn't do the same with the left and right cursor.  ;D

Phantomz

I've just converted " Croco Magneto "

Use Joypad 1 for Menu, Button 1 and 2 for options 1 or 2, UP for option 3, DOWN for option 4.

Quit game with Console Pause Button.

I haven't had time to try and make the game default to Joystick, you need to select joy with option 3 ( UP ) before you begin.

Phantomz

I've done another game, @CraigsBar asked for it ages ago, but I couldn't find the keys to change back then, anyway, I've figured it out now.  ;D

The game is " Totems:)

You can now use Joypad 1 up and down and button 1 for the menu.

I've made the game default to Joypad Button 1 to Rotate, Down to Drop, Joypad 1 Button 2 to Pause, Console Button to Quit.

You can redefine the controls if you want to change them.  ;)

I don't know if entering your score will be a problem, I haven't got the time to play the game and check yet ( that's if I can even get on the score board ).

I've you play in winape and get a score that is high enough for the score table, save a snap and I'll try and sort it out.  ;)

CraigsBar

Awesome, thanksies ;)

Sent from my A3-A30 using Tapatalk
IRC:  #Retro4All on Freenode

Phantomz

Here is another puzzle game " Super Tetris:)

xenon

Thanks again for your conversions :)

Will the full pack be updated? :D

Regards,

Salva


Phantomz

Quote from: xenon on 09:40, 21 March 16
Thanks again for your conversions :)

Will the full pack be updated? :D

Regards,

Salva

You're Welcome  :)

I'm sure @remax  will do a new update soon, I haven't even had time to upload the last few games I've done to the wiki page at the moment.  ???

CraigsBar

Quote from: Phantomz on 18:24, 19 March 16
Here is another puzzle game " Super Tetris:)


Another great one, thanks mate :)
IRC:  #Retro4All on Freenode


remax

Quote from: Phantomz on 15:29, 21 March 16
You're Welcome  :)

I'm sure @remax  will do a new update soon, I haven't even had time to upload the last few games I've done to the wiki page at the moment.  ???


I'll try to do it this evening or tomorrow
Brain Radioactivity

Powered by SMFPacks Menu Editor Mod