HELP WANTED: MRA file converter for MiST

https://github.com/mist-devel/mist-board/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Moderator Team

Post Reply
brunosilva
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 132
Joined: Mon Apr 09, 2018 10:58 pm

Re: HELP WANTED: MRA file converter for MiST

Post by brunosilva »

sebdel wrote:
brunosilva wrote: i talking about this: <rom index="0" zip="amidar.zip|amidars.zip" md5="22506edd9fb15fc2f5608c0174217753" type="merged|split|nonmerged">
Why choose xml if you're going to put collections in strings... anyway, sure, I'll support that.
its how its implemented in mister :)
brunosilva
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 132
Joined: Mon Apr 09, 2018 10:58 pm

Re: HELP WANTED: MRA file converter for MiST

Post by brunosilva »

slingshot wrote:
brunosilva wrote: Name isnt yet in arc files in repo. it's already supported? do we need a firmware/core update?
Yes, firmware update + some core updates will needed. Actually they're in the source repos already. Probably will make releases at the weekend.
There won't be ARC files in the repos: both ROMs and ARCs could be generated from MRAs.
mist cores will have the same rom file "layout" as mister? so i can use alternatives i do for mister in mist?
I don't know - I noticed Scramble layout for example was changed in MiSTer. I won't follow it.
Mappy and Green Beret use the same.
about arc, yes - they will not be in repo and will be created trhu mra - i was looking at old arc in repo
about cores, i will compile cores and check
about firmware, new sources also in repo? if so, i will try to compiled them (dont have yet this setup in my machine)
about mra, i will you mist mra layout to create hacks and alternative versions to core
slingshot
Atari God
Atari God
Posts: 1833
Joined: Mon Aug 06, 2018 3:05 pm

Re: HELP WANTED: MRA file converter for MiST

Post by slingshot »

brunosilva wrote: about firmware, new sources also in repo? if so, i will try to compiled them (dont have yet this setup in my machine)
Yes, it is. Would be good to test it before release, so go ahead!
User avatar
jotego
Captain Atari
Captain Atari
Posts: 227
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

Re: HELP WANTED: MRA file converter for MiST

Post by jotego »

I also need the dual zip feature to load unmerged rom sets. For instance:

Code: Select all

<misterromdescription>
    <name>Ghouls'n Ghosts (USA)</name>
    <setname>ghoulsu</setname>
    <year>1988</year>
    <manufacturer>Capcom</manufacturer>
    <rbf>jtcps1</rbf>
    <rom index="0" zip="ghouls.zip|ghoulsu.zip" md5="b3d6ca2a35aa8702e361ed06d23b77c4" type="merged|nonmerged">
        <!-- maincpu -->
        <group width="16">
            <part name="dmu_30.10j" crc="cee8ceb5"/>
            <part name="dmu_29.10h" crc="334d85b2"/>
       </group>
        <group width="16">
            <part name="dmu_28.9j" crc="94aae205"/>
            <part name="dmu_27.9h" crc="4a524140"/>
       </group>
        <part name="dm-17.7j" crc="3ea1b0f2" pattern ="10"/>
        <!-- audiocpu -->
        <part name="26.10a" crc="3692f6e5"/>
        <!-- oki -->
        <part repeat="262144">FF</part>
        <!-- gfx -->
        <group width="64">
            <part name="dm-05.3a" crc="0ba9c0b0" pattern="01"/>
            <part name="dm-07.3f" crc="5d760ab9" pattern="01"/>
            <part name="dm-06.3c" crc="4ba90b59" pattern="01"/>
            <part name="dm-08.3g" crc="4bdee9de" pattern="01"/>
       </group>
        <group width="64">
            <part name="09.4a" crc="ae24bb19" />
            <part name="18.7a" crc="d34e271a" />
            <part name="13.4e" crc="3f70dd37" />
            <part name="22.7e" crc="7e69e2e6" />
            <part name="11.4c" crc="37c9b6c6" />
            <part name="20.7c" crc="2f1345b4" />
            <part name="15.4g" crc="3c2a212a" />
            <part name="24.7g" crc="889aac05" />
       </group>
        <group width="64">
            <part name="10.4b" crc="bcc0f28c" />
            <part name="19.7b" crc="2a40166a" />
            <part name="14.4f" crc="20f85c03" />
            <part name="23.7f" crc="8426144b" />
            <part name="12.4d" crc="da088d61" />
            <part name="21.7d" crc="17e11df0" />
            <part name="16.4h" crc="f187ba1c" />
            <part name="25.7h" crc="29f79c78" />
       </group>
       <!-- CPS-B config for ghoulsu --> 
       <part> 30 08 04 02 30 2E 2C 2A 28 26 FF FF FF FF 00 FF </part>
    </rom>
