Jump to content
IGNORED

Sprite extraction from a bin file for bB IDE?


Random Terrain

Recommended Posts

  • 3 months later...
Can someone make a program that can be used to extract sprites from a bin file to be saved in a format that the bB IDE Sprite Editor can load?

930386[/snapback]

 

Have you tried 2600GFX from Dan Borris Tech page ?, here is the link:Dan Borris tech page look for 2600GFX.zip or similar at about 1/2 way down the page on the left. if i remember correctly it can save graphics from a bin as a text file. so you should be able to use that as the 2600 ide reads text files.

 

RA

Link to comment
Share on other sites

Have you tried 2600GFX from Dan Borris Tech page ?, here is the link:Dan Borris tech page         look for 2600GFX.zip or similar at about 1/2 way down the page on the left. if i remember correctly it can save graphics from a bin as a text file. so you should be able to use that as the 2600 ide reads text files.

984144[/snapback]

Nope, I don't think so. I'll try it right now. Thanks.

 

Is that one of those programs that you have to start from the Run box or something? A black box pops up for a second, but nothing happens on my Windows XP computer when I open SHOWGFX.EXE. The README file isn't much help.

Edited by Random Terrain
Link to comment
Share on other sites

Have you tried 2600GFX from Dan Borris Tech page ?, here is the link:Dan Borris tech page        look for 2600GFX.zip or similar at about 1/2 way down the page on the left. if i remember correctly it can save graphics from a bin as a text file. so you should be able to use that as the 2600 ide reads text files.

984144[/snapback]

Nope, I don't think so. I'll try it right now. Thanks.

 

Is that one of those programs that you have to start from the Run box or something? A black box pops up for a second, but nothing happens on my Windows XP computer when I open SHOWGFX.EXE. The README file isn't much help.

984246[/snapback]

 

yeah, it is a command line program, basicly you type:

showgfx <romname.bin> <start of rom 0> <size of the rom (2,4,6,8,16,32)> txt file press enter and it will dump it to a Text file that you can edit.

 

 

for Example : showgfx space jocky 0 2096 >dump.txt

 

woiuld generate a text file named dump containing the entire rom file in text format you would then be able to go through it and cut out the sprites you want and open another instance of notepad and paste it in there save that file as somthing like: sprite1.spr and do that for every sprite you want. then when your done load it up with the sprite editor within the 2600 IDE.

 

if i can find my copy of RapidQ i will write a front end for it, so you can do the whole thing point and click style :), because i know you hate CLI programs.

 

RA

Link to comment
Share on other sites

if i can find my copy of RapidQ i will write a front end for it, so you can do the whole thing point and click style :), because i know you hate CLI programs.

984306[/snapback]

That would be cool. I hope you get a chance to do that. That would help a lot. Thanks.

Link to comment
Share on other sites

if i can find my copy of RapidQ i will write a front end for it, so you can do the whole thing point and click style :), because i know you hate CLI programs.

984306[/snapback]

That would be cool. I hope you get a chance to do that. That would help a lot. Thanks.

984315[/snapback]

 

No problem, i just like to help out when i can.

 

Okay, found my copy of rapidQ the program is almost complete should be done at about

1 PM today, gotta go to the store and shop for groceries, oh yeah doe's Atari Age Allow direct upload of zip files ?, if not i can host it on my webspace and i will shoot ya link.

 

RA

Link to comment
Share on other sites

Thanks for the program. It seems to work great. Is there any way to write a program that can convert the text file into spr files that the bB IDE Sprite Editor can load?

 

If that's not possible, maybe a program to get rid of the line numbers, the straight up and down lines (|), and convert the spaces to zeros and each X to a 1. Here's an example:

 

1900 |XXXXXXX |
1901 |XXXXXXXX|
1902 |XX    XX|
1903 |    XXXX|
1904 |XXXXXXXX|
1905 |  XXXXXX|
1906 |  X X XX|
1907 |XXX  XXX|
1908 |        |
1909 |XXXXXXX |
190a |XXXXXXXX|
190b |XX    XX|
190c |      XX|
190d |    XXXX|
190e |XXXXXXXX|
190f |  XXXXXX|
1910 |  X X XX|
1911 |XXX  XXX|
1912 |        |
1913 |XXXXXXX |
1914 |XXXXXXXX|
1915 |XX    XX|
1916 |      XX|
1917 |      XX|
1918 |    XXXX|
1919 |XXXXXXXX|
191a |  XXXXXX|
191b |  X X XX|
191c |XXX  XXX|

 

We would replace the first 6 characters on every line with the percent symbol (%), convert each space to a zero, replace each x with a 1, then delete the last vertical line and then we would get this:

 

%11111110
%11111111
%11000011
%00001111
%11111111
%00111111
%00101011
%11100111
%00000000
%11111110
%11111111
%11000011
%00000011
%00001111
%11111111
%00111111
%00101011
%11100111
%00000000
%11111110
%11111111
%11000011
%00000011
%00000011
%00001111
%11111111
%00111111
%00101011
%11100111

 

The last step might be to flip the whole thing upside down unless that should be the first step. A program could do the work much faster than a word processor.

Edited by Random Terrain
Link to comment
Share on other sites

yeah, i could probably get that done for ya :), let me fire the RapidQ program and see what text functions it has, it should be fairly easy to do.

 

I just checked yep, it can do it, so i will write the program to do that, then i can combine both the programs i wrote together in one easy to use interface. that way you only have to run one instead of two. be back in a little bit.

 

RA

Edited by Retro Archaeologist
Link to comment
Share on other sites

yeah, i could probably get that done for ya :), let me fire the RapidQ program and see what text functions it has, it should be fairly easy to do.

 

I just checked yep, it can do it, so i will write the program to do that, then i can combine both the programs i wrote together in one easy to use interface. that way you only have to run one instead of two. be back in a little bit.

984796[/snapback]

Cool! Thanks.

Link to comment
Share on other sites

just to let you know i have not forgot about ya, i am still working on the problem but i have hit a small snag, it seems that Rapid Q handles arrays in a strange ways, so i am having trouble getting my bubble sort routine to "Flip" the image upside down so it can just go straight in to bB's editor. that and for some reason files are not being read as i Expected when the arrays are defined and redimed.

 

so it may take me a little longer than i thought but i just wanted to let you know that i am working on a solution.

 

RA

Link to comment
Share on other sites

just to let you know i have not forgot about ya, i am still working on the problem but i have hit a small snag, it seems that Rapid Q handles arrays in a strange ways, so i am having trouble getting my bubble sort routine to "Flip" the image upside down so it can just go straight in to bB's editor. that and for some reason files are not being read as i Expected when the arrays are defined and redimed.

 

so it may take me a little longer than i thought but i just wanted to let you know that i am working on a solution.

985590[/snapback]

Thanks. I'll just be glad to have it no matter how long it takes. It will be a very useful tool.

Link to comment
Share on other sites

alright i am back, sorry about hte delay my boss had me working a little more than usual past couple of days :(.

 

i have not completely tested the program but it *should* work however if it doe's not then please let me know and i will see about getting it fixed. also i have included the source code for this program. so that others can modify it for thier own needs as they see fit.

 

well enough of my jabber jaw'n :), here you go.

 

 

 

RA

gfxtobbatari2.zip

Edited by Retro Archaeologist
Link to comment
Share on other sites

Thanks.

 

Also conversion of the whole file is not possible, so you have to convert on a single sprite basis only, i just can't seem to get it to convert all of the file becuase i cannot get the routine to tell the diffrence between sound data, code data from sprite data.

If we forget about making a file that is compatible with the batari Basic IDE Sprite Editor, can't we just do the replacing, stripping, and flipping to the whole converted file and let the user pick out the sprites and manually copy them from their favorite text program such as Notepad and paste them into a batari Basic program? Since most sprites are all clumped together, it wouldn't be that hard for people to do. Seems like it would save time and be less of a hassle.

Link to comment
Share on other sites

Thanks.

 

Also conversion of the whole file is not possible, so you have to convert on a single sprite basis only, i just can't seem to get it to convert all of the file becuase i cannot get the routine to tell the diffrence between sound data, code data from sprite data.

If we forget about making a file that is compatible with the batari Basic IDE Sprite Editor, can't we just do the replacing, stripping, and flipping to the whole converted file and let the user pick out the sprites and manually copy them from their favorite text program such as Notepad and paste them into a batari Basic program? Since most sprites are all clumped together, it wouldn't be that hard for people to do. Seems like it would save time and be less of a hassle.

987289[/snapback]

 

well i could rewrite it to ignore most of the non sprite data, if sprite data is consistently placed thorughout roms, meaning if the Sprites are in the same place in all roms every time then i could probably do that but i am not sure if it is.

 

also we do not need to worry about "Flipping" the data upside down becuase Attendos IDE doe's it for us. let me sit down and go throught the conversion subroutine and see if can get it to work with your appraoch.

 

may take me a day or so, becuase i am going to have to go through Rom files to see if the graphics are consistently in the same place, if they are i can and should be able to do the whole file at once. but just rememeber if the data makes no sense then most likely it is not a sprite and is probably sound data or somthing else. :)

 

