Author Topic: [v2.8.8.8[15/12/09]]OpenGenie Framework-opensource SMS/MD/32X/SegaCD rom diggin'  (Read 52515 times)

0 Members and 1 Guest are viewing this topic.

Offline Conle

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2203
About SegaCD i don't know yet , i don't have one , but for MD i will try.
Can you tell me what exactly is PAR ? A link to a document would help!

Offline ChillyWilly

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1753
  • Just a coding machine.
I checked around with google and couldn't find anything on PAR. Even the yahoo group for the Pro Action Replay had nothing. About the only one I know how knows about PAR is Snake, because PAR code support is listed as part of KEGA Fusion. I started a thread over at SpritesMind asking about PAR. Hopefully someone answers.

EDIT: My thread at SpritesMind seems to have paid off. Tiido gave this reply:

Quote
PAR code is aaaaaa:dddd

Where "a" is 24bit 68K address and "d" being data. PAR works for ROM and RAM so lot of fun can be done with it

The address can be rom or ram. When it's rom, it's easy - just write the patch value over the rom value. If it's ram, that's a bit more trouble as you'd need hardware to make sure the ram never changed.

The thread can be found here: http://gendev.spritesmind.net/forum/viewtopic.php?p=9657#9657
« Last Edit: November 11, 2009, 04:23:43 PM by ChillyWilly »

Offline Conle

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2203
Thanks , sounds easy , but im not sure if the sram support is going to work really well because there is no easy way to write values constantly to the addresses.

But we can try to patch sram only once after the game is loaded.
If there was a standard initialization procedure we could generate some code on the fly or with the plugin , but i don't think that every game will work with something like this and again this doesn't solve the issue
 ~sm-34.gif~ ~sm-34.gif~
« Last Edit: November 11, 2009, 11:07:54 PM by Conle »

Offline King Of Chaos

  • Full Member
  • ***
  • Posts: 117
Well, it'd probably work the same way the Game Genie would since if you take a Game Genie code like AK9A-AA62 and decrypt it to hex, you get 007E98:6002 which is basically a working PAR code.

But yeah, locking the value is the tricky part.

Offline Conle

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2203
The framework has been updated after ChillyWilly's request.

Full changelog , can be found here ->
http://www.neoflash.com/forum/index.php/topic,5760.msg40724.html#msg40724


Changes from v2.7.7.7 [10/10/09] to 2.8.8.8[15/12/09]
15  / DEC / 09
->Implemented ChillyWilly's SRAM 68K CPU opcode patching(Also supports Sega CD image using stack patch).
->Version codename changed to : v2.8.8.8
->A quick change in contributors.txt


Downloads (source only for now!!)
See attachment in first post or get source from here ->
http://www.neoflash.com/forum/index.php?action=dlattach;topic=5760.0;attach=2264


ChillyWilly , as usual , compile SMDTool using the makefile in  SMDTool directory. ~sm-37.gif~

Offline ChillyWilly

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1753
  • Just a coding machine.
Thanks!  ;D

Offline sonic2099

  • Newbie
  • *
  • Posts: 1
  • NEO newbie
Okay people, I made a 32 bit binary with my machine. I am running Ubuntu 10.04. I don't know a lot about programming or compiling so I'll explain how I did it and print the console output for if you need to track down something. It was a quite simple thing to do anyway and I'm sure most of you already did it.

1. I downloaded the source opengeniefw2.8.8.8.tar.gz (SMDTool v1.1.2.0)
2. I extracted the directories SMDTool and framework to a folder in my sistem
3. I got into the SMDTool extracted directory via console
4. sudo make
output:
Code: [Select]
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/bit_field.o ../framework/bit_field.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/checksum_patcher.o ../framework/checksum_patcher.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/directory_iterator.o ../framework/directory_iterator.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/fmt_bin.o ../framework/fmt_bin.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/fmt_multidoctor.o ../framework/fmt_multidoctor.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/fmt_smd.o ../framework/fmt_smd.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/framework.o ../framework/framework.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/game_genie.o ../framework/game_genie.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/html_gen.o ../framework/html_gen.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/ips_patcher.o ../framework/ips_patcher.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/logger.o ../framework/logger.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/memory_patcher.o ../framework/memory_patcher.c
../framework/memory_patcher.c: In function ‘patchRomSRAM68KOpcode’:
../framework/memory_patcher.c:267: warning: cast from pointer to integer of different size
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/raw_patchfile.o ../framework/raw_patchfile.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/rom.o ../framework/rom.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/rom_writter.o ../framework/rom_writter.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/stack_patch.o ../framework/stack_patch.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o ../framework/util.o ../framework/util.c
gcc  -I/../framework/ -lm -lc -O3 -fomit-frame-pointer -c -o main.o main.c
cc -o smdtool  ../framework/bit_field.o ../framework/checksum_patcher.o ../framework/directory_iterator.o ../framework/fmt_bin.o ../framework/fmt_multidoctor.o ../framework/fmt_smd.o ../framework/framework.o ../framework/game_genie.o ../framework/html_gen.o ../framework/ips_patcher.o ../framework/logger.o ../framework/memory_patcher.o ../framework/raw_patchfile.o ../framework/rom.o ../framework/rom_writter.o ../framework/stack_patch.o ../framework/util.o main.o
5. voilá I got the smdtool 32 bit binary

Output of gcc -v on my machine
Code: [Select]
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)

I needed this program to convert a rom from .gen format to .bin, and this was the only place to get it I could find. Since the binaries provided only work on 64 bit systems I thought it would be nice from me to upload a 32 bit version if I could get one. If this post is out of place please mods feel free to delete it, and sorry. If it helps anyone there you go!
Bye

Offline Conle

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2203
Thanks for providing a 32bit binary since i can't provide it by myself(running 64bit distro) without alot of effort  ::sm-26.gif::
Anyway, this tool is quite old now...i've moved the code into the plugin , and fixed a few things in the framework aswell.  ~sm-69.gif~.gif

So.....Feel free to do whatever you wish with the source  :)