Miscellaneous > Projects

kof98 ratio

(1/4) > >>

bankbank:
just beginning this hack. need to analyze the aes version since that p rom is unencrypted.
found this memory map: https://www.chibiakumas.com/68000/neogeo.php
so we can see there
--- Code: ---BIOS_P1STATUS $10FD94 (byte) Controller 1 status
--- End code ---
in MAME debugger I use the command "wp 10FD94,1,rw,wpdata!=00" (if leaving off the wpdata!=00 it will always trigger, I only want it to trigger when I press a button)
so after I pressed button 1 (start didn't trigger the wp), I see "stopped at watchpoint reading 0010 from 0010FD94 (PC=C185E4)
so I know that 0x0010FD94 is probably where the game will store player 1's input. and now I have a PC to check out in ghidra for some decompilation.

bankbank:
so I stopped at that watchpoint and got a PC for me to disassemble in ghidra. when I got to that address in ghidra and pressed 'd', it was disassembling incorrectly offset by 1. 68k CPU is big-endian and I was importing it as such, so I guess when MAME runs the game kof98h it runs it as little endian. not exactly sure what the exact explanation is, but anyway I used this program to swap endianness
http://forum.arcadecontrols.com/index.php?topic=93984.0

and now the file can be disassembled properly. so now I will combine the input watchpoint with ghidra to determine what code is run when a player presses a button to select a character. that's where the injection will go of new code to check if the player has enough points to take that character.

note that the below screenshot is of the PC stopped at vblank - it's not the area of code I'm interested in modifying right now.

bankbank:
I found the timer address for kof98, it's a word at 0x1085d0

and I found it in kof98h romset, which is aes and not encrypted. so now I can remove most of this timer code, giving me a nice section of free code I can play with.

bankbank:
ok, we're making progress. I NOP'd 3 instructions, netting 6 bytes to be used later. there's likely more timer-related code that I could remove later, if need be.

so that's one goal complete:

--- Quote ---*remove EX mode (auto-selection at start)
*remove timer
*remove Omega Rugal
*implement ratio selection via table
*implement points/cost text (using CREDITS 0X) text draw function
*remove random select
--- End quote ---

bankbank:
so one of my goals is to remove EX mode. I had the choice of either A) selecting it immediately for the player OR B) allow the player to select it like they would normally, but just remove the joystick controls to change the mode. I went with A cus it seems like a waste to have a toggle for something that can't be toggled. and my first try worked perfectly. I simply NOP'd the beq at 284d6. so as soon as a player enters, the default mode is chosen for them.

Navigation

[0] Message Index

[#] Next page

Go to full version