Hackings requests/ideas

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,658CR
Chuckie egg said:
A hack for A ladder to be put in place on the the first level of Popeye in the middle like the nes version would make it a bit easier and more fun.

OK, I've had a look at this today Alex. Do you want the good news or the bad news?

The good news is that it's totally doable and only requires 4 bytes changing to do it. The bad news is that you'll have to sacrifice one of the 6 staircases that go up/down from the 1st floor to either the ground floor or the second floor.

Let me explain (I'll try not to be too technical!)

As you know very well each of the 3 rounds in the game has 4 levels (or floors as I prefer to call them).

Top floor (highest level, as seen on screen)

2nd floor

1st floor

Ground floor (lowest level, as seen on screen)

Each floor has a maximum of 32 bytes available in rom to describe its layout to the game engine (the floors don't have to use all the 32 bytes available to them but they can't use any more than that).

The first 8 bytes of those 32 bytes describe the start and end positions of that floor, in 2 x 4 byte segments (4 bytes for the start of a section and another 4 bytes for the end of a section). This allows each floor to have, at maximum, two separate sections to walk on (with a gap of thin air between those sections). Not all floors use 2 sections (e.g. the ground, first and second floors of round 1 are just a single section that spans the entire width of the screen, with no air gap).

The next 24 bytes of the 32 bytes describe the ladders/staircases that allow you to ascend/descend to different floors from the one you're currently standing on. These 24 bytes are split into 6 x 4 byte segments. This allows a maximum of 6 different ladder/staircase combinations on any 1 floor. For the technically minded the 4 byte segments are broken down to :-

ladder/staircase type

x-pos min

x-pos max

y-pos

As you can see from the pic below, the 1st floor of round 1 already has the maximum of 6 staircases utilised to change floors to a different floor. From left to right :-

1) left to right staircase going down to ground floor

2) right to left staircase going up to 2nd floor

3) right to left staircase going down to ground floor

4) left to right staircase going down to ground floor

5) left to right staircase going up to 2nd floor

6) right to left staircase going down to ground floor

popeye.png


So, in order to have a ladder going up from the 1st floor to the 2nd floor (without doing an extensive rewrite of how the game engine interacts with the floors) you need to sacrifice one of the current staircases leading to one of the other floors.

In the video below I've sacrificed number 3 from the list above and replaced it with a ladder going up from the 1st floor to the 2nd floor. You can still ascend that staircase from the ground floor to the 1st floor but you can no longer descend it.

You now have to decide whether the sacrifice of one of the current 6 staircases leading from the 1st floor to either the ground floor or the 2nd floor is worth it to have a ladder from the 1st floor to the second floor.

Choices, choices, choices.......

Nobody ever said that life was gonna be easy buddy!
smiley36.gif


 

virtvic

The Cabaret King
Feedback
21 (96%)
Credits
1,977CR
I've just 'adjusted' Kung Poo Master and it is now fine. Just how it should have been in the first place, all those years ago, Irem!

Cheers Ade!
 

virtvic

The Cabaret King
Feedback
21 (96%)
Credits
1,977CR
IMG_0085.JPG


I'm getting the above with the burnt eeprom (with code modification)

I was using a 27128 (as recommended) and kept getting the garbled display. I thought it was because I was using modified code from KUNG FU MASTER and my PCB is a SPARTAN X, so I modified the rom from Spartan X and tried that, still the same...

I then realised that the original eeprom is a M5L2764K, so I burnt the modified code to that and I'm still getting the same...

What am I doing wrong? The rom from mame is 16k and the actual game rom is 8k???
 

virtvic

The Cabaret King
Feedback
21 (96%)
Credits
1,977CR
Oh, the game is still playable - but backgrounds are knackered AND the new jumpy karate man is back to crap old jump-every-now-and-again karate man...
smiley13.gif
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,658CR
I don't know what Spartan X is? Is it a derivative game of Kung Fu Master? The patch offset that I gave you will probably only be good for the original Kung Fu Master (MAME: kungfum).
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,658CR
I've just had a look in the MAME driver for the Irem M62 system. I'll bet you've modified one of the graphic roms instead of the code rom.

Spartan X has 3 different roms at position 4D. Two of which are 2764 (8Kb) roms for tiles and sprites and the other one (the one you need to modify) is a 27128 for code.

ROM_START( spartanx )

ROM_REGION( 0x10000, "maincpu", 0 )

ROM_LOAD( "a-4e-c-j.bin", 0x0000, 0x4000, CRC(32a0a9a6) SHA1(fbb601a4c98a131013ea49a6877f2cd8139434fa) )

ROM_LOAD( "a-4d-c-j.bin", 0x4000, 0x4000, CRC(3173ea78) SHA1(cb6102abf9cf8df531f6e808b59e076831456ff5) )

ROM_REGION( 0x10000, "iremsound", 0 ) /* 64k for the audio CPU (6803) */

