DoAnyBGS


First release: v1.0-25/06/2002
By Christophe Molon-Noblot
ximoon@voila.fr
http://www.ximoon.fr.st


About DoAnyBGS

DoAnyBGS is a win32 application created with Visual Basic 4.0. It is useful to create easily sprites of any size to many formats used in games and programs for TI-68k (92I,92II,92+,89,v200) calculators. It can create a BIN file (.bin), a HEADER (.h) or text data for C or ASM (a68k).

 
 
 

How To Use DoAnyBGS?

Well, it's very simple :o)

There are 5 frames:

Hmm... It's the About box... Not very useful if you want your sprites!

Here we are.

What's on this frame? 1 picture, 4 buttons, 2 groups of radio buttons, a checkbox, 2 info texts and 1 enabled text.

The 'Open' button enables you to open a picture. It must be a bitmap (.bmp) file, width under 240 pixels and height under 128 pixels, otherwise an error is displayed.
When you open a nice picture, its path is displayed in the uppest text box and the picture is loaded in the picture box.

The 'About' button... I just don't remember...

The 'Create' button creates the sprite when you have choosen a picture an set all the options.

The 'Close/Open Palette' button shows (or not) the palette frame.

The 'Sprite Name' text box contains... the name of your sprite... you can change it (here the name is 'sprite')

The first radio group enables you to choose the output format of your sprite. It depends on if you are doing a program in C, ASM, or if you just want a bin file. For a bin file a saving dialog box appears when you create the sprite, otherwise the text is displayed in the text frame.

The second radio group enables you to choose the kind of sprite you want, genlib, graphlib or masked-graphlib.
Here are some examples for a sprite in different formats.

Genlib ASM:
sprite:
 dc.b	16,1
 dc.w	$0000,$0000
 dc.w	$0180,$0180
 dc.w	$0E70,$0E70
 dc.w	$1008,$1008
 dc.w	$2004,$2004
 dc.w	$4182,$4182
 dc.w	$4002,$4002
 dc.w	$4002,$4002
 dc.w	$B3CD,$B3CD
 dc.w	$A185,$A185
 dc.w	$A665,$A665
 dc.w	$A665,$A665
 dc.w	$6006,$6006
 dc.w	$27E4,$27E4
 dc.w	$13C8,$13C8
 dc.w	$0C30,$0C30

Genlib C:
BGS sprite = {
	16,1,
{	0x0000,0x0000,
	0x0180,0x0180,
	0x0E70,0x0E70,
	0x1008,0x1008,
	0x2004,0x2004,
	0x4182,0x4182,
	0x4002,0x4002,
	0x4002,0x4002,
	0xB3CD,0xB3CD,
	0xA185,0xA185,
	0xA665,0xA665,
	0xA665,0xA665,
	0x6006,0x6006,
	0x27E4,0x27E4,
	0x13C8,0x13C8,
	0x0C30,0x0C30
}};

Graphlib ASM:
sprite_light:
 dc.w	16,2
 dc.b	$00,$00
 dc.b	$01,$80
 dc.b	$0E,$70
 dc.b	$10,$08
 dc.b	$20,$04
 dc.b	$41,$82
 dc.b	$40,$02
 dc.b	$40,$02
 dc.b	$B3,$CD
 dc.b	$A1,$85
 dc.b	$A6,$65
 dc.b	$A6,$65
 dc.b	$60,$06
 dc.b	$27,$E4
 dc.b	$13,$C8
 dc.b	$0C,$30

sprite_dark:
 dc.w	16,2
 dc.b	$00,$00
 dc.b	$01,$80
 dc.b	$0E,$70
 dc.b	$10,$08
 dc.b	$20,$04
 dc.b	$41,$82
 dc.b	$40,$02
 dc.b	$40,$02
 dc.b	$B3,$CD
 dc.b	$A1,$85
 dc.b	$A6,$65
 dc.b	$A6,$65
 dc.b	$60,$06
 dc.b	$27,$E4
 dc.b	$13,$C8
 dc.b	$0C,$30

Graphlib mask ASM:
sprite_light:
 dc.w	16,2
 dc.b	$00,$00
 dc.b	$01,$80
 dc.b	$0E,$70
 dc.b	$10,$08
 dc.b	$20,$04
 dc.b	$41,$82
 dc.b	$40,$02
 dc.b	$40,$02
 dc.b	$B3,$CD
 dc.b	$A1,$85
 dc.b	$A6,$65
 dc.b	$A6,$65
 dc.b	$60,$06
 dc.b	$27,$E4
 dc.b	$13,$C8
 dc.b	$0C,$30

 dc.b	$00,$00
 dc.b	$01,$80
 dc.b	$0E,$70
 dc.b	$10,$08
 dc.b	$20,$04
 dc.b	$41,$82
 dc.b	$40,$02
 dc.b	$40,$02
 dc.b	$BF,$FD
 dc.b	$BF,$FD
 dc.b	$BF,$FD
 dc.b	$BF,$FD
 dc.b	$7F,$FE
 dc.b	$3F,$FC
 dc.b	$1F,$F8
 dc.b	$0F,$F0

sprite_dark:
 dc.w	16,2
 dc.b	$00,$00
 dc.b	$01,$80
 dc.b	$0E,$70
 dc.b	$10,$08
 dc.b	$20,$04
 dc.b	$41,$82
 dc.b	$40,$02
 dc.b	$40,$02
 dc.b	$B3,$CD
 dc.b	$A1,$85
 dc.b	$A6,$65
 dc.b	$A6,$65
 dc.b	$60,$06
 dc.b	$27,$E4
 dc.b	$13,$C8
 dc.b	$0C,$30

 dc.b	$00,$00
 dc.b	$01,$80
 dc.b	$0E,$70
 dc.b	$10,$08
 dc.b	$20,$04
 dc.b	$41,$82
 dc.b	$40,$02
 dc.b	$40,$02
 dc.b	$BF,$FD
 dc.b	$BF,$FD
 dc.b	$BF,$FD
 dc.b	$BF,$FD
 dc.b	$7F,$FE
 dc.b	$3F,$FC
 dc.b	$1F,$F8
 dc.b	$0F,$F0

 

NOTE: since I just didn't know how a graphlib sprite looks like in C, I use a format that should not be the right one...

See the palette frame for informations about clors and mask.

You can move the frames by moving that one, use X/- to close or reduce the application... Perhaps you knew that...

The test box contains the sprite that was created if you used C or ASM format. You can copy the text and paste it into your source file or create a header file with the 'Create .h file' button.

Defaults are :

White = rgb(255,255,255)

Light Gray = rgb(192,192,192)

Dark Gray = rgb(128,128,128)

Black = rgb(0,0,0)

There are the color that are used most of time with paint, for example.
You can set other values with 'Palette' and 'Picture' buttons'. The fisrt one calls the Window's palette, the other makes you choose for a color in the picture, just click on the color you want on the picture.

For a sprite without mask, any color will be white but the Dark Gray, Light Gray and Black.
With a mask, it is the same, and White, Dark Gray, Light Gray and Black are masked, other colors are transparent.
(Those Dark Gray, Liht Gray, Black and White are any one you want, White can be red for example).

 


That's All!

Now you should be able to create your sprites...

And sorry for my poor English :p


Thanks To...

Patrick Pélissier for Genlib
The Doors Team for Graphlib
Charlie Gibbs, David Ellsworth and others for a68k
The Ti-Gcc Team for Ti-Gcc

And everybody who uses that program...