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

0 Members and 1 Guest are viewing this topic.

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.418
  • Country: es
  • Liked: 584
  • Likes Given: 485
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1275 on: 14:07, 10 February 16 »
I'll try, think I've made a disk following your instructions, it's here if you want to check it, appears to work still.  ;)

Nop, is bad. you don't have patch the .dsk with the  hex editor :P

I mean search with the hex editor C1 d9 c9 And change to c3 00 40 :)

Except this all is o.k. I know it, because now the crack works, but not the game :) .

Change it an try :) . I go to write the next part.

"This subrutine is always descompresed, so we can patch it with hex editor :)

We go to put the program in &4000 so search it in hex editor and patch with a JP &4000 ->c3 00 40. "
« Last Edit: 14:10, 10 February 16 by dragon »

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.169
  • Country: gb
  • Liked: 1732
  • Likes Given: 552
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1276 on: 14:43, 10 February 16 »
Nop, is bad. you don't have patch the .dsk with the  hex editor :P

I mean search with the hex editor C1 d9 c9 And change to c3 00 40 :)

I'm a bit confused about changing  C1 d9 c9, I didn't patch the disk with a hex editor.

I search for C1 d9 c9 in the winape hex window and changed to c3 00 40 in there, is that what I did wrong.

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.418
  • Country: es
  • Liked: 584
  • Likes Given: 485
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1277 on: 14:47, 10 February 16 »
I'm a bit confused about changing  C1 d9 c9, I didn't patch the disk with a hex editor.

I search for C1 d9 c9 in the winape hex window and changed to c3 00 40 in there, is that what I did wrong.

Yes the purpuse for search it in winape is you can view what are you doing/change in hex editor. But you need change it in hex editor not in the winape :)

This is useful if the editor  have more that one c1 d9 c9, so you need change it in hex editor and view who changes it in winape :), but is not the case, you  only find one in this game.

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.169
  • Country: gb
  • Liked: 1732
  • Likes Given: 552
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1278 on: 14:53, 10 February 16 »
Yes the purpuse for search it in winape is you can view what are you doing/change in hex editor. But you need change it in hex editor not in the winape :)

This is useful if the editor  have more that one c1 d9 c9, so you need change it in hex editor and view who changes it in winape :), but is not the case, you  only find one in this game.

Cool  :D

I'll get used to it  ;)

I've just loaded up my disk in a hex editor and changed the right " C1 d9 c9 " to " c3 00 40 " and now the game doesn't work, the same as your disk.  :D

I've left the other " C1 d9 c9 " alone as this is from the loader bin and I take it that is the  JP &4000 ->c3 00 40. area where we enter the patch info.

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.418
  • Country: es
  • Liked: 584
  • Likes Given: 485
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1279 on: 14:57, 10 February 16 »
Now, That the loader.bin is mounted we go to the next part.


First thing,why the program load the xor crack but not load the game?.

Because at some point when the game is loading, he  write in the memory direction we use and destroy the program, it jumps to &4000 reads other thing we not put here and crash.

So, we only need the game run 1 time the loader.bin after the xor crack.

In other words, we need undone the patch we made with the hex editor :) .

To make this we go to write under the org  &4000 in assembler code.

To patch gx4000 games is not necesary know all z80 assembler codes but is good have this as reference.  http://www.z80.info/z80oplist.txt

We need know now one instrucion only.

ld  = loader a number in a register of the z80.

The z80 processor have a limited number of register we use two of them. The A (means acumulator)where we put the number we search put in the memory and the hl, when we put the memory localitation number when we search put the number of a.

So, remember where is the original localitation of the c1 d9 c9? In 01b5,01b6,01b7

First we load in the hl register the 01b5

ld hl,&01b5

second we load the original c1  in a register.

ld a,&c1

And now we load the number A in the memory localitation of Hl using ().

ld (hl).a

now we write inc hl instuction, this is hl+1 so hl is now 01b6.

Then repit the operation.
ld a,&d9
ld (hl),a
inc hl
ld a,&c9
ld (hl),a

An thats all we undone the patch.

So we have now:

org &4000