ROM_LOAD( "a-3e-.bin", 0xa000, 0x2000, CRC(58e87ab0) SHA1(3b03c101fec58eac13fc309a78df9a2cd44f7604) ) /* samples (ADPCM 4-bit) */

ROM_LOAD( "a-3f-.bin", 0xc000, 0x2000, CRC(c81e31ea) SHA1(f0fc58b929188c8802cd85549bdf9f4566e6a677) ) /* samples (ADPCM 4-bit) */

ROM_LOAD( "a-3h-.bin", 0xe000, 0x2000, CRC(d99fb995) SHA1(caa6acdbc3b02d248fd123be95ea6fdcb4f35b59) )

ROM_REGION( 0x06000, "gfx1", 0 )

ROM_LOAD( "g-4c-a-j.bin", 0x00000, 0x2000, CRC(8af9c5a6) SHA1(3375ad92f230ea85d6db16ccfa8fec0832e8cc26) ) /* characters */

ROM_LOAD( "g-4d-a-j.bin", 0x02000, 0x2000, CRC(b8300c72) SHA1(806be9da8a164d5f6a4cbd82deacb3fbd0032423) )

ROM_LOAD( "g-4e-a-j.bin", 0x04000, 0x2000, CRC(b50429cd) SHA1(6fdaed316ec94fc5ccb560ed65c714151f8ee5fe) )

ROM_REGION( 0x18000, "gfx2", 0 )

ROM_LOAD( "b-4k-.bin", 0x00000, 0x2000, CRC(16fb5150) SHA1(a49faf617f948d3ccec2bc6ef97bd399f0958f65) ) /* sprites */

ROM_LOAD( "b-4f-.bin", 0x02000, 0x2000, CRC(67745a33) SHA1(fcc642fb1b932676c84c1a0901b989673c57c0e5) )

ROM_LOAD( "b-4l-.bin", 0x04000, 0x2000, CRC(bd1c2261) SHA1(7155789a01801a9e1a55d4e68c94a3a3ee7d1b2e) )

ROM_LOAD( "b-4h-.bin", 0x06000, 0x2000, CRC(8ac5ed3a) SHA1(9c88e8c82420428b43923cdee7eb4504882bec69) )

ROM_LOAD( "b-3n-.bin", 0x08000, 0x2000, CRC(28a213aa) SHA1(0d6d668490bdf4394bc9fed2f3cdc72f2fea46f9) )

ROM_LOAD( "b-4n-.bin", 0x0a000, 0x2000, CRC(d5228df3) SHA1(836c4f95f873fbf07f9bec63a72c20a14651117c) )

ROM_LOAD( "b-4m-.bin", 0x0c000, 0x2000, CRC(b16de4f2) SHA1(512260e76c9cd21b8add771de53fbd27c2719213) )

ROM_LOAD( "b-3m-.bin", 0x0e000, 0x2000, CRC(eba0d66b) SHA1(028f82fc1853b86a3201b24871f41091c3e0b542) )

ROM_LOAD( "b-4c-.bin", 0x10000, 0x2000, CRC(01298885) SHA1(d4edf5fe707c5b7231ba72b731b96120064a7ecd) )

ROM_LOAD( "b-4e-.bin", 0x12000, 0x2000, CRC(c77b87d4) SHA1(c0f66f0130f6a290a58a3d77bba1d06f16016901) )

ROM_LOAD( "b-4d-.bin", 0x14000, 0x2000, CRC(6a70615f) SHA1(f4683dc0a566567e95e85268612bcf0e6297d955) )

ROM_LOAD( "b-4a-.bin", 0x16000, 0x2000, CRC(6189d626) SHA1(ce8e5e95c2684c685481e9c8d921380b20ac0460) )

ROM_REGION( 0x0720, "proms", 0 )

ROM_LOAD( "g-1j-.bin", 0x0000, 0x0100, CRC(668e6bca) SHA1(cd5262b1310821ba7b12873e4db35f081d6b9df4) ) /* character palette red component */

ROM_LOAD( "b-1m-.bin", 0x0100, 0x0100, CRC(76c05a9c) SHA1(1f46f436a17f8c883bdd6d9804b828a81a76f880) ) /* sprite palette red component */

ROM_LOAD( "g-1f-.bin", 0x0200, 0x0100, CRC(964b6495) SHA1(76f30a65a0ded14babad2006221aa40621fb7ea1) ) /* character palette green component */

ROM_LOAD( "b-1n-.bin", 0x0300, 0x0100, CRC(23f06b99) SHA1(6b3d6349f019aeab33838ae392bc3f3f89906326) ) /* sprite palette green component */

ROM_LOAD( "g-1h-.bin", 0x0400, 0x0100, CRC(550563e1) SHA1(11edb45acba8b28a462c49956ebb1ba0a8b2ff26) ) /* character palette blue component */

ROM_LOAD( "b-1l-.bin", 0x0500, 0x0100, CRC(35e45021) SHA1(511b94507f41b377f38184ed9a85f34949b28d26) ) /* sprite palette blue component */

