+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Super CD/Turbo CD Hacking
Pages: [1]
Author Topic: Super CD/Turbo CD Hacking  (Read 957 times)
Cleveland Rock
Guest
« on: June 28, 2007, 04:02:25 pm »

I'm interested in translating a game for the PC-Engine Super CD, but I've never done anything for this system before. It appears there are no suitable documents or utilities for this system. Am I supposed to edit graphics with a hex editor? Is there a way to expand a track for extra space? Must I know assembly to hack this game? Am I in over my head here? :banghead:
tomaitheous
Guest
« Reply #1 on: June 29, 2007, 07:21:11 am »


  I do game dev as well as hacking for the PCE CD, so I have a ton of information on the PCE/ TG system as well as for the CD, Super CD, and Arcade card systems. What info do you need to know? I don't want to discourage you but I would say almost all PCE CD games are going to require some ASM hacking. Atleast for the script read routines. A large percentage of games use 2 byte SJIS (although most game's text is uncompressed). At a minimum you'd want to change the text read function from 2 byte to a single byte lower ascii, then convert the ascii to SJIS on the fly, but you'll be stuck using the system card bios font ...(ugh).

 For PCE tile needs, use Tile Molester (it can't edit PCE sprites though).
Piotyr
Guest
« Reply #2 on: June 29, 2007, 10:42:08 am »

Translate downtown nekketsu! Wooooooooooo! Or not Tongue.
Jigglysaint
Guest
« Reply #3 on: June 30, 2007, 12:11:42 am »

I'm interesting in hacking Dungeon Explorer.  Do you have any information to point me in the right way?(note I am talking about the game, not sprites or text)
tomaitheous
Guest
« Reply #4 on: June 30, 2007, 05:32:41 am »

If not the sprites (and tiles?), then you're referring to the game maps and such?

You'll need :

mednafen for a debugger. Use alt+d to get into the debugger, use control+w to set vram breakpoints (address is 'word' based not bytes). The tilemap, referred to as Background Attribute Table or BAT, always starts at vram address $0000.  The debugger.html file has most of the debugger keys, but not all of them. From the debugger mode, Alt+3 will get you into the memory editor; use "," and "." to switch memory types (logical,absolute,VRAM,VCE, etc). Use the "insert" key to enable changing of byte values.

The Develo (ASM) book - http://pcedev.net/docs/DeveloA.pdf. If you can read Japanese Wink

A list of the cpu instructions - http://pcedev.net/pce_docs/designdoc.pdf. Note: The cpu is based on the 65CS02 (not the 65C02) so it has the additional bitwise and bittest instructions.

Charles Doc - http://pcedev.net/pce_docs/pcetech.txt (a little old but still helpful).

PCE assembler + docs - http://pcedev.net/pce_docs/MK_plus_docs.zip

PCE dev wiki site - http://pcedev.fobby.net/lick/Special:Allpages

And some more docs - http://pcedev.net/pce_docs/PCE_docs.rar



Nightcrawler
Guest
« Reply #5 on: June 30, 2007, 10:04:57 am »

Should these items be added to our site, so they're here when this exact same question is asked again in the future? Wink
Cleveland Rock
Guest
« Reply #6 on: July 01, 2007, 10:07:17 am »

Quote from: tomaitheous on June 29, 2007, 07:21:11 am

  I do game dev as well as hacking for the PCE CD, so I have a ton of information on the PCE/ TG system as well as for the CD, Super CD, and Arcade card systems. What info do you need to know? I don't want to discourage you but I would say almost all PCE CD games are going to require some ASM hacking. Atleast for the script read routines. A large percentage of games use 2 byte SJIS (although most game's text is uncompressed). At a minimum you'd want to change the text read function from 2 byte to a single byte lower ascii, then convert the ascii to SJIS on the fly, but you'll be stuck using the system card bios font ...(ugh).

 For PCE tile needs, use Tile Molester (it can't edit PCE sprites though).
Hoo-boy. Over my head. I might as well just do Downtown Nekketsu Monogatari EX for the Game Boy Advance. I already know how to hack that. Sad

Quote from: Piotyr on June 29, 2007, 10:42:08 am
Translate downtown nekketsu! Wooooooooooo! Or not Tongue.
Bingo! You either did your homework and found out about my love of Kunio-Kun Nekketsu games or you just had a lucky guess.

Quote from: tomaitheous on June 30, 2007, 05:32:41 am
If not the sprites (and tiles?), then you're referring to the game maps and such?
Let's see… I'd want to change the Japanese text tiles into the Roman alphabet, punctuation, and perhaps some other additions. Then I'd want to, obviously, change the game's text. I'd want to dub over the audio tracks that have the Japanese voice clips (the easy part). Finally, I'd want to change the Japanese text in the game's scenery. If I was translating the NES game, none of this would be a problem. I know nothing about doing this for Super CD games. If the above requires assembly, I have a lot of learning (and, more likely, failure) to do before I could even think about trying to pull this off.

Edit: Oh, and the title screen. I'd want to modify that, even though people who play the translated game obviously already know the game's title.

Quote from: Nightcrawler on June 30, 2007, 10:04:57 am
Should these items be added to our site, so they're here when this exact same question is asked again in the future? Wink
It certainly is embarrassing having to ask for help like this.
tomaitheous
Guest
« Reply #7 on: July 01, 2007, 01:49:41 pm »


Ohhh.  Downtown Nekketsu Monogatari is one of the few CD games to use it's own font instead of the system font - 8x8 if I remember correctly. That means it doesn't use the 2byte SJIS format. That saves a lot work right there.

 So.. you might be able to get away with no ASM hacking.
Cleveland Rock
Guest
« Reply #8 on: July 03, 2007, 05:53:06 pm »

Quote from: tomaitheous on July 01, 2007, 01:49:41 pm

Ohhh.  Downtown Nekketsu Monogatari is one of the few CD games to use it's own font instead of the system font - 8x8 if I remember correctly. That means it doesn't use the 2byte SJIS format. That saves a lot work right there.

 So.. you might be able to get away with no ASM hacking.
Whew! I lucked out. So, how am I supposed to do the tile-hacking? I guess I should load one of the data track ISOs in Tile Molester.

Newsflash: I managed to find the title screen tiles in the first data track. So far, that's all I've found. I haven't found anything resembling hiragana. Could there be something I am doing incorrectly?
« Last Edit: July 03, 2007, 07:30:01 pm by Cleveland Rock »
tomaitheous
Guest
« Reply #9 on: July 05, 2007, 03:00:37 pm »

I was going to write a long response in what you can do to find the font, but I just looked at the game instead Wink

 The font is compressed as well as most of the other tiles, sprites, and tilemaps. A quick look showed that is uses pointers to previous blocks of data within the build area. I'll take a more indepth look at it and give you some more details later (addresses in CD ram and ISO). One pattern I did see is that $87:0000 - $87:1FFF is used as the scratch padded for decompression. Looks like the max decompressed data is 8k in length and is immediately sent to VRAM via DMA instruction.



edit: The compression scheme is LZ77.

Code:
Downtown Nekketsu Monogatari
----------------------------


The header is 4 bytes long.

first two bytes(word) = the number of uncompressed bytes

third byte = ???, push onto the stack, pulled back after # of uncompressed
byte reached. (Seems to de discarded afterwards - might be dependent on the
code that calls the decompression routine.)

fourth byte = nothing - skipped over by the decompression routine.




bit seven of the control byte:

1= block transfer from a previous data location of the destination block.
0= new data from the source to the destination block.

if bit=0, then the value is & $7F then incremented by 1. This is the number
of bytes to read/transfer from source to destination.


if bit=1, then a subtraction address is built:

bits 0-6 are stored into the MSB ZP variable.

a new byte is read from the source string.

bits 0-3 are added to 3 for the number of bytes to transfer.
bits 0-7 are stored into LSB ZP variable (bits 0-3 are shifted out, see below).

A 16bit right shift by 4 is performed on MSB/LSB, used to subtract from the
current pointer, and stored in a temp ZP location (source address pointing
within the build area).

That gives a sliding window of $800 bytes and a length of $12





$6084 bank $74 and $46884 in ISO is the string for the second set of fonts (bottom of
the screen text).




-Rich

« Last Edit: July 07, 2007, 11:35:16 am by tomaitheous »
tomaitheous
Guest
« Reply #10 on: July 07, 2007, 03:18:08 pm »


 I submitted the info as a doc to the database.
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC