Author Topic: Converted GX4000 .cpr - The topic (repository link in first post)  (Read 406397 times)

0 Members and 2 Guests are viewing this topic.

Offline Urusergi

  • CPC6128
  • ****
  • Posts: 232
  • Country: es
  • Liked: 469
  • Likes Given: 1541
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  ;)

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.226
  • Country: gb
  • Liked: 1927
  • Likes Given: 644
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.
« Last Edit: 04:05, 15 March 16 by Phantomz »

Offline dthrone

  • CPC6128
  • ****
  • Posts: 204
  • Country: gb
    • SOHDE
  • Liked: 151
  • Likes Given: 211
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  :)



« Last Edit: 11:27, 15 March 16 by dthrone »

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.226
  • Country: gb
  • Liked: 1927
  • Likes Given: 644



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.
« Last Edit: 19:18, 07 January 17 by Phantomz »

Offline dthrone

  • CPC6128
  • ****
  • Posts: 204
  • Country: gb
    • SOHDE
  • Liked: 151
  • Likes Given: 211
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.



« Last Edit: 17:09, 15 March 16 by dthrone »

Offline Urusergi

  • CPC6128
  • ****
  • Posts: 232
  • Country: es
  • Liked: 469
  • Likes Given: 1541
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.

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

Offline dthrone

  • CPC6128
  • ****
  • Posts: 204
  • Country: gb
    • SOHDE
  • Liked: 151
  • Likes Given: 211
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?

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.226
  • Country: gb
  • Liked: 1927
  • Likes Given: 644



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:

Offline dthrone

  • CPC6128
  • ****
  • Posts: 204
  • Country: gb
    • SOHDE
  • Liked: 151
  • Likes Given: 211
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  :)

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.226
  • Country: gb
  • Liked: 1927
  • Likes Given: 644



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.


« Last Edit: 19:19, 07 January 17 by Phantomz »

Offline dthrone

  • CPC6128
  • ****
  • Posts: 204
  • Country: gb
    • SOHDE
  • Liked: 151
  • Likes Given: 211
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.

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.226
  • Country: gb
  • Liked: 1927
  • Likes Given: 644

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?
« Last Edit: 19:20, 07 January 17 by Phantomz »

Offline Urusergi

  • CPC6128
  • ****
  • Posts: 232
  • Country: es
  • Liked: 469
  • Likes Given: 1541
Sorry, 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:
Code: [Select]
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

Offline Urusergi

  • CPC6128
  • ****
  • Posts: 232
  • Country: es
  • Liked: 469
  • Likes Given: 1541
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:

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.

Offline dthrone

  • CPC6128
  • ****
  • Posts: 204
  • Country: gb
    • SOHDE
  • Liked: 151
  • Likes Given: 211
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  :)

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.226
  • Country: gb
  • Liked: 1927
  • Likes Given: 644
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

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.226
  • Country: gb
  • Liked: 1927
  • Likes Given: 644
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.
« Last Edit: 19:21, 07 January 17 by Phantomz »

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.226
  • Country: gb
  • Liked: 1927
  • Likes Given: 644
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.  ;)
« Last Edit: 19:21, 07 January 17 by Phantomz »

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.316
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1187
  • Likes Given: 83
Awesome, thanksies ;)

Sent from my A3-A30 using Tapatalk
« Last Edit: 18:22, 18 March 16 by CraigsBar »
IRC:  #Retro4All on Freenode

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.226
  • Country: gb
  • Liked: 1927
  • Likes Given: 644
Here is another puzzle game " Super Tetris:)
« Last Edit: 19:22, 07 January 17 by Phantomz »

Offline xenon

  • CPC664
  • ***
  • Posts: 52
  • Country: es
    • VEB Xenon
  • Liked: 15
  • Likes Given: 96
Thanks again for your conversions :)

Will the full pack be updated? :D

Regards,

Salva


Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.226
  • Country: gb
  • Liked: 1927
  • Likes Given: 644
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.  ???

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.316
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1187
  • Likes Given: 83
Here is another puzzle game " Super Tetris:)


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

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.226
  • Country: gb
  • Liked: 1927
  • Likes Given: 644

Another great one, thanks mate :)

You're Welcome.  :)

Offline remax

  • 6128 Plus
  • ******
  • Posts: 1.130
  • Country: fr
  • Liked: 415
  • Likes Given: 459
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