ROM_LOAD( "b-5f-.bin", 0x0600, 0x0020, CRC(7a601c3d) SHA1(5c5cdf51b2c9fdb2b05402d9c260208ae73fe245) ) /* sprite height, one entry per 32 */

/* sprites. Used at run time! */

ROM_LOAD( "b-6f-.bin", 0x0620, 0x0100, CRC(82c20d12) SHA1(268903f7d9be58a70d030b02bf31a2d6b5b6e249) ) /* video timing - same as battroad */

ROM_END

I've never seen an M62 board set so I don't know how many layers there are to it. Maybe post some good quality pics of the different layers of the board set, indicating which rom you've modified and then I'll know whether it's the right one or not (but I've a hunch that you've modified the tile rom g-4d-a-j.bin).

Even then I don't know whether the code modification that I've done will be at the same offset for Spartan X. I didn't know that you had a Spartan X board, that's why I just did the code alterations for Kung Fu Master.
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,658CR
Ok, I've checked the Spartan X code and the offset to be patched is the same as Kung Fu Master so as long as you're modifying the correct rom (
smiley2.gif
) then you're good to go.
 

favouredson

Super Star
vacBacker
Credits
1,256CR
cmonkey said:
I've never seen an M62 board set so I don't know how many layers there are to it.

Three, labelled A B & G.
Hence the MAME ROM names.

cmonkey said:
Even then I don't know whether the code modification that I've done will be at the same offset for Spartan X. I didn't know that you had a Spartan X board, that's why I just did the code alterations for Kung Fu Master.

Spartan X is the original name of the game and every original KFM board I have seen has had a Spartan X license seal.
 

virtvic

The Cabaret King
Feedback
21 (96%)
Credits
1,977CR
My fault, I should have said.

I kept the original eeprom just in case, I burnt a 'new'one. I bet I've replaced the one on the wrong layer (top layer of the 3)
 

virtvic

The Cabaret King
Feedback
21 (96%)
Credits
1,977CR
159580

I just managed to get this all working in a REAL pcb now (Spartan X)

I burnt a doubled up image of the modified code onto a D27128D eeprom and replaced the eeprom at position 4D on the MIDDLE LAYER of the pcb. It all runs tickety boo, and our karate hero can now do jump kicks whenever he likes! Just got my best ever score of 159580 and managed to knock off 2 of that bastard Mr.X's health. I WILL 1CC THIS SOON!!!

Many thanks again to Cmonkey (Ade), Favoured Son (Garry) and RGP (James) for all their help in making me a happy Kung Fu bunny
smiley36.gif
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,658CR
The problem with Juno First is that the main CPU is the Konami-1. This means that any alterations to the code require the opcodes to be encrypted (but not the operands). This means it's a very slow and laborious task as each opcode has to be treated individually as the encryption is based around the address of the opcode. Ask KLOV user Matt Osborn, who did the high score save mod for it, he'll tell you how painful it is.
 

cmonkey

Active member
vacBacker
Feedback
4 (100%)
Credits
1,658CR
virtvic said:
159580

I just managed to get this all working in a REAL pcb now (Spartan X)

I burnt a doubled up image of the modified code onto a D27128D eeprom and replaced the eeprom at position 4D on the MIDDLE LAYER of the pcb. It all runs tickety boo, and our karate hero can now do jump kicks whenever he likes! Just got my best ever score of 159580 and managed to knock off 2 of that bastard Mr.X's health. I WILL 1CC THIS SOON!!!

Many thanks again to Cmonkey (Ade), Favoured Son (Garry) and RGP (James) for all their help in making me a happy Kung Fu bunny
smiley36.gif

I'm confused as to why you needed to double up the modified code image as it was already 16Kb in size (27128 size). If you doubled it up you'd have ended up with a 27256 sized image (32Kb)???
smiley5.gif
 

joe34

Active member
Credits
448CR
hey cmonkey I think I have an idea about a game which is ruined by the control system (nobody likes it I think!) but would have been a really good game otherwise
maybe I could do some tests on it tomorrow (to see if controls hacking is likely to 'work out') and report back (of course though if you don't have time or are getting swamped with requests, no worries of course
smiley1.gif
)
 

joe34

Active member
Credits
448CR
hey again, regarding my post above, i wrote up the details about the idea for hacking an eighties game which could have been really good, but instead (in my opinion) turned out to be a disappointment due to the 'exotic' control system.
i'll make a new post now in this sub-forum about this 'mystery game' .. ; my write-up turned out a bit more detailed than i expected (there was more details to address than i initially thought
smiley12.gif
).

anyway, it was kind of fun writing it all out. if nothing else it kept me out of trouble for a bit
smiley1.gif


EDIT: here it is: http://www.ukvac.com/forum/topic346678_post910108.html

joe342015-07-29 17:12:14
 
Top