Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Psycho Fox hacking

Reply to topic
Author Message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Psycho Fox hacking
Post Posted: Sat Aug 09, 2008 5:38 pm
Back in 2002 a friend and I wanted to port Psycho Fox to the GBA, and so we started to hack the game to extract the data. We did not quite finish, but looking at my archives I believe it would not hurt publishing what we've got.

'pfviewer' is GBA code to display a level BG/FG (only, no enemies) of Psycho Fox. The version I've got compiled shows only 1 level, but if someone manage to recompile it (or hack the binary) it is easy to show all levels of the game. And at least some of the info are in the code.

The tables in data/ were extracted from Psycho Fox ROM. Unfortunately I can't find the 'pfexporter' program which did that job. However based on the data it should be easy to retrieve the offsets in the original ROM.

Some bits from my notes (sorry it's a mess):

 RAM MAPPING

 0xC00D      Country
 0xC020      Level ($0-$15)
 0xC021      World ($0-$6)
 0xDF00-0xDFC0   Sprites shadow (40 Y then 40 Interleaved X/N)

Accesses of $C020 (Current Level):

Code @ $2421 read from table:

  $5753 (21 addresses, one per level)
  00005750: xxxx xx7d 579c 57bb 57ce 57ff 5720 5841  ...}W.W.W.W.W XA
  00005760: 5856 586d 5880 5897 58b0 58b9 58dc 58f3  XVXmX.X.X.X.X.X.
  00005770: 5818 5931 5940 595f 5982 59a7 59xx xxxx  X.Y1Y@Y_Y.Y.Y...

  Each address point to a list of EGGS CONTENTS.
  The list is stopped using 0xFF.

Code @ $31A5 read from table:

  $31E8
  ..
 
Code @ $3806 read from table:

  $514C (21 addresses, one per level)
  00005140: xxxx xxxx xxxx xxxx xxxx xxxx 7651 8751  ............vQ.Q
  00005150: a051 a951 ba51 cb51 d451 9d52 4653 ef53  .Q.Q.Q.Q.Q.RFS.S
  00005160: a854 e154 3255 4355 6455 3556 4656 5756  .T.T2UCUdU5VFVWV
  00005170: 7856 b956 0a57 xxxx xxxx xxxx xxxx xxxx  xV.V.W..........

  Each address point to a list of OBJECTS CONTENTS.
  The list is stopped using 0xFFFF.

Code @ $43AF read from table:

  $50D8 (21 x 4 bytes)
  000050d8: 3080 1100   Level 1-1
            6980 1100   Level 1-2
  000050e0: a280 1100   Level 1-3
            db80 1100   Level 2-1
            1481 1100   Level 2-2
            4d81 1100   Level 2-3
  000050f0: 3080 1100   Level 3-1
            6980 1100   Level 3-2
            a280 1100   Level 3-3
            9881 1100   Level 4-1
  00005100: d181 1100   Level 4-2
            0a82 1100   Level 4-3
            3080 1100   Level 5-1
            6980 1100   Level 5-2
  00005110: a280 1100   Level 5-3
            db80 1100   Level 6-1
            1481 1100   Level 6-2
            4d81 1700   Level 6-3
  00005120: db80 1100   Level 7-1
            1481 1100   Level 7-2
            4d81 1100   Level 7-3
            8681 0500   Warp Zones
  00005130: 9b81 0500   
            b081 0500
            c581 0500
            da81 0500
  00005140: ef81 0500
            0482 0500
            1982 0500

Code @ $43EA

  $4405
  03 02 03
  03 02 01
  02 03 03
  03 03 03
  02 02 01
  03 01 03
  03 01 02
  01 01 01 01 01 01 01 01
  --> store in (C025h)
  --> For each level, starting height in screen

Code @ $4FDE

  Fetch from RAM at (A400h)
  psychofox.sms.dat.40 is the currently mapped page at this moment.
  A400h --> 2400h in page 4
  28 * 2 bytes which are address to locations following the table.
 
  MONSTERS LIST
 
  Format:
 
   screen number, screen position x, monster y, monster type
   
   Monster types:
   
    00 : Red Hopper
    01 : Pockly Guy
    02 : Gabacho
    03 : Poota
    04 : Bunbun Bee
    05 : Zizo zizo
    06 : Skull
    07 : Fireball
    08 : Boss (?)
    ...


For how the BG/FG is mapped, see the pfviewer source code.
Basically we've got a list of screen id, each screen refers to 2 half-screen id, each half-screen refers to 2 quarter-screen, each quarter-screen refers to 8 vertical strips of 16x16 metatiles, each metatiles refers to 4 tiles.

Sorry if it's messy. If someone is interested in hacking Psycho Fox at least this could help a bit. And, I probably can remember more if asked.
tile-library.png (32.09 KB)
tile-library.png

  View user's profile Send private message Visit poster's website
  • Joined: 24 Sep 2015
  • Posts: 17
  • Location: florida
Reply with quote
Post Posted: Fri Oct 23, 2015 1:18 am
Is there a way to use the source code to port Psycho Fox to the Mega Drive?
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14734
  • Location: London
Reply with quote
Post Posted: Fri Oct 23, 2015 1:06 pm
Well, you could use it to obtain the level data but not much more. The Mega Drive can already play it in SMS compatibility mode, so why bother?
  View user's profile Send private message Visit poster's website
  • Joined: 01 Feb 2014
  • Posts: 877
Reply with quote
Post Posted: Fri Oct 23, 2015 4:14 pm
If someone wants to port it to the Mega Drive, I think Magical Flying Hat Turbo Adventure might actually be a better starting point than the Master System game.
  View user's profile Send private message
  • Joined: 24 Sep 2015
  • Posts: 17
  • Location: florida
Reply with quote
Post Posted: Sun Oct 25, 2015 4:30 pm
Maxim. is i wanted to make a homebrew port of psycho fox for the mega drive is what i mean is i wanted to know how to use psycho fox sms source code to port it to the mega drive like giving it mega drive grafics and features
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8648
  • Location: Paris, France
Reply with quote
Post Posted: Sun Oct 25, 2015 9:30 pm
It's possible but it is an enormous amount of work. Usually if you have to ask the question it means you may not have the experiment in hacking and assembly.

However as Kagesan mentioned, Magical Flying Hat Turbo Adventure is very close to Psycho Fox in term of engine and could possibly be reskined to look like Psycho Fox if someone published a tool to edit the game content.
  View user's profile Send private message Visit poster's website
  • Joined: 24 Sep 2015
  • Posts: 17
  • Location: florida
Reply with quote
Post Posted: Sun Jan 03, 2016 5:57 pm
Bock wrote
It's possible but it is an enormous amount of work. Usually if you have to ask the question it means you may not have the experiment in hacking and assembly.

However as Kagesan mentioned, Magical Flying Hat Turbo Adventure is very close to Psycho Fox in term of engine and could possibly be reskined to look like Psycho Fox if someone published a tool to edit the game content.


also im not just porting psycho fox to the sega genesis/sega mega drive
im all so porting it to the super famicom and the turbo grafix 16/pc engine
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!