Videopac / Odyssey2 forum
September 21, 2019, 08:08:41 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: If you have some news and you want it to be shown here, pm Janzl!
 
   Home   arcade Help Login Register links videopac.nl  
Pages: [1]   Go Down
  Print  
Author Topic: Bread In The Sky: a Pick Axe Pete level editor  (Read 199 times)
Nesrocks
Trying to get the cartridge in...
*
Posts: 7



https://twitter.com/bitin
WWW
« on: September 10, 2019, 09:28:13 PM »

Here's the editor! Version 0.11
https://nesrocks.com/files/BreadInTheSky.zip

-------------------------------------------------
Original message:

Hey there guys, I've just recently bought myself an O2 along with several games! The odyssey2 was my first console back when I was 5 and my first game was Pick Axe Pete.
So I found out that it's an actually great game and I've been playing it a lot. My current record is 1398 points and I plan to improve it.

Anyway, I'm also really into romhacking, so I decided to see what I could find in the game's ROM. I managed to find where the level data is stored and even created a level editor for it. The thing is, when I run the modified ROM in O2em on windows it will run the game too slow. It doesn't seem to be going into euro mode, it seems to be doing something else. To me, it only makes sense that the emulator is doing a CRC check and since it doesn't recognize the rom, it is doing something different to it. The game will run in the normal speed if I set the emulator's speed limiter to about 140.

Any ideas how I can edit the ROM to make O2em run it at regular ntsc speed normally? I plan to release the editor once this has been sorted out. Thanks!

edit: I just tried something: whenever I edit even a single line in a single level the rom stops being recognized as "Pick Axe Pete!" on the emulator launcher, and it plays slow. But if I open the bad ROM on my editor and edit the level to look the same as the original game, then the launcher recognizes it and it plays at regular speed. So it probably is a crc thing. I wonder if it's okay to add 4 bytes at the end of the file to force the same crc after modification.

« Last Edit: September 18, 2019, 03:00:58 AM by Nesrocks » Logged
manopac
Game & App Development
Give this man a Jopac!
*
Posts: 1120



« Reply #1 on: September 11, 2019, 07:44:30 PM »

you can actually just change the XML file that comes with it - the games are recognized using the CRC, if you copy the part for Pick Ace Pete and use the setting then, it should work (or you can send me a PM and I will give you my email address - and I will sort it out for you ;-) maybe I have an idea to give you a command line that starts all your roms correctly ....)
Logged

sex, lies, and videopac
Nesrocks
Trying to get the cartridge in...
*
Posts: 7



https://twitter.com/bitin
WWW
« Reply #2 on: September 12, 2019, 12:21:57 AM »

