trying to convert .rom into .cas with a bash script

페이지 1/3
| 2 | 3

By nitrofurano

Champion (287)

nitrofurano의 아바타

01-05-2016, 22:33

i'm now trying to convert .rom files into .cas using a bash script
http://pastebin.com/raw/ceRtUist
this script, for now, only converts 32kb rom files (it’s just a bunch of dd, echo xxd and printf)
the ansi-basic part seems to run fine, and seems to load both 16k splits, but it’s not running the loaded files in the end - and the .cas file seems to look fine when opened in a hex editor
what i might be doing wrong there?

Login or 등록 to post comments

By Manuel

Ascended (15686)

Manuel의 아바타

01-05-2016, 22:39

Take a look at Python for doing such things Tongue

By nitrofurano

Champion (287)

nitrofurano의 아바타

01-05-2016, 22:41

i was about going to Python then, but i wonder why this Bash script isn’t working 100% fine as i was expecting... :S

By nitrofurano

Champion (287)

nitrofurano의 아바타

02-05-2016, 11:42

now i tried this one, still doesn’t work as well... http://pastebin.com/raw/AmRGbX72 (i don’t know if the problem is in the ldir routines, in on the .cas structure that i might written bytes in the wrong places, or both)

By cax

Prophet (3722)

cax의 아바타

02-05-2016, 20:23

Wild guesses:
- wrong memory mapping during loading or game startup
- game copy protection (game works in ROM but not in RAM)
- disabling and enabling interrupts in right places during loading and startup

You also may try WAVer or MicroWAVeR for conversion.
One of them has open source code.

By nitrofurano

Champion (287)

nitrofurano의 아바타

03-05-2016, 00:35

thanks!
and where can we find WAVer and MicroWAVeR?

By nitrofurano

Champion (287)

nitrofurano의 아바타

03-05-2016, 00:55

btw, is there any list showing which roms has this “copy protection”? (btw, i guess that getting an md5sum comparison between the usual .rom files and their equivalent “floppy versions” (like from tosec/archive.org ) might help on this somehow?)

By cax

Prophet (3722)

cax의 아바타

03-05-2016, 07:08

MicroWAVer 0.91:
http://cax.narod.ru/msx/tools/mwaver.zip

Try to use command line version first - so you don't have to struggle with Visual Basic dependencies of the GUI launcher.
If you run it against ROM file, as a side effect (in addition to WAV file), it will create a packed self-extractable BLOAD-able version of the ROM (if the packed file is small enough). This should solve your problem at least partially, I suppose.

I took part in the microwaver project initiated by [WYZ] in 2005.
The development has stopped due to lack of time.
I have to say it could be implemented much better, so I am not proud of the code quality.
If I were doing it today, I would design and code it differently, maybe even in Python.

Here is the source anyway:
http://cax.narod.ru/msx/tools/mwaver-17_07_2005-src.zip

It was a long time ago and I don't remember everything about it, but you may ask anyway.

By nitrofurano

Champion (287)

nitrofurano의 아바타

03-05-2016, 16:17

thanks, @cax! i'm now downloading them! Smile

btw, in the meanwhile i could get some versions working: (i think it was the slot/ldir routines that were not working, i used now those from msxr2b)
8kb version: http://pastebin.com/raw/wivekr39
16kb version: http://pastebin.com/raw/bfyM79QG
(i will try 32kb version soon, hopefully will work fine as well - then i'll be curious about the 48kb version (quite popular from MSXDev entries) )

By nitrofurano

Champion (287)

nitrofurano의 아바타

03-05-2016, 17:38

and the 32kb version: http://pastebin.com/raw/i2ULSxHe (seems to work fine with non-konami roms, including my homebrew stuff)

By nitrofurano

Champion (287)

nitrofurano의 아바타

05-05-2016, 15:42

improved them a bit (now we can enter command line arguments):
8kb - http://pastebin.com/raw/81yyi8qZ
16kb - http://pastebin.com/raw/rf54WqbL
32kb - http://pastebin.com/raw/r9UkLrms

페이지 1/3
| 2 | 3