Language BasiEgaXorz
Date: | 05/22/05 |
Author: | Tulio Adriano |
URL: | n/a |
Comments: | 3 |
Info: | http://devster.retrodev.com/sega/basiegaxorz |
Score: | (3.00 in 40 votes) |
'**************************************************************************** '* This is a Demo of 99 Bottles written in BasiEgaXorz, a Basic based * '* language that compiles Sega Genesis Programs/Games. * '* * '* This demo includes full graphics using 3 Layers (ScrollA, ScrollB and * '* Sprites) and four 16 color pallettes. * '* * '* For more information about BasiEgaXorz, visit the Devster's website: * '* http://devster.retrodev.com/sega/basiegaxorz * '* * '* You can also download the ROM binary and play it on a Genesis emulator * '* (Gens/Kega) here: * '* http://www.seganet.com.br/backup/megadrive_files/megadrive_99bottles.zip * '* * '* Written by Tulio Adriano. Februrary 16, 2005. * '* * '* NOTE: Please respect all spaces before the command lines. * '**************************************************************************** OPTION TITLE, "99 BOTTLES OF BEER" Dim X as Integer Dim Y as Integer Dim X2 as Integer Dim Y2 as Integer Dim FatX as Integer Dim FatY as Integer Dim OffSet as Integer Dim SpriteBottle(99) as Integer Dim I as Integer Dim I2 as Integer Dim NwSprite as Integer Dim LastBottle as Integer LoadTiles Tiles, 16,256,0 LoadTiles Stars, 16,272,0 LoadTiles UpperTiles, 4,288,0 LoadTiles Bottle, 8,292,0 LoadTiles Box, 9,300,0 Pallettes PalletteTiles, 0,0,16 Pallettes PalletteBottle,1,0,16 Pallettes PalletteStars, 2,0,16 Pallettes PalletteBox, 3,0,16 Ink 0 OffSet = 256 SetGfxPlane SCROLL_B FatY = 0 Ink 2 For Y2 = 1 To 2 For X2 = 1 To 10 OffSet = 272 For X = 0 To 3 For Y = 0 To 3 DrawTile OffSet, X + FatX, Y + FatY OffSet++ Next Next FatX = FatX + 4 Next FatY = FatY + 4 FatX = 0 Next FatY = 8 Ink 0 For Y2 = 1 To 6 For X2 = 1 To 10 OffSet = 256 For X = 0 To 3 For Y = 0 To 2 DrawTile OffSet, X + FatX, Y + FatY OffSet++ Next OffSet++ Next FatX = FatX + 4 Next FatY = FatY + 3 FatX = 0 Next SetGfxPlane SCROLL_A OffSet = 288 Y = 7 FatX = 0 For X2 = 1 To 10 OffSet = 288 For X = 0 To 3 DrawTile OffSet, X + FatX, Y OffSet++ Next FatX = FatX + 4 Next For I = 99 To 80 Step - 1 SpriteBottle(I) = AddSprite(4,2) PropSprite SpriteBottle(I), 292, 1 FatX = (99 - I) * 16 MoveSprite SpriteBottle(I), FatX + 128, 32 + 128 Next X=10: Y=9: X2=30: Y2=14: GoSub DrawBox Ink 2 For I = 99 to 1 Step - 1 Locate 10,11 Print Str$(I) Locate 10,13 If I = 1 Then Print " bottle of beer" Else Print " bottles of beer" Locate 11,11 Print "on the wall!" Sleep 120 GoSub ClearBoxText Sleep 15 Locate 10,11 Print Str$(I) Locate 10,13 If I = 1 Then Print " bottle of beer!" Else Print " bottles of beer!" Sleep 120 GoSub ClearBoxText Sleep 15 Locate 10,11 If I = 1 Then Print "Take it down," Else Print "Take one down," Locate 11,11 Print "pass it arround!" For I2 = 1 To 32 ShiftSprite SpriteBottle(I), 0, 3 Sleep 1 Next For I2 = 1 To 110 ShiftSprite SpriteBottle(I), 3, 0 Sleep 1 Next FreeSprite SpriteBottle(I) If I > 1 Then If I > 20 Then NwSprite = I - 20 SpriteBottle(NwSprite) = AddSprite(4,2) PropSprite SpriteBottle(NwSprite), 292, 1 FatX = 20 * 16 MoveSprite SpriteBottle(NwSprite), FatX + 128, 32 + 128 LastBottle = I - 20 Else LastBottle = 1 End If For X = 1 to 16 For I2 = I - 1 To LastBottle Step - 1 ShiftSprite SpriteBottle(I2),-1, 0 Next Sleep 1 Next End If GoSub ClearBoxText Sleep 15 Next Locate 10,11 Print "No more bottles of" Locate 11,11 Print "beer on the wall." End DrawBox: SetGfxPlane SCROLL_B Ink 3 DrawTile 300, X, Y DrawTile 302, X, Y2 DrawTile 306, X2, Y DrawTile 308, X2, Y2 For I = Y + 1 To Y2 - 1 DrawTile 301, X, I Next For I = X + 1 To X2 - 1 DrawTile 303, I, Y Next For I = X + 1 To X2 - 1 DrawTile 305, I, Y2 Next For I = Y + 1 To Y2 - 1 DrawTile 307, X2, I Next For I2 = Y + 1 to Y2 - 1 For I = X + 1 To X2 - 1 DrawTile 304, I, I2 Next Next Return ClearBoxText: Locate 10,10 Print " " Locate 11,10 Print " " Return PalletteTiles: DATAINT $0AAA,$0EEE,$0CCC,$0AAA,$0888,$000E,$000A,$0008 ' Pallette: 0 DATAINT $0006,$0024,$0026,$0048,$0000,$0000,$0000,$0000 PalletteBottle: DATAINT $0EEE,$00EE,$00CC,$00AA,$0088,$0044,$008E,$006E ' Pallette: 1 DATAINT $006C,$004A,$0026,$0AEE,$0880,$0AA0,$0CC0,$0EE0 PalletteStars: DATAINT $0EEE,$0EEE,$0CCC,$0AAA,$0888,$0666,$0444,$0222 ' Pallette: 2 DATAINT $0000,$0ECC,$0EAA,$0E88,$0866,$0844,$0822,$0800 PalletteBox: DATAINT $0EEE,$00EE,$0E0E,$000E,$0EE0,$00E0,$0E00,$0888 ' Pallette: 3 DATAINT $0CCC,$0088,$0808,$0008,$0880,$0080,$0800,$0000 Tiles: DATALONG $BBBBBBBB ' Tile: 0 DATALONG $BAAAAAAA DATALONG $BA888888 DATALONG $BA888888 DATALONG $BA888888 DATALONG $BA888888 DATALONG $BA888888 DATALONG $BA888888 DATALONG $B9999999 ' Tile: 1 DATALONG $44444444 DATALONG $33333333 DATALONG $22222222 DATALONG $BBBBBBBB DATALONG $AAAAAAAA DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 ' Tile: 2 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $99999999 DATALONG $44444444 DATALONG $33333333 DATALONG $22222222 DATALONG $CCCCCCCC ' Tile: 3 DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $BBBBBBBB ' Tile: 4 DATALONG $AAAAAAAA DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $99999999 ' Tile: 5 DATALONG $44444444 DATALONG $33333333 DATALONG $22222232 DATALONG $BBBBB432 DATALONG $AAAAA432 DATALONG $88889432 DATALONG $88889432 DATALONG $88889432 ' Tile: 6 DATALONG $88889432 DATALONG $88889432 DATALONG $88889432 DATALONG $99999432 DATALONG $44444432 DATALONG $33333333 DATALONG $22222222 DATALONG $CCCCCCCC ' Tile: 7 DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $BBBBBBBB ' Tile: 8 DATALONG $AAAAAAAA DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $99999999 ' Tile: 9 DATALONG $44444444 DATALONG $33333333 DATALONG $22222222 DATALONG $BBBBBBBB DATALONG $BAAAAAAA DATALONG $BA888888 DATALONG $BA888888 DATALONG $BA888888 ' Tile: 10 DATALONG $BA888888 DATALONG $BA888888 DATALONG $BA888888 DATALONG $B9999999 DATALONG $44444444 DATALONG $33333333 DATALONG $22222222 DATALONG $CCCCCCCC ' Tile: 11 DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $BBBBB432 ' Tile: 12 DATALONG $AAAAA432 DATALONG $88888432 DATALONG $88888432 DATALONG $88888432 DATALONG $88888432 DATALONG $88888432 DATALONG $88888432 DATALONG $99999432 ' Tile: 13 DATALONG $44444432 DATALONG $33333333 DATALONG $22222222 DATALONG $BBBBBBBB DATALONG $AAAAAAAA DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 ' Tile: 14 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $99999999 DATALONG $44444444 DATALONG $33333333 DATALONG $22222232 DATALONG $CCCCCCCC ' Tile: 15 DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC DATALONG $CCCCCCCC UpperTiles: DATALONG $9999402B ' Tile: 0 DATALONG $889432BA DATALONG $89432BA8 DATALONG $9432BA88 DATALONG $432BA888 DATALONG $32BA8888 DATALONG $2BAAAAAA DATALONG $BBBBBBBB DATALONG $99999999 ' Tile: 1 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $AAAAAAAA DATALONG $BBBBBBBB DATALONG $99999999 ' Tile: 2 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $AAAAAAAA DATALONG $BBBBBBBB DATALONG $99999999 ' Tile: 3 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888889 DATALONG $88888894 DATALONG $AAAAAA43 DATALONG $BBBBB432 Bottle: DATALONG $000000CC ' Tile: 0 DATALONG $0000005C DATALONG $00000054 DATALONG $00000054 DATALONG $00000051 DATALONG $00000051 DATALONG $0000051B DATALONG $0000051B DATALONG $0000521B ' Tile: 1 DATALONG $0005321B DATALONG $0005321B DATALONG $0054321B DATALONG $0054321B DATALONG $0054321B DATALONG $0054321B DATALONG $0054321B DATALONG $0054321B ' Tile: 2 DATALONG $0054321B DATALONG $0054321B DATALONG $0054321B DATALONG $0054321B DATALONG $0054321B DATALONG $0054321B DATALONG $0054321B DATALONG $0054321B ' Tile: 3 DATALONG $0054321B DATALONG $0054321B DATALONG $0054321B DATALONG $0054321B DATALONG $0005521B DATALONG $00000555 DATALONG $00000000 DATALONG $CC000000 ' Tile: 4 DATALONG $C5000000 DATALONG $45000000 DATALONG $45000000 DATALONG $15000000 DATALONG $15000000 DATALONG $11500000 DATALONG $11500000 DATALONG $11250000 ' Tile: 5 DATALONG $11235000 DATALONG $11235000 DATALONG $11234500 DATALONG $11234500 DATALONG $11234500 DATALONG $11234500 DATALONG $11234500 DATALONG $11234500 ' Tile: 6 DATALONG $11234500 DATALONG $11234500 DATALONG $11234500 DATALONG $11234500 DATALONG $11234500 DATALONG $11234500 DATALONG $11234500 DATALONG $11234500 ' Tile: 7 DATALONG $11234500 DATALONG $11234500 DATALONG $11234500 DATALONG $11234500 DATALONG $11255000 DATALONG $55500000 DATALONG $00000000 Stars: DATALONG $88848868 ' Tile: 0 DATALONG $88858858 DATALONG $88868848 DATALONG $88878838 DATALONG $88888525 DATALONG $88885212 DATALONG $65432111 DATALONG $88885212 DATALONG $88888525 ' Tile: 1 DATALONG $88888838 DATALONG $88888848 DATALONG $88888858 DATALONG $67888868 DATALONG $88888878 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 ' Tile: 2 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88878765 DATALONG $88868888 DATALONG $88858888 DATALONG $88848888 ' Tile: 3 DATALONG $88838888 DATALONG $88525888 DATALONG $85212588 DATALONG $32111234 DATALONG $85212588 DATALONG $88525888 DATALONG $88838878 DATALONG $88888888 ' Tile: 4 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88876543 DATALONG $58888888 DATALONG $23456788 DATALONG $58888888 DATALONG $88888888 ' Tile: 5 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88887888 DATALONG $88886888 DATALONG $88885888 ' Tile: 6 DATALONG $88884888 DATALONG $88883888 DATALONG $88852588 DATALONG $88521258 DATALONG $43211123 DATALONG $88521258 DATALONG $88852588 DATALONG $88883888 ' Tile: 7 DATALONG $88884888 DATALONG $88885888 DATALONG $88886888 DATALONG $56787888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88488888 ' Tile: 8 DATALONG $88388888 DATALONG $85258888 DATALONG $52125888 DATALONG $21112345 DATALONG $52125888 DATALONG $85258888 DATALONG $88388888 DATALONG $88488888 ' Tile: 9 DATALONG $88588888 DATALONG $88688888 DATALONG $88788888 DATALONG $88876543 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 ' Tile: 10 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888888 DATALONG $45678888 DATALONG $88888888 DATALONG $88888888 DATALONG $88888885 ' Tile: 11 DATALONG $88888852 DATALONG $87654321 DATALONG $88888852 DATALONG $88888885 DATALONG $88788888 DATALONG $88688888 DATALONG $88588888 DATALONG $68888888 ' Tile: 12 DATALONG $78888888 DATALONG $88888888 DATALONG $88888888 DATALONG $67888888 DATALONG $88788888 DATALONG $88688887 DATALONG $88588888 DATALONG $88488888 ' Tile: 13 DATALONG $88388888 DATALONG $85258888 DATALONG $52125888 DATALONG $21112345 DATALONG $52125888 DATALONG $85258888 DATALONG $88388888 DATALONG $88488888 ' Tile: 14 DATALONG $88588888 DATALONG $88688888 DATALONG $78788888 DATALONG $68888888 DATALONG $58888888 DATALONG $48888888 DATALONG $38888888 DATALONG $25888888 ' Tile: 15 DATALONG $12588888 DATALONG $11234567 DATALONG $12588888 DATALONG $25887654 DATALONG $38888888 DATALONG $48888888 DATALONG $58888888 Box: DATALONG $88888888 ' Tile: 0 DATALONG $87777777 DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87EEEEEE ' Tile: 1 DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87EEEEEE ' Tile: 2 DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87EEEEEE DATALONG $87888888 DATALONG $77777777 DATALONG $88888888 ' Tile: 3 DATALONG $77777777 DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $EEEEEEEE ' Tile: 4 DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $EEEEEEEE ' Tile: 5 DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $EEEEEEEE DATALONG $88888888 DATALONG $77777777 DATALONG $88888888 ' Tile: 6 DATALONG $77777787 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $EEEEEE87 ' Tile: 7 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $EEEEEE87 ' Tile: 8 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $EEEEEE87 DATALONG $88888887 DATALONG $77777777
Download Source | Write Comment
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments
Thomas Winwood said on 02/02/07 09:25:34
I am deeply disappointed to note that the link to download the ROM binary is dead - could somebody provide a compiled ROM, that I might see this wonder?
anon said on 03/03/09 20:36:20
http://www.wikiupload.com/download_page.php?id=102692
Compiled ROM!
Pedro Correa said on 02/01/10 16:40:49