</misterromdescription>
Is the md5sum calculated now as the plain continuum of input files in the listed order? Is that the same as in MiSTer? I am now creating all MRA files with a small C program feeding from MAME source files, so I need to include the md5sum calculation in it. If I want to force the CRC file selection, can I use a dummy file name?
--
Source code of all my cores here.
My Patreon page here.
sebdel
Captain Atari
Captain Atari
Posts: 232
Joined: Fri Dec 30, 2005 9:29 am

Re: HELP WANTED: MRA file converter for MiST

Post by sebdel »

jotego wrote:I also need the dual zip feature to load unmerged rom sets. For instance:

Code: Select all

<misterromdescription>
    <name>Ghouls'n Ghosts (USA)</name>
    <setname>ghoulsu</setname>
    <year>1988</year>
    <manufacturer>Capcom</manufacturer>
    <rbf>jtcps1</rbf>
    <rom index="0" zip="ghouls.zip|ghoulsu.zip" md5="b3d6ca2a35aa8702e361ed06d23b77c4" type="merged|nonmerged">
        <!-- maincpu -->
        <group width="16">
            <part name="dmu_30.10j" crc="cee8ceb5"/>
            <part name="dmu_29.10h" crc="334d85b2"/>
       </group>
        <group width="16">
            <part name="dmu_28.9j" crc="94aae205"/>
            <part name="dmu_27.9h" crc="4a524140"/>
       </group>
        <part name="dm-17.7j" crc="3ea1b0f2" pattern ="10"/>
        <!-- audiocpu -->
        <part name="26.10a" crc="3692f6e5"/>
        <!-- oki -->
        <part repeat="262144">FF</part>
        <!-- gfx -->
        <group width="64">
            <part name="dm-05.3a" crc="0ba9c0b0" pattern="01"/>
            <part name="dm-07.3f" crc="5d760ab9" pattern="01"/>
            <part name="dm-06.3c" crc="4ba90b59" pattern="01"/>
            <part name="dm-08.3g" crc="4bdee9de" pattern="01"/>
       </group>
        <group width="64">
            <part name="09.4a" crc="ae24bb19" />
            <part name="18.7a" crc="d34e271a" />
            <part name="13.4e" crc="3f70dd37" />
            <part name="22.7e" crc="7e69e2e6" />
            <part name="11.4c" crc="37c9b6c6" />
            <part name="20.7c" crc="2f1345b4" />
            <part name="15.4g" crc="3c2a212a" />
            <part name="24.7g" crc="889aac05" />
       </group>
        <group width="64">
            <part name="10.4b" crc="bcc0f28c" />
            <part name="19.7b" crc="2a40166a" />
            <part name="14.4f" crc="20f85c03" />
            <part name="23.7f" crc="8426144b" />
            <part name="12.4d" crc="da088d61" />
            <part name="21.7d" crc="17e11df0" />
            <part name="16.4h" crc="f187ba1c" />
            <part name="25.7h" crc="29f79c78" />
       </group>
       <!-- CPS-B config for ghoulsu --> 
       <part> 30 08 04 02 30 2E 2C 2A 28 26 FF FF FF FF 00 FF </part>
    </rom>