;reparcheamos la subrutina.
ld hl,&01b5
ld a,&c1
ld (hl),a
inc hl
ld a,&d9
ld (hl),a
inc hl
ld a,&c9
ld(hl),a

pop bc
exx
ret

Now that the game work to the finish is time to patch the xor menu 1 &2.

Remember how find the keys with winape with the trainers.

load the game until the xor menu. Pause the winape and search in the upper window the direction &BB00 Then from &BB00 to BB4E put a breakpoint in all instructions have "rst &08"

Close the debugger and push one key in the keyboard. Yo can view winape stops on one of these breakpoints we made.

Loock  to the right, you can view a windows called "stack:" And under the label a number in a blue colour. This number is the memory direction  where the programs go after it finish the subrutine.

Take the number an go to these direction in the upper windows (&8be2 in this case).

And oh lucky the are are the two cp controls 1 and 2, cp 31 and cp 32 :)

So now we go to patch it.

We need change the 31 to 58 (button 1 pad) and 32 to 5a(button 2 gamepad).

They are in &8be3 and in &8be7 So this is easy

ld hl,&8be3
ld a,&58
ld (hl),a
ld hl,&8be7
ld a,&5a
ld (hl),a

And voila keys are patched.

try it  and i go to write the next.


Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.418
  • Country: es
  • Liked: 584
  • Likes Given: 485
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1280 on: 15:59, 10 February 16 »
Now that we have the first menu patched is  time of the second menu the choose level.

Take a litte look where the cps of the first menu are in winape.

A more litte down in 8bf2 you can view 3 calls and other two cps 31 and 38.

We go to examine it.

The first two are calls made by xor, is easy to know, because the firmware keboyard rotuines begin in b00 and there are in 8xxx

But the other in 8bf8 call &bb06 is a firmware subrutine. So who it does?

We take a look here:   The Amstrad CPC Firmware Manual - Index

&BB06KM WAIT CHAR
ActionWaits for the next character from the keyboard buffer
EntryNo entry conditions
ExitCarry is true, A holds the character value, the other flags are corrupt, and all other registers are preserved

So, it simply watis until you pressed a key in the keyboard.

wait a moment we not have keboard. this is a problem. we don't want these subrutine!!

So we need use our gx4000 xor subrutine.

The call es located in &8bf8,8bf9,8bfa

&8bf8 is cd(the call instrucion), and the other two the memory localization where it begins.

What is a call? a call is a program that begins in a x direction of the memory and when it find a "ret" i returns to the next line after it is called.

So this call begin in bb06 an returns to 8bfb :).

Now we need patch the direction to us direction. In this case we put in in 4100(so es easy generate the loader.bin).

Then:

ld hl,&8bf9
ld a,&00
ld (hl),a
inc hl
ld a,&41
ld (hl,),a

Now the call begins in &4100 and returns to 8bfb.

Now is time to create another program inside the loader.bin.

us first programs go from org &4000 to the ret.

No we write

org &4100

Then is time of simply copy& paste the xor gx4000 subrutine i made:

ld a,&31 ;numero 1
esperando_fuego:
ld b,a
call &bb5a ;escribir caracter por pantalla.
ld a, &08
call &bb5a ;escribir flecha izquierda
call &bb18 ;esperar caracter.
call &bb24 ;escanear joystick.
cp &10 ;fuego
jp z,salida_bucle ;salimos si pulsamos fuego la letra estaria en B.
cp &08 ;derecha
jp z,derecha
;si no es derecha es izquierda o nada
cp &04
ld a,b
jp nz,esperando_fuego ;saltamos si no es nada.
cp &31
jp z,esperando_fuego ;controlamos que no se pueda meter menos del 1.
dec a
jp esperando_fuego
derecha:
ld a,b
cp &37
jp z,esperando_fuego; controlamos que no se pase del 7
inc a
jp esperando_fuego
Salida_bucle:
ld a,b
ret

Not worry, you don't need know who it works, you only need know 3 things.

The first ld a,&31 controls the first character is displayer 1,2,a, b,z Is in ascii format code if i remeber o.k