okay, so you want the whole file in bBatari sprite format and you wanted it preflipped (Attendos ide will flip it, either way) so you can edit it before you load it.

 

oki doki, i will get on it today. :)

 

thanks for the feedback and the ideas :thumbsup:

 

RA

Link to comment
Share on other sites

Thanks for working on this. I forgot until I looked at my code that the start of each line needs a space, then the percent sign.

 

well i could rewrite it to ignore most of the non sprite data, if sprite data is consistently placed thorughout roms, meaning if the Sprites are in the same place in all roms every time then i could probably do that but i am not sure if it is.

987426[/snapback]

I think you might be trying to write too smart of a program.

 

So that I am perfectly clear, this is what I would do. I would use your original program that uses 2600GFX to output the text file. I would run Hack O Matic 2 or Bit Hacker and load the bin file since those programs make it much easier to recognize a sprite. I would find where the sprites were, look back at the text file and delete everything except for the sprites I am interested in, save the text file then run that text file through your second program that would convert each space to a zero, replace each x with a 1, replace the first 6 characters on every line with a space and the percent symbol (%), then delete the last vertical line.

 

I would then copy the text and paste it into whatever program I am working on in the bB IDE.

 

So to wrap this part up, your first program would produce a longer version of this:

 

1900 |XXXXXXX |
1901 |XXXXXXXX|
1902 |XX    XX|
1903 |    XXXX|
1904 |XXXXXXXX|
1905 |  XXXXXX|
1906 |  X X XX|
1907 |XXX  XXX|
1908 |        |
1909 |XXXXXXX |
190a |XXXXXXXX|
190b |XX    XX|
190c |      XX|
190d |    XXXX|
190e |XXXXXXXX|
190f |  XXXXXX|
1910 |  X X XX|
1911 |XXX  XXX|
1912 |        |

 

Your second program would produce a longer version of this:

 

 %11111110
 %11111111
 %11000011
 %00001111
 %11111111
 %00111111
 %00101011
 %11100111
 %00000000
 %11111110
 %11111111
 %11000011
 %00000011
 %00001111
 %11111111
 %00111111
 %00101011
 %11100111
 %00000000

 

I would copy it, paste it into a bB program and it would eventually look something like this rough incorrect example:

 

pup
s=pplayfy-1 : pspeed=8 : if !pfread(pplayfx,s) then dpy=0 : goto skipup
 dpx=0
 player0:
 %11111110
 %11111111
 %11000011
 %00001111
 %11111111
 %00111111
 %00101011
 %11100111
 %00000000
end
skipup
 return

pdown
 s=pplayfy+1 : pspeed=8 : if !pfread(pplayfx,s) then dpy=0 : goto skipdown
 dpx=0
 player0:
 %11111110
 %11111111
 %11000011
 %00000011
 %00001111
 %11111111
 %00111111
 %00101011
 %11100111
 %00000000
end
skipdown
 return

 

Of course, all of this would be unnecessary if we could hack the program called Bit Hacker so we could copy long strips of sprites right from it and paste them into a bB program complete with ones and zeroes and space and percent sign at the beginning of each line. I wonder if the programmer of it could do that:

 

http://www.atariage.com/forums/index.php?showtopic=56689

 

 

 

also we do not need to worry about "Flipping" the data upside down becuase Attendos IDE doe's it for us. let me sit down and go throught the conversion subroutine and see if can get it to work with your appraoch.

987426[/snapback]

I know that the IDE sprite editor flips it when adding the sprite to your code, but if you are adding the sprite code yourself without involving the sprite editor, don't you have to flip it yourself?

 

 

 

may take me a day or so, becuase i am going to have to go through Rom files to see if the graphics are consistently in the same place, if they are i can and should be able to do the whole file at once. but just rememeber if the data makes no sense then most likely it is not a sprite and is probably sound data or somthing else. :)

987426[/snapback]

If what I posted was useful, you may not have to do that.

 

Thanks again for working on this.

Edited by Random Terrain
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...