</misterromdescription>
Is the md5sum calculated now as the plain continuum of input files in the listed order? Is that the same as in MiSTer? I am now creating all MRA files with a small C program feeding from MAME source files, so I need to include the md5sum calculation in it. If I want to force the CRC file selection, can I use a dummy file name?
The md5 is calculated while writing to the output file, so it's effectively equal to md5sum of the ROM file. So, not the same as Mister I'm afraid.
For individual part selection, crc and name are both optional (you need at least one). If you set both, crc has priority over name.

... and this:

Code: Select all

type="merged|nonmerged"
does nothing. Is it needed ?
User avatar
jotego
Captain Atari
Captain Atari
Posts: 227
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

Re: HELP WANTED: MRA file converter for MiST

Post by jotego »

I think I can ommit the md5 sum if all files are referenced to by CRC.

I don't know about that merge|unmerged thing. I think it is safe to ignore it.

How about the interleave element? I'd like to do things in a compatible way with MiSTer so there is a single .mra file for both MiSTer users and other platform users. Is it possible to rip MiSTer C code for that function?
--
Source code of all my cores here.
My Patreon page here.
brunosilva
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 132
Joined: Mon Apr 09, 2018 10:58 pm

Re: HELP WANTED: MRA file converter for MiST

Post by brunosilva »

about type="merged|nonmerged"

it was there for debug/info purposes... like other stuff in mra, from what i know, mister doesnt use it.

with crc and the possibility of having more than one zip file in zip="" i removed that info from files i created because with this merged|nonmerged|split sets are "supported" :)
brunosilva
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 132
Joined: Mon Apr 09, 2018 10:58 pm

Re: HELP WANTED: MRA file converter for MiST

Post by brunosilva »

slingshot wrote:
brunosilva wrote: about firmware, new sources also in repo? if so, i will try to compiled them (dont have yet this setup in my machine)
Yes, it is. Would be good to test it before release, so go ahead!
there is a branch robotron in your repo. it this one I should use?
about firmware, its from here? https://github.com/mist-devel/mist-firmware
sebdel
Captain Atari
Captain Atari
Posts: 232
Joined: Fri Dec 30, 2005 9:29 am

Re: HELP WANTED: MRA file converter for MiST

Post by sebdel »

jotego wrote:I think I can ommit the md5 sum if all files are referenced to by CRC.

I don't know about that merge|unmerged thing. I think it is safe to ignore it.

How about the interleave element? I'd like to do things in a compatible way with MiSTer so there is a single .mra file for both MiSTer users and other platform users. Is it possible to rip MiSTer C code for that function?
not really, the syntax is very similar (group = interleave, etc) but the logic is completely backward. I'm writing linearly and interleaving while reading. Mister does the opposite.

Code: Select all

<interleave output="32">
	<part name="spy-hunter_video_1fg_11-18-83.a7" map="0001"/>
	<part name="spy-hunter_video_0fg_11-18-83.a8" map="0001"/>
	<part name="spy-hunter_video_3fg_11-18-83.a5" map="0010"/>
	<part name="spy-hunter_video_2fg_11-18-83.a6" map="0010"/>
	<part name="spy-hunter_video_5fg_11-18-83.a3" map="0100"/>
	<part name="spy-hunter_video_4fg_11-18-83.a4" map="0100"/>
	<part name="spy-hunter_video_7fg_11-18-83.a1" map="1000"/>
	<part name="spy-hunter_video_6fg_11-18-83.a2" map="1000"/>
</interleave>
I'll port it though... it's just that how do you read this? I don't understand map.
brunosilva
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 132
Joined: Mon Apr 09, 2018 10:58 pm

Re: HELP WANTED: MRA file converter for MiST

Post by brunosilva »

maybe you should check https://github.com/MiSTer-devel/Main_Mi ... mutils.cpp (i think its there)
User avatar
jotego
Captain Atari
Captain Atari
Posts: 227
Joined: Wed May 04, 2016 10:02 am
Location: Valencia (Spain)
Contact:

Re: HELP WANTED: MRA file converter for MiST

Post by jotego »

sebdel wrote: I'll port it though... it's just that how do you read this? I don't understand map.
I don't understand it either. Maybe it'll be easier if you port the group element to the mister code!
--
Source code of all my cores here.
My Patreon page here.
sebdel
Captain Atari
Captain Atari
Posts: 232
Joined: Fri Dec 30, 2005 9:29 am

Re: HELP WANTED: MRA file converter for MiST

Post by sebdel »

slingshot wrote:Then <setname> would be good for both NAME= and the ROM's filename, too. Then MRAs can have long filename. And if there's no <setname> it can fall back to the MRA filename (for both NAME and ROM's filename).
Quick question: does it matter if the NAME written in the ARC file is in lower case? I'd rather create ROM files in lower case (still 8.3); but how do you want it in the ARC file?
brunosilva
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 132
Joined: Mon Apr 09, 2018 10:58 pm

Re: HELP WANTED: MRA file converter for MiST

Post by brunosilva »

fat32 isn't case sensitive and the tests i already did with rom files (before arc) told me the same (AAA.ROM or aaa.rom are the same for core)
sebdel
Captain Atari
Captain Atari
Posts: 232
Joined: Fri Dec 30, 2005 9:29 am

Re: HELP WANTED: MRA file converter for MiST

Post by sebdel »

brunosilva wrote:fat32 isn't case sensitive and the tests i already did with rom files (before arc) told me the same (AAA.ROM or aaa.rom are the same for core)
Thanks, lower case it is then.
slingshot
Atari God
Atari God
Posts: 1833
Joined: Mon Aug 06, 2018 3:05 pm

Re: HELP WANTED: MRA file converter for MiST

Post by slingshot »

sebdel wrote:
brunosilva wrote:fat32 isn't case sensitive and the tests i already did with rom files (before arc) told me the same (AAA.ROM or aaa.rom are the same for core)
Thanks, lower case it is then.
No, upper case. MiST's firmware does case sensitive matching, and the FS stores file name as uppercase. The file name case is not important (as the short name always stored as uppercase), but the NAME setting is.
sebdel
Captain Atari
Captain Atari
Posts: 232
Joined: Fri Dec 30, 2005 9:29 am

Re: HELP WANTED: MRA file converter for MiST

Post by sebdel »

slingshot wrote:
sebdel wrote:
brunosilva wrote:fat32 isn't case sensitive and the tests i already did with rom files (before arc) told me the same (AAA.ROM or aaa.rom are the same for core)
Thanks, lower case it is then.
No, upper case. MiST's firmware does case sensitive matching, and the FS stores file name as uppercase. The file name case is not important (as the short name always stored as uppercase), but the NAME setting is.
Got it. Pushed a new version, so now the NAME is in uppercase in the arc file but the actual file name is in lower case. <patch> is also supported, as well as zip="" with lists of zip files.
<interleave> is next.
brunosilva
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 132
Joined: Mon Apr 09, 2018 10:58 pm

Re: HELP WANTED: MRA file converter for MiST

Post by brunosilva »

@sedbel, did you implement the list of zip files here? or just in part? i think just in part

<rom index="0" zip="alienar.zip|alienaru.zip" md5="342b7d5d91dc2cd81f7f193b076555d2">
brunosilva
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 132
Joined: Mon Apr 09, 2018 10:58 pm

Re: HELP WANTED: MRA file converter for MiST

Post by brunosilva »

by the way, I just found out that there are setnames in mame with more than 8 chars :(

sinistar1, robotron87, robotron12,robotrontd
slingshot
Atari God
Atari God
Posts: 1833
Joined: Mon Aug 06, 2018 3:05 pm

Re: HELP WANTED: MRA file converter for MiST

Post by slingshot »

brunosilva wrote:by the way, I just found out that there are setnames in mame with more than 8 chars :(

sinistar1, robotron87, robotron12,robotrontd
Yepp, you must cut some chars from them (the first one was "scrambles" which I found).
sebdel
Captain Atari
Captain Atari
Posts: 232
Joined: Fri Dec 30, 2005 9:29 am

Re: HELP WANTED: MRA file converter for MiST

Post by sebdel »

brunosilva wrote:@sedbel, did you implement the list of zip files here? or just in part? i think just in part

<rom index="0" zip="alienar.zip|alienaru.zip" md5="342b7d5d91dc2cd81f7f193b076555d2">
No, I only did it for rom. I was under the impression that zip in part was deprecated.
Why? It's not working for you?

Re: setname. I cut them to 8 chars and replace a bunch of characters by '_':

Code: Select all

char bad_chars[] = " !@%^*~<>|:?'\"";
slingshot
Atari God
Atari God
Posts: 1833
Joined: Mon Aug 06, 2018 3:05 pm

Re: HELP WANTED: MRA file converter for MiST

Post by slingshot »

sebdel wrote: Re: setname. I cut them to 8 chars and replace a bunch of characters by '_':
Just robotron87, robotron12 and robotrontd will still reduced to robotron :) But it's not something you can or should care I think, just mentioned for noticing.
sebdel
Captain Atari
Captain Atari
Posts: 232
Joined: Fri Dec 30, 2005 9:29 am

Re: HELP WANTED: MRA file converter for MiST

Post by sebdel »

slingshot wrote:
sebdel wrote: Re: setname. I cut them to 8 chars and replace a bunch of characters by '_':
Just robotron87, robotron12 and robotrontd will still reduced to robotron :) But it's not something you can or should care I think, just mentioned for noticing.
bruno proposal is to take the last 8 chars but that would give botron87, botron12 and botrontd.
I think first 6 + last 2 would be fine. So, robotr87, robotr12 and robotrtd. It would be weird for things like scrambles -> scrambes. What do you think?
brunosilva
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 132
Joined: Mon Apr 09, 2018 10:58 pm

Re: HELP WANTED: MRA file converter for MiST

Post by brunosilva »

sebdel wrote:
slingshot wrote:
sebdel wrote: Re: setname. I cut them to 8 chars and replace a bunch of characters by '_':
Just robotron87, robotron12 and robotrontd will still reduced to robotron :) But it's not something you can or should care I think, just mentioned for noticing.
bruno proposal is to take the last 8 chars but that would give botron87, botron12 and botrontd.
I think first 6 + last 2 would be fine. So, robotr87, robotr12 and robotrtd. It would be weird for things like scrambles -> scrambes. What do you think?
for me last 8 chars or 6+2 is ok. i only need that they are not the same :)
brunosilva
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 132
Joined: Mon Apr 09, 2018 10:58 pm

Re: HELP WANTED: MRA file converter for MiST

Post by brunosilva »

sebdel wrote:
brunosilva wrote:@sedbel, did you implement the list of zip files here? or just in part? i think just in part

<rom index="0" zip="alienar.zip|alienaru.zip" md5="342b7d5d91dc2cd81f7f193b076555d2">
No, I only did it for rom. I was under the impression that zip in part was deprecated.
Why? It's not working for you?

Re: setname. I cut them to 8 chars and replace a bunch of characters by '_':

Code: Select all

char bad_chars[] = " !@%^*~<>|:?'\"";
nop. this zip part is where most of zip references are now :)
another example: https://github.com/MiSTer-devel/Arcade- ... Amidar.mra
slingshot
Atari God
Atari God
Posts: 1833
Joined: Mon Aug 06, 2018 3:05 pm

Re: HELP WANTED: MRA file converter for MiST

Post by slingshot »

sebdel wrote: bruno proposal is to take the last 8 chars but that would give botron87, botron12 and botrontd.
I think first 6 + last 2 would be fine. So, robotr87, robotr12 and robotrtd. It would be weird for things like scrambles -> scrambes. What do you think?
I don't think it's a problem. At the end, it's just the .ROM name (and displayed in the OSD vertical bar).
Post Reply

Return to “MiST”