The cp &31 controls the lower character is displayed in the screen when yo press left in these case ="1"
The cp &37 contrlos the upper character is displayed in the screen when you press right in these case="7"

And thats all you need change between xor games.

Now, generate the loader.bin as usual selecting the range from &4000 to &41xxx and thats all :).

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.169
  • Country: gb
  • Liked: 1732
  • Likes Given: 552
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1281 on: 16:11, 10 February 16 »
Thanks for all this, is nice to try and learn, it's making my head hurt though  :laugh:

I've had a few minutes, so I've done part 2, it appears to work  :D

I'll attempt part 3 in awhile.

Part 2 finished below.
« Last Edit: 18:57, 07 January 17 by Phantomz »

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.418
  • Country: es
  • Liked: 584
  • Likes Given: 485
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1282 on: 16:25, 10 February 16 »
works perfect :)

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.169
  • Country: gb
  • Liked: 1732
  • Likes Given: 552
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1283 on: 17:52, 10 February 16 »
works perfect :)

Thanks again for all the info dragon  8)

It's a lot for me to take in as never done this type of stuff before, but you've given me an idea on how things work, hopefully I might be able to do some more xor trainers this way in the future now.  :D

I might need a hand if I get stuck.  :doh:  :laugh:

Anyway, I'm happy to say I've got " Terminator 2 " all done now.  :D
« Last Edit: 18:57, 07 January 17 by Phantomz »

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.418
  • Country: es
  • Liked: 584
  • Likes Given: 485
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1284 on: 18:59, 11 February 16 »
Cinema day.

Indiana jones:

push 2+down to pause,2+left to abandon.

With cheat activated: 2+up=reset level,2+right=go do mid point. 2+1= Next level

Ghostbusters 2: 1 pad 2 to abandon.

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.169
  • Country: gb
  • Liked: 1732
  • Likes Given: 552
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1285 on: 22:24, 11 February 16 »
Here is another budget shooter, " Mission Genocide " not a bad little game.  :D

Joypad 1 Button 2 for Auto Fire On / Off

Pause with Console Pause Button, Joypad 2 Button 1 to Change Colour.
« Last Edit: 18:58, 07 January 17 by Phantomz »

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.169
  • Country: gb
  • Liked: 1732
  • Likes Given: 552
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1286 on: 21:41, 12 February 16 »
I've done another game today, this one is " Barbarian " the Melbourne House version.

So we have all three Barbarian games available on the GX4000 now.  8)

I've made the game default to Joystick, so just press Button 1 on Joypad 1 to Start.

I've remapped space to flip icon bar to Joypad 1 Button 2.
« Last Edit: 18:59, 07 January 17 by Phantomz »

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1978
  • Likes Given: 4650
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1287 on: 21:47, 12 February 16 »
Hi @Phantomz : Well, I don't have a GX4000 in usage, but I have to tell you that you do an incredible great job!!! I Guess you're soon getting close to 100 converted games or so!!! That's just super awesome!!!!!!!  :) :) :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.169
  • Country: gb
  • Liked: 1732
  • Likes Given: 552
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1288 on: 22:15, 12 February 16 »
Hi @Phantomz : Well, I don't have a GX4000 in usage, but I have to tell you that you do an incredible great job!!! I Guess you're soon getting close to 100 converted games or so!!! That's just super awesome!!!!!!!  :) :) :)

Thank you  ;D
« Last Edit: 18:59, 07 January 17 by Phantomz »

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1978
  • Likes Given: 4650
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1289 on: 22:37, 12 February 16 »
WoW!
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline dragon

  • 6128 Plus
  • ******
  • Posts: 1.418
  • Country: es
  • Liked: 584
  • Likes Given: 485
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1290 on: 22:38, 12 February 16 »
Push 2 6 times where autor credits are in the screen to infinity energy. (a little red border appears).

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1978
  • Likes Given: 4650
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1291 on: 22:41, 12 February 16 »
And congrats to you too!!!  :) :) :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.169
  • Country: gb
  • Liked: 1732
  • Likes Given: 552
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1292 on: 22:44, 12 February 16 »
WoW!