I had never seen that file (btw, it's ini, not xml).

So, I've added an entry for the editted ROM just out of curiosity, and now the launcher recognizes the ROM with the name I set in the entry and all, but it still runs it too slow. Slower than euro mode even. I'll send you a pm!
Logged
manopac
Game & App Development
Give this man a Jopac!
*
Posts: 1120



« Reply #3 on: September 12, 2019, 04:18:19 AM »

I changed the ini file to XML from version 1.20 onwards - please use the latest version from this link:
http://videopac.nl/forum/index.php?topic=1771.0

(and I can't believe its almost 8 years since the last release ... time flies ;-) )

the problem with O2EM is that it uses hacks to make some games workable - all the hacks were hardcoded in earlier versions of O2EM based on the CRC of games - I changed it to be at least configureable in the XML file (and also on the command line) - if you look at the XML file for the PAP entry, you will see that it uses a different value than default for evblclk ... which is what you have to set for your roms too.

the easiest way is to just start o2em from the command line with
o2em -evblclk=12000
or
o2em -evblclk=12000 -euro

and then select your edited rom file. Alternatively you could use a config in the XML file that you create yourself that call "PAP" and put the parameters there (take a look how its done with "myConfig" - its basically the same)
Logged

sex, lies, and videopac
Nesrocks
Trying to get the cartridge in...
*
Posts: 7



https://twitter.com/bitin
WWW
« Reply #4 on: September 12, 2019, 04:50:22 AM »

That's interesting, thanks for all that info!
I'll be sure to try out all of that.

Probably though in my case, since I'm making a level editor which will generate ROMs with different CRCs every time, I'd want to insert a way to keep the same CRC to every generated ROM. Something that can be done by identifying unused bytes and correctly manipulating them (probably ideal, but harder), or doing the same but by appending bytes at the end of the ROM (not ideal, I guess, but easier). Calculating the CRC sounds like a very hard task for my abilities so far, but I'll try.

I'll edit or comment later with more results.
Logged
manopac
Game & App Development
Give this man a Jopac!
*
Posts: 1120



« Reply #5 on: September 12, 2019, 05:49:30 AM »

adding bytes at the end of the ROM is no good - then O2EM would identify them as not correct ROMs because of wrong size (mutlitudes of 2048) - you could try making a 4096 byte ROM out of it, that should work ;-)

EDIT: sorry - 8192 instead of 4096 I meant ... unfortunately thats a bit complicated because of the way the O2 bankswitches ....
Logged

sex, lies, and videopac
Nesrocks
Trying to get the cartridge in...
*
Posts: 7



https://twitter.com/bitin
WWW
« Reply #6 on: September 12, 2019, 05:55:55 PM »

I'm almost there! Just one last thing to get it to work. I've posted it in the gamemaker forums. I know I'm crazy for making this editor using gamemaker language but it's what I'm familiar with. It may be just a math question though.

https://forum.yoyogames.com/index.php?threads/modify-a-buffer-but-keep-the-crc32-hash.67385/

Basically I don't understand the "inverse(x32)" on step 4 of this thread:
https://stackoverflow.com/questions/48247647/how-do-i-modify-a-file-while-maintaining-its-crc-32-checksum/48248530#48248530

"Step four, and this is a bit funky so see below, perform an inverse CRC32 calculation:
currentvalue * inverse(x32) mod crc_poly = 0xe4c7d232"

What does "inverse(x32)" mean?

If this is sorted out the editor will generate valid roms for the three versions of pick axe pete roms. Pal, plus pal and plus ntsc.
« Last Edit: September 12, 2019, 09:54:07 PM by Nesrocks » Logged
manopac
Game & App Development
Give this man a Jopac!
*
Posts: 1120



« Reply #7 on: September 13, 2019, 09:09:37 AM »

maybe this one will help you ?
http://www.danielvik.com/2010/10/calculating-reverse-crc.html
Logged

sex, lies, and videopac
Rafael
Pedit5
I'd sell my mother for a Videopac
*
Posts: 2468



« Reply #8 on: September 13, 2019, 09:30:27 PM »

A long time ago, about 15 years ago, I found a Pick Ax Pete Level Editor, unfortunately I ended up losing it with an old broken PC.
Logged
Nesrocks
Trying to get the cartridge in...
*
Posts: 7



https://twitter.com/bitin
WWW
« Reply #9 on: September 13, 2019, 09:54:45 PM »

Yeah, I found your post mentioning that, but it was the only evidence of its existence that I could find using google. You wouldn't by any chance recall if it kept the crc after editing would you? My editor is 100% working already (for the VP PAL ROM), the only problem is the emulation not recognizing the CRC.
Logged
Rafael
Pedit5
I'd sell my mother for a Videopac
*
Posts: 2468



« Reply #10 on: September 14, 2019, 06:34:37 PM »

Unfortunately I do not remember. Actually, I didn't even verify this. Cry
Logged
Nesrocks
Trying to get the cartridge in...
*
Posts: 7



https://twitter.com/bitin
WWW
« Reply #11 on: September 16, 2019, 05:12:57 PM »

An user at the GM forums has converted the python script into GML so now I can finally generate a ROM with the same CRC, but after talking to manopac I'm not sure anymore of how to proceed. I think I'll give the user the option to keep the ROM's CRC32 or not when saving after editing. Also, I'll add a help section that instructs what to do regarding the CRC option in the case of emulation (O2em launcher problems, command line options) and in the case of generating a rom for EPROM burning (preferably don't select to keep the CRC in this case).
« Last Edit: September 16, 2019, 06:25:21 PM by Nesrocks » Logged
Nesrocks
Trying to get the cartridge in...
*
Posts: 7



https://twitter.com/bitin
WWW
« Reply #12 on: September 17, 2019, 07:55:14 PM »

Okay, I have a version ready for public testing. For now it always forces the CRC to match the rom type, there's no option to have a "natural" CRC yet.

Can anyone test this? And please tell me if my wording is correct throughout the editor, I'm not that familiar with the O2 yet so something may be wrong.

edit: link in the original post.
« Last Edit: September 18, 2019, 05:25:20 AM by Nesrocks » Logged
Rafael
Pedit5
I'd sell my mother for a Videopac
*
Posts: 2468



« Reply #13 on: September 19, 2019, 01:12:50 AM »

 Cool Cool
Thanks. IŽll be checking Wink
« Last Edit: September 20, 2019, 04:10:54 AM by Rafael » Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!