CHD to G-Net

virtvic

The Cabaret King
Feedback
21 (96%)
Credits
2,012CR
I have recently got a Taito G-Net motherboard with a modded bios that allows use of games on a CF card inserted into a PCMCIA card, which the motherboard uses.

I have managed to flash some cards (SanDisk only, out of the 3 different brands I have)

The game images come from CHD files.

The program I am using to flash the cards with the game images is called G-Net Flasher and has successfully flashed 4 games (Kollon, both Psyvariars and Super Puzzle Bobble)

All the games I have tried to flash load up ok on the motherboard, but then keep restting back to the G-Net splash screen and the screen that says it is preparing. It loops this on and on.

I presume the CHDs I am using have been modified in some way to be used with Mame?

I have tried using CHDMAN to return them to their original state, but keep getting UNSUPPORTED CHD errors on all the CHD files, even the ones that work.

Abyone got an ideas, or know where I can get the original CHD dumps?

Cheers

V
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
I'm wondering if the flasher patches the CHD bins whilst uploading. Having a redumped CHD to the flasher author pretty much guarantees that the bin patches will now write to the wrong offsets and cause problems.

Is there any functionality in chdman that will let you generate a hash of the CHD and compare this to a known list so you can determine what version CHD you have?
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
Plus, dumping a working CF game and then doing a binary compare to the CHD might give some useful input to whether the flasher does indeed patch. If so, you know you have to hunt down the versions the tool author had.
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
Sorry for all of my one liner replies over the forum last night. Stink had nicked my iPad to play Zombies vs Plants (which is THE best game of all time) so I was typing on my iPhone.

Vic - can you see your way to providing me with a copy of the flasher tool? Having looked at all the options I'm going to see if I can determine whether the flasher patches the CHD as it's uploaded to CF. I've got a strong feeling it may do so (it's feasible as there are only a handful of games for g-net) and the likely patch method will be entirely dependent on fixed file offsets, so if you have different redumps you get the problem I mentioned before of writing crap to parts of the image.
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
Right. I grabbed the flasher but it's crapping out on Win7 x64. I'll spinup a 32bit VM and try it under that.

Could you run chdman in a command prompt and let me know what version it outputs?
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
Right. I seem to have got it working. I've not got a CF card plugged into my multi-reader so it's not showing a target but I'll go in the loft and find one now.

I've got the links to the CHDs so what I'm going to do is flash a card with one CHD, then dump it off the card using something which will do raw reads from the card (so no translation or modification) and then compare it to the source CHD.

I'm betting I'll see some differences, so I'll do the same for another CHD and see if the patches are at the same addresses - if so it's probably patching out some kind of media sense check by NOPing a jump-after-test sequence which is standard code linked into each game dump.

If there aren't any differences in the CHD/CF image then I'm not sure where to go from that :) Or if there are changes between the CHD/CF images but at varying addresses per game, then we know it's CHD version dependant and it just comes down to finding the dump versions that the flasher tool expects.

At some point I'm going to try really hard to twist your arm to borrow your g-net for a weekend so I can dump the modified BIOS :) And if I can find a Taito flasher-card then I'll see if there is any way of reproducing this so that the playing field is level and people aren't forced to pay a couple of hundred quid just to play the dumps.

I'll report back this weekend as I've got free days - w000t!
 

virtvic

The Cabaret King
Feedback
21 (96%)
Credits
2,012CR
Tim - you are speaking in backward Japanese to me! If you talk in threads and thousanths of inches I'll understand you
smiley36.gif


I may be coming up to the midlands fairly soon, so I'd drop the board in at some point for dumping purposes.

Keep up the good (I can't do) work!
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
Heh. Basically I'm trying to determine whether the hacked g-net BIOS relies upon the game ROM image being modified in some way. On most systems all executables start with a standard bit of code (for that system) which defines things like which chunks are data, code, space for variables and so on. Often you'll find extra code tacked on, and in this instance it could be a check where the code calls for the media type of the inserted device, compares it to some known values and then makes a "run game" or "show error" decision.

For example, I believe the Naomi system has standard code as part of the linker (the bit of programming software that pulls all the compiled code together and makes an executable image) that asks the CDROM for a media sense check. This asks the drive firmware to send a value back indicating what type of media is inserted. A pressed-CD might have a media code of 0x01, a CDR of 0x02 and so on. The Naomi boot-up code will ask the drive for the media type and then only continue if it sees a return of 0x01 to indicate a proper, pressed CD. If a CDR is in use, the code sees this, thinks "juarez monkey!" and then crashes.

It's quite possible the g-net is doing a similar thing, so it could be that the flasher software is patching this media check out.

It also could be that this code is always found in the same place on all g-net ROM images, perhaps at the start of the file, or it could be that the code changes place and is unique for each game title.

So if the flasher tool is indeed patching out a media check test and the media check code is in a fixed location then the flasher knows to patch a fixed offset inside each ROM image to jump over the media check code.

The problem lies in the other scenario - the code to check media is in a different location for each game. In this case, the flasher needs to identify what the game is so it knows which locations it needs to modify to patch out the check. If there were 2 versions of a game released and the code changed place between the two versions, the flasher will work fine with the CHD ROM image the author had on hand to test, but on the other version it'll patch what it thinks is the media check, but in reality it'll be writing crap into another bit of the ROM image. So either the media check isn't disabled and it refuses to load, or the flasher patches another bit of essential code which then crashes as its had random data punched into it by the flasher tool.

So all I'm really doing at this stage is trying to figure out if the flasher is intelligent or whether it just writes the file out to CF.

I'll know it's intelligent if the image dumped from CF is different to the CHD ROM image - this implies the patcher is modifying the CHD ROM image and not just copying it to CF. And I can tell if it's game-specific intelligent if I repeat this test with different games and find that the changed locations are different too - this implies that the code which needs patching changes location for each game. This is the trickier scenario as you either need to find the CHD that the flasher dev had to hand when he wrote the tool, or you need to determine what the patching does and then find a way of patching the appropriate location for the new CHD ROM image that you have.

If you don't follow any of that lmk - I'm hoping to explain what I'm doing and why so that people can learn from this, instead of just needing me to hack the images like some magic black box. Share the knowledge and we all benefit!

Edited for grammar :(trmatthe2010-08-07 21:45:50
 

virtvic

The Cabaret King
Feedback
21 (96%)
Credits
2,012CR
I sort of understand that - it seems to make sense.

I would have no idea about how to change the chds though.

I can, of course try different things out with the g-net motherboard to see if we can crack this thing.

I'm hoping to get up to the midlands for a few things this month sometimes, so I could drop the board in for you to dump the bios?
 
Top