I use the cpr's on my 6128 plus too, as I need to get a new hxc as my old one died when last connected to my Amiga 500 for some reason.

I try and find the keys to change in the cpr's to help fellow Amstrad gx4000 owners, I mean, why not, I've converted the disc to cart so might as well try and remap the keys as I've got a GX4000 too.  :)

I think the cpr's are great for 464 plus owners too not just GX4000 users, It must be a nightmare loading multi load games with no tape counter.  :doh:

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.169
  • Country: gb
  • Liked: 1732
  • Likes Given: 552
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1293 on: 18:16, 13 February 16 »
I thought I'd do the other game from " Melbourne House " with the odd control system, it's not my cup of tea ( I prefer coffee ) :laugh: :laugh: :laugh: but thought some people might like it.  ;) ;D

The game is " Obliterator "

I've made the game default to Joystick so you can just press button 1 on joypad 1 to start.

The controls are listed on the Trainer screen at the start.  :D
« Last Edit: 19:00, 07 January 17 by Phantomz »

Offline ukmarkh

  • 6128 Plus
  • ******
  • Posts: 1.421
  • Country: england
    • Classic Replay
  • Liked: 307
  • Likes Given: 77
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1294 on: 18:43, 13 February 16 »
Are you saying that Obliterator now works fully with the joystick, none of that pointer rubbish?


If so, that's definitely up my street, and my cuppa tea!

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.169
  • Country: gb
  • Liked: 1732
  • Likes Given: 552
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1295 on: 19:03, 13 February 16 »
Are you saying that Obliterator now works fully with the joystick, none of that pointer rubbish?


If so, that's definitely up my street, and my cuppa tea!

No sorry, still got the odd controls, you can just play it the same as on a cpc computer with the joystick now.

The game defaults to Keyboard originally, so I've changed that to default to joystick and remapped the other buttons required ingame to the controller buttons.

Offline ukmarkh

  • 6128 Plus
  • ******
  • Posts: 1.421
  • Country: england
    • Classic Replay
  • Liked: 307
  • Likes Given: 77
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1296 on: 00:22, 14 February 16 »
Oh ok, for a minute there, I got a wee bit excited! Haha!

Offline Ewok

  • CPC464
  • **
  • Posts: 5
  • Country: nl
  • Liked: 2
  • Likes Given: 0
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1297 on: 11:18, 14 February 16 »
Hi,


I am all new to this and very exited regarding the use of the c4cpc on my gx4000. So forgive my probably stupid question. My question is, is it also possible to convert old classics like jet set willy and manic miner?

Offline remax

  • 6128 Plus
  • ******
  • Posts: 1.115
  • Country: fr
  • Liked: 406
  • Likes Given: 447
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1298 on: 16:50, 14 February 16 »
I'm uploading Ghostbuster II, Gremlins 2 and Indy 3 from dragon then will post an updated pack

EDIT : And done.


Just one note for Phantomz : First, a big thanks for your conversions, but please avoid using folders in your compressed archives as it give me lot of works when doing my full sets. So please compress everything to the root folder of the rar ;).
« Last Edit: 17:07, 14 February 16 by remax »

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.169
  • Country: gb
  • Liked: 1732
  • Likes Given: 552
Re: Converted GX4000 .cpr - The topic (repository link in first post)
« Reply #1299 on: 17:38, 14 February 16 »
I'm uploading Ghostbuster II, Gremlins 2 and Indy 3 from dragon then will post an updated pack

EDIT : And done.


Just one note for Phantomz : First, a big thanks for your conversions, but please avoid using folders in your compressed archives as it give me lot of works when doing my full sets. So please compress everything to the root folder of the rar ;).

First off, thanks for the thanks  ;) and also thanks for uploading dragons games.

You say the folders give you a lot of work, I'm a bit puzzled by that to be honest!  ???

You only need to add the new games to your old pack and remake a new rar, for example if 10 games have been made since the last pack, just download those 10 games, unrar them and cut and past to your existing folder and re rar the new pack and upload.  :o

If you think that takes a lot of work then I don't think you'd like how long it can take to find keys ingames to remap.  ;D