Codetapper's Amiga Site

Bubba 'n' Stix

Coder Mark Watson really went to town when he coded Bubba 'n' Stix. Level 1 in particular features an incredible amount of display effects going on.

Bubba 'n' Stix sprite layer

Bubba 'n' Stix sprite layer

Bubba 'n' Stix bitplane graphics

Bubba 'n' Stix bitplane graphics

Sprite usage

Sprites are used extensively, with sprite 7 being multiplexed across the screen to create the "mountain" layer in the background.

Bubba 'n' Stix sprite usage

Bubba 'n' Stix sprite usage

The screen is split into various sections, and sprites are used as follows:

  • Sprites 0-5 form the moon
  • Sprite 6 and 7 are used for the twinkling stars
  • Sprite 7 is then multiplexed across the entire screen with shades of blue to create the "mountain" layer
  • Sprites 0 and 1 are used to draw the red/brown character in the background (maximum of 2 of these, they move horizontally only)

In the main area of the screen, sprites are given the highest priority, so they obscure the background:

  • All 8 sprites are used to draw Bubba (depending on the width of his animation). Often only 4 sprites are needed.
  • The sprites use attached mode (each pair is positioned at the same co-ordinate), so this allows up to 15 colours.

At the bottom of the screen:

  • Sprites 0-2 are used to display the the score and energy
  • Sprite 3 is used for the life counter
  • Sprites 4-7 are used to draw Bubba's face (attached, so 15 colours)

16 colour mode and dual playfield?!

The display is mainly drawn in 4 bitplane (16 colour) mode. The bottom portion of the screen restricts the graphics to using the first 8 colours. This is because the game switches into dual playfield mode to draw some trees over the top of the display, and this transition would only be seemless if the graphics use 3 bitplanes.

When Bubba moves to the very bottom part of the map, the dual playfield layers switch priorities and another small selection of foliage is drawn on top of the trees.

Parallax trees layer 1

Parallax trees layer 1

Parallax trees layer 2

Parallax trees layer 2

Copperlist

The copperlist begins by setting up the palette and the display window:

$705B0: 0180 0000           ;COLOR00 = 0x0000
$705B4: 0182 0000           ;COLOR01 = 0x0000
$705B8: 0184 0410           ;COLOR02 = 0x0410
$705BC: 0186 0720           ;COLOR03 = 0x0720
$705C0: 0188 0A62           ;COLOR04 = 0x0A62
$705C4: 018A 0C82           ;COLOR05 = 0x0C82
$705C8: 018C 0050           ;COLOR06 = 0x0050
$705CC: 018E 0571           ;COLOR07 = 0x0571
$705D0: 0190 0BB1           ;COLOR08 = 0x0BB1
$705D4: 0192 0C40           ;COLOR09 = 0x0C40
$705D8: 0194 0C00           ;COLOR10 = 0x0C00
$705DC: 0196 0424           ;COLOR11 = 0x0424
$705E0: 0198 0636           ;COLOR12 = 0x0636
$705E4: 019A 000A           ;COLOR13 = 0x000A
$705E8: 019C 066F           ;COLOR14 = 0x066F
$705EC: 019E 0CCC           ;COLOR15 = 0x0CCC
$705F0: 008E 3094           ;DIWSTRT = 0x3094
$705F4: 0090 00B0           ;DIWSTOP = 0x00B0
$705F8: 0092 0038           ;DDFSTRT = 0x0038
$705FC: 0094 00C8           ;DDFSTOP = 0x00C8
$70600: 0108 007A           ;BPL1MOD = 0x007A
$70604: 010A 007A           ;BPL2MOD = 0x007A
$70608: 0100 4200           ;BPLCON0 = 0x4200
$7060C: 0102 0011           ;BPLCON1 = 0x0011
$70610: 00E0 0009           ;BPL1PTH = 0x0009
$70614: 00E4 0009           ;BPL2PTH = 0x0009
$70618: 00E8 0009           ;BPL3PTH = 0x0009
$7061C: 00EC 0009           ;BPL4PTH = 0x0009
$70620: 00E2 1044           ;BPL1PTL = 0x1044
$70624: 00E6 106C           ;BPL2PTL = 0x106C
$70628: 00EA 1094           ;BPL3PTL = 0x1094
$7062C: 00EE 10BC           ;BPL4PTL = 0x10BC
$70630: 0108 007A           ;BPL1MOD = 0x007A
$70634: 010A 007A           ;BPL2MOD = 0x007A
$70638: 01A2 0444           ;COLOR17 = 0x0444
$7063C: 01A4 0664           ;COLOR18 = 0x0664
$70640: 01A6 0334           ;COLOR19 = 0x0334
$70644: 01AA 0444           ;COLOR21 = 0x0444
$70648: 01AC 0664           ;COLOR22 = 0x0664
$7064C: 01AE 0334           ;COLOR23 = 0x0334
$70650: 01B2 0444           ;COLOR25 = 0x0444
$70654: 01B4 0664           ;COLOR26 = 0x0664
$70658: 01B6 0334           ;COLOR27 = 0x0334
$7065C: 01BA 0EC0           ;COLOR29 = 0x0EC0
$70660: 01BC 0EEE           ;COLOR30 = 0x0EEE
$70664: 01BE 0000           ;COLOR31 = 0x0000

PALETTE HERE

Now the 6 moon sprites and the 2 star sprites are setup:

$70668: 0120 000C 0122 F204 ;SPR0PT = 0x000CF204 - 1st moon sprite
$70670: 0124 000C 0126 F90C ;SPR1PT = 0x000CF90C - 2nd moon sprite
$70678: 0128 000D 012A 0014 ;SPR2PT = 0x000D0014 - 3rd moon sprite
$70680: 012C 000D 012E 071C ;SPR3PT = 0x000D071C - 4th moon sprite
$70688: 0130 000D 0132 0E24 ;SPR4PT = 0x000D0E24 - 5th moon sprite
$70690: 0134 000D 0136 152C ;SPR5PT = 0x000D152C - 6th moon sprite
$70698: 0138 000D 013A 1C34 ;SPR6PT = 0x000D1C34 - Stars
$706A0: 013C 000D 013E 233C ;SPR7PT = 0x000D233C - Stars
$706A8: 0104 0000           ;BPLCON2 = 0x0000
$706AC: 0080 0007 0082 203C ;COP1LC = 0x0007203C
$706B4: 0084 0007 0086 203C ;COP2LC = 0x0007203C

From vertical position $30 to $4d, the game changes colour 0 in the viewable area to create a gradient sky, and every 2 rows it also changes the palette of the moon graphics:

$706BC: 0001 FFFF           ;Skip if vpos >= 0x00 and hpos >= 0x00
$706C0: 01FE 0000           ;NO-OP = 0x0000 ******************HACKED***************
$706C4: 01A2 0B89           ;COLOR17 = 0x0B89
$706C8: 01A4 0E99           ;COLOR18 = 0x0E99
$706CC: 01AA 0B89           ;COLOR21 = 0x0B89
$706D0: 01AC 0E99           ;COLOR22 = 0x0E99
$706D4: 01B2 0B89           ;COLOR25 = 0x0B89
$706D8: 01B4 0E99           ;COLOR26 = 0x0E99
$706DC: 3049 FFFE           ;Wait for vpos >= 0x30 and hpos >= 0x48
$706E0: 0180 0F5F           ;COLOR00 = 0x0F5F
$706E4: 30D7 FFFE           ;Wait for vpos >= 0x30 and hpos >= 0xD6
$706E8: 0180 0000           ;COLOR00 = 0x0000
$706EC: 3149 FFFE           ;Wait for vpos >= 0x31 and hpos >= 0x48
$706F0: 0180 0F5F           ;COLOR00 = 0x0F5F
$706F4: 31D7 FFFE           ;Wait for vpos >= 0x31 and hpos >= 0xD6
$706F8: 0180 0000           ;COLOR00 = 0x0000
$706FC: 01A2 0B79           ;COLOR17 = 0x0B79
$70700: 01A4 0E89           ;COLOR18 = 0x0E89
$70704: 01AA 0B79           ;COLOR21 = 0x0B79
$70708: 01AC 0E89           ;COLOR22 = 0x0E89
$7070C: 01B2 0B79           ;COLOR25 = 0x0B79
$70710: 01B4 0E89           ;COLOR26 = 0x0E89
$70714: 3249 FFFE           ;Wait for vpos >= 0x32 and hpos >= 0x48
$70718: 0180 0F4F           ;COLOR00 = 0x0F4F
$7071C: 32D7 FFFE           ;Wait for vpos >= 0x32 and hpos >= 0xD6
$70720: 0180 0000           ;COLOR00 = 0x0000
$70724: 3349 FFFE           ;Wait for vpos >= 0x33 and hpos >= 0x48
$70728: 0180 0F4F           ;COLOR00 = 0x0F4F
$7072C: 33D7 FFFE           ;Wait for vpos >= 0x33 and hpos >= 0xD6
$70730: 0180 0000           ;COLOR00 = 0x0000
$70734: 01A2 0B69           ;COLOR17 = 0x0B69
$70738: 01A4 0E79           ;COLOR18 = 0x0E79
$7073C: 01AA 0B69           ;COLOR21 = 0x0B69
$70740: 01AC 0E79           ;COLOR22 = 0x0E79
$70744: 01B2 0B69           ;COLOR25 = 0x0B69
$70748: 01B4 0E79           ;COLOR26 = 0x0E79
$7074C: 3449 FFFE           ;Wait for vpos >= 0x34 and hpos >= 0x48
$70750: 0180 0F3F           ;COLOR00 = 0x0F3F
$70754: 34D7 FFFE           ;Wait for vpos >= 0x34 and hpos >= 0xD6
$70758: 0180 0000           ;COLOR00 = 0x0000
$7075C: 3549 FFFE           ;Wait for vpos >= 0x35 and hpos >= 0x48
$70760: 0180 0F3F           ;COLOR00 = 0x0F3F
$70764: 35D7 FFFE           ;Wait for vpos >= 0x35 and hpos >= 0xD6
$70768: 0180 0000           ;COLOR00 = 0x0000
$7076C: 01A2 0B59           ;COLOR17 = 0x0B59
$70770: 01A4 0E69           ;COLOR18 = 0x0E69
$70774: 01AA 0B59           ;COLOR21 = 0x0B59
$70778: 01AC 0E69           ;COLOR22 = 0x0E69
$7077C: 01B2 0B59           ;COLOR25 = 0x0B59
$70780: 01B4 0E69           ;COLOR26 = 0x0E69
$70784: 3649 FFFE           ;Wait for vpos >= 0x36 and hpos >= 0x48
$70788: 0180 0F2F           ;COLOR00 = 0x0F2F
$7078C: 36D7 FFFE           ;Wait for vpos >= 0x36 and hpos >= 0xD6
$70790: 0180 0000           ;COLOR00 = 0x0000
$70794: 3749 FFFE           ;Wait for vpos >= 0x37 and hpos >= 0x48
$70798: 0180 0F2F           ;COLOR00 = 0x0F2F
$7079C: 37D7 FFFE           ;Wait for vpos >= 0x37 and hpos >= 0xD6
$707A0: 0180 0000           ;COLOR00 = 0x0000
$707A4: 01A2 0B49           ;COLOR17 = 0x0B49
$707A8: 01A4 0E59           ;COLOR18 = 0x0E59
$707AC: 01AA 0B49           ;COLOR21 = 0x0B49
$707B0: 01AC 0E59           ;COLOR22 = 0x0E59
$707B4: 01B2 0B49           ;COLOR25 = 0x0B49
$707B8: 01B4 0E59           ;COLOR26 = 0x0E59
$707BC: 3849 FFFE           ;Wait for vpos >= 0x38 and hpos >= 0x48
$707C0: 0180 0F1F           ;COLOR00 = 0x0F1F
$707C4: 38D7 FFFE           ;Wait for vpos >= 0x38 and hpos >= 0xD6
$707C8: 0180 0000           ;COLOR00 = 0x0000
$707CC: 3949 FFFE           ;Wait for vpos >= 0x39 and hpos >= 0x48
$707D0: 0180 0F1F           ;COLOR00 = 0x0F1F
$707D4: 39D7 FFFE           ;Wait for vpos >= 0x39 and hpos >= 0xD6
$707D8: 0180 0000           ;COLOR00 = 0x0000
$707DC: 01A2 0B39           ;COLOR17 = 0x0B39
$707E0: 01A4 0E49           ;COLOR18 = 0x0E49
$707E4: 01AA 0B39           ;COLOR21 = 0x0B39
$707E8: 01AC 0E49           ;COLOR22 = 0x0E49
$707EC: 01B2 0B39           ;COLOR25 = 0x0B39
$707F0: 01B4 0E49           ;COLOR26 = 0x0E49
$707F4: 3A49 FFFE           ;Wait for vpos >= 0x3A and hpos >= 0x48
$707F8: 0180 0F0F           ;COLOR00 = 0x0F0F
$707FC: 3AD7 FFFE           ;Wait for vpos >= 0x3A and hpos >= 0xD6
$70800: 0180 0000           ;COLOR00 = 0x0000
$70804: 3B49 FFFE           ;Wait for vpos >= 0x3B and hpos >= 0x48
$70808: 0180 0F0F           ;COLOR00 = 0x0F0F
$7080C: 3BD7 FFFE           ;Wait for vpos >= 0x3B and hpos >= 0xD6
$70810: 0180 0000           ;COLOR00 = 0x0000
$70814: 01A2 0A39           ;COLOR17 = 0x0A39
$70818: 01A4 0D49           ;COLOR18 = 0x0D49
$7081C: 01AA 0A39           ;COLOR21 = 0x0A39
$70820: 01AC 0D49           ;COLOR22 = 0x0D49
$70824: 01B2 0A39           ;COLOR25 = 0x0A39
$70828: 01B4 0D49           ;COLOR26 = 0x0D49
$7082C: 3C49 FFFE           ;Wait for vpos >= 0x3C and hpos >= 0x48
$70830: 0180 0E0F           ;COLOR00 = 0x0E0F
$70834: 3CD7 FFFE           ;Wait for vpos >= 0x3C and hpos >= 0xD6
$70838: 0180 0000           ;COLOR00 = 0x0000
$7083C: 3D49 FFFE           ;Wait for vpos >= 0x3D and hpos >= 0x48
$70840: 0180 0E0F           ;COLOR00 = 0x0E0F
$70844: 3DD7 FFFE           ;Wait for vpos >= 0x3D and hpos >= 0xD6
$70848: 0180 0000           ;COLOR00 = 0x0000
$7084C: 01A2 0939           ;COLOR17 = 0x0939
$70850: 01A4 0C49           ;COLOR18 = 0x0C49
$70854: 01AA 0939           ;COLOR21 = 0x0939
$70858: 01AC 0C49           ;COLOR22 = 0x0C49
$7085C: 01B2 0939           ;COLOR25 = 0x0939
$70860: 01B4 0C49           ;COLOR26 = 0x0C49
$70864: 3E49 FFFE           ;Wait for vpos >= 0x3E and hpos >= 0x48
$70868: 0180 0D0F           ;COLOR00 = 0x0D0F
$7086C: 3ED7 FFFE           ;Wait for vpos >= 0x3E and hpos >= 0xD6
$70870: 0180 0000           ;COLOR00 = 0x0000
$70874: 3F49 FFFE           ;Wait for vpos >= 0x3F and hpos >= 0x48
$70878: 0180 0D0F           ;COLOR00 = 0x0D0F
$7087C: 3FD7 FFFE           ;Wait for vpos >= 0x3F and hpos >= 0xD6
$70880: 0180 0000           ;COLOR00 = 0x0000
$70884: 01A2 0839           ;COLOR17 = 0x0839
$70888: 01A4 0B49           ;COLOR18 = 0x0B49
$7088C: 01AA 0839           ;COLOR21 = 0x0839
$70890: 01AC 0B49           ;COLOR22 = 0x0B49
$70894: 01B2 0839           ;COLOR25 = 0x0839
$70898: 01B4 0B49           ;COLOR26 = 0x0B49
$7089C: 4049 FFFE           ;Wait for vpos >= 0x40 and hpos >= 0x48
$708A0: 0180 0C0F           ;COLOR00 = 0x0C0F
$708A4: 40D7 FFFE           ;Wait for vpos >= 0x40 and hpos >= 0xD6
$708A8: 0180 0000           ;COLOR00 = 0x0000
$708AC: 4149 FFFE           ;Wait for vpos >= 0x41 and hpos >= 0x48
$708B0: 0180 0C0F           ;COLOR00 = 0x0C0F
$708B4: 41D7 FFFE           ;Wait for vpos >= 0x41 and hpos >= 0xD6
$708B8: 0180 0000           ;COLOR00 = 0x0000
$708BC: 01A2 0739           ;COLOR17 = 0x0739
$708C0: 01A4 0A49           ;COLOR18 = 0x0A49
$708C4: 01AA 0739           ;COLOR21 = 0x0739
$708C8: 01AC 0A49           ;COLOR22 = 0x0A49
$708CC: 01B2 0739           ;COLOR25 = 0x0739
$708D0: 01B4 0A49           ;COLOR26 = 0x0A49
$708D4: 4249 FFFE           ;Wait for vpos >= 0x42 and hpos >= 0x48
$708D8: 0180 0B0F           ;COLOR00 = 0x0B0F
$708DC: 42D7 FFFE           ;Wait for vpos >= 0x42 and hpos >= 0xD6
$708E0: 0180 0000           ;COLOR00 = 0x0000
$708E4: 4349 FFFE           ;Wait for vpos >= 0x43 and hpos >= 0x48
$708E8: 0180 0B0F           ;COLOR00 = 0x0B0F
$708EC: 43D7 FFFE           ;Wait for vpos >= 0x43 and hpos >= 0xD6
$708F0: 0180 0000           ;COLOR00 = 0x0000
$708F4: 01A2 0639           ;COLOR17 = 0x0639
$708F8: 01A4 0949           ;COLOR18 = 0x0949
$708FC: 01AA 0639           ;COLOR21 = 0x0639
$70900: 01AC 0949           ;COLOR22 = 0x0949
$70904: 01B2 0639           ;COLOR25 = 0x0639
$70908: 01B4 0949           ;COLOR26 = 0x0949
$7090C: 4449 FFFE           ;Wait for vpos >= 0x44 and hpos >= 0x48
$70910: 0180 0A0F           ;COLOR00 = 0x0A0F
$70914: 44D7 FFFE           ;Wait for vpos >= 0x44 and hpos >= 0xD6
$70918: 0180 0000           ;COLOR00 = 0x0000
$7091C: 4549 FFFE           ;Wait for vpos >= 0x45 and hpos >= 0x48
$70920: 0180 0A0F           ;COLOR00 = 0x0A0F
$70924: 45D7 FFFE           ;Wait for vpos >= 0x45 and hpos >= 0xD6
$70928: 0180 0000           ;COLOR00 = 0x0000
$7092C: 01A2 0539           ;COLOR17 = 0x0539
$70930: 01A4 0849           ;COLOR18 = 0x0849
$70934: 01AA 0539           ;COLOR21 = 0x0539
$70938: 01AC 0849           ;COLOR22 = 0x0849
$7093C: 01B2 0539           ;COLOR25 = 0x0539
$70940: 01B4 0849           ;COLOR26 = 0x0849
$70944: 4649 FFFE           ;Wait for vpos >= 0x46 and hpos >= 0x48
$70948: 0180 090F           ;COLOR00 = 0x090F
$7094C: 46D7 FFFE           ;Wait for vpos >= 0x46 and hpos >= 0xD6
$70950: 0180 0000           ;COLOR00 = 0x0000
$70954: 4749 FFFE           ;Wait for vpos >= 0x47 and hpos >= 0x48
$70958: 0180 090F           ;COLOR00 = 0x090F
$7095C: 47D7 FFFE           ;Wait for vpos >= 0x47 and hpos >= 0xD6
$70960: 0180 0000           ;COLOR00 = 0x0000
$70964: 01A2 0439           ;COLOR17 = 0x0439
$70968: 01A4 0749           ;COLOR18 = 0x0749
$7096C: 01AA 0439           ;COLOR21 = 0x0439
$70970: 01AC 0749           ;COLOR22 = 0x0749
$70974: 01B2 0439           ;COLOR25 = 0x0439
$70978: 01B4 0749           ;COLOR26 = 0x0749
$7097C: 4849 FFFE           ;Wait for vpos >= 0x48 and hpos >= 0x48
$70980: 0180 080F           ;COLOR00 = 0x080F
$70984: 48D7 FFFE           ;Wait for vpos >= 0x48 and hpos >= 0xD6
$70988: 0180 0000           ;COLOR00 = 0x0000
$7098C: 4949 FFFE           ;Wait for vpos >= 0x49 and hpos >= 0x48
$70990: 0180 080F           ;COLOR00 = 0x080F
$70994: 49D7 FFFE           ;Wait for vpos >= 0x49 and hpos >= 0xD6
$70998: 0180 0000           ;COLOR00 = 0x0000
$7099C: 01A2 0339           ;COLOR17 = 0x0339
$709A0: 01A4 0649           ;COLOR18 = 0x0649
$709A4: 01AA 0339           ;COLOR21 = 0x0339
$709A8: 01AC 0649           ;COLOR22 = 0x0649
$709AC: 01B2 0339           ;COLOR25 = 0x0339
$709B0: 01B4 0649           ;COLOR26 = 0x0649
$709B4: 4A49 FFFE           ;Wait for vpos >= 0x4A and hpos >= 0x48
$709B8: 0180 070F           ;COLOR00 = 0x070F
$709BC: 4AD7 FFFE           ;Wait for vpos >= 0x4A and hpos >= 0xD6
$709C0: 0180 0000           ;COLOR00 = 0x0000
$709C4: 4B49 FFFE           ;Wait for vpos >= 0x4B and hpos >= 0x48
$709C8: 0180 070F           ;COLOR00 = 0x070F
$709CC: 4BD7 FFFE           ;Wait for vpos >= 0x4B and hpos >= 0xD6
$709D0: 0180 0000           ;COLOR00 = 0x0000
$709D4: 01A2 0239           ;COLOR17 = 0x0239
$709D8: 01A4 0549           ;COLOR18 = 0x0549
$709DC: 01AA 0239           ;COLOR21 = 0x0239
$709E0: 01AC 0549           ;COLOR22 = 0x0549
$709E4: 01B2 0239           ;COLOR25 = 0x0239
$709E8: 01B4 0549           ;COLOR26 = 0x0549
$709EC: 4C49 FFFE           ;Wait for vpos >= 0x4C and hpos >= 0x48
$709F0: 0180 060F           ;COLOR00 = 0x060F
$709F4: 4CD7 FFFE           ;Wait for vpos >= 0x4C and hpos >= 0xD6
$709F8: 0180 0000           ;COLOR00 = 0x0000
$709FC: 01A2 0AAE           ;COLOR17 = 0x0AAE
$70A00: 01A4 0900           ;COLOR18 = 0x0900
$70A04: 01A6 0000           ;COLOR19 = 0x0000
$70A08: 4D49 FFFE           ;Wait for vpos >= 0x4D and hpos >= 0x48
$70A0C: 0180 060F           ;COLOR00 = 0x060F
$70A10: 4DD7 FFFE           ;Wait for vpos >= 0x4D and hpos >= 0xD6
$70A14: 0180 0000           ;COLOR00 = 0x0000
$70A18: 0086 0AAC 0084 0007 ;COP2LC = 0x00070AAC
$70A20: 008A 0000           ;COPJMP2 = 0x0000

From row $4e to $6d, the game multiplexes sprite 7 across the screen, creating the static 2 colour background graphics. The copper has just enough DMA time to position sprite 7, write the new word of graphics into the DATA register, then reposition it repeatedly across the screen. It then repeats this loop for $20 iterations (32 pixels high).

On each row, colour 29 is altered slightly, creating the purple fading to blue, fading to dark blue gradient behind the mountain range.

$70AAC: 4DD7 FFFE           ;Wait for vpos >= 0x4D and hpos >= 0xD6
$70AB0: 017E 0000           ;SPR7DATB = 0x0000
$70AB4: 017A 6E00           ;SPR7CTL = 0x6E00
$70AB8: 01BA 050F           ;COLOR29 = 0x050F
$70ABC: 01A0 0000           ;COLOR16 = 0x0000
$70AC0: 01A0 0000           ;COLOR16 = 0x0000
$70AC4: 01A0 0000           ;COLOR16 = 0x0000
$70AC8: 4E3F FFFE           ;Wait for vpos >= 0x4E and hpos >= 0x3E
$70ACC: 0178 0047           ;SPR7POS = 0x0047
$70AD0: 017C FFFF           ;SPR7DATA = 0xFFFF
$70AD4: 0178 004F           ;SPR7POS = 0x004F
$70AD8: 017C FFFC           ;SPR7DATA = 0xFFFC
$70ADC: 0178 0057           ;SPR7POS = 0x0057
$70AE0: 017C 7FFF           ;SPR7DATA = 0x7FFF
$70AE4: 0178 005F           ;SPR7POS = 0x005F
$70AE8: 017C FFFF           ;SPR7DATA = 0xFFFF
$70AEC: 0178 0067           ;SPR7POS = 0x0067
$70AF0: 017C FFFF           ;SPR7DATA = 0xFFFF
$70AF4: 0178 006F           ;SPR7POS = 0x006F
$70AF8: 017C FFFF           ;SPR7DATA = 0xFFFF
$70AFC: 0178 0077           ;SPR7POS = 0x0077
$70B00: 017C FFFF           ;SPR7DATA = 0xFFFF
$70B04: 0178 007F           ;SPR7POS = 0x007F
$70B08: 017C FFFF           ;SPR7DATA = 0xFFFF
$70B0C: 0178 0087           ;SPR7POS = 0x0087
$70B10: 017C FFFF           ;SPR7DATA = 0xFFFF
$70B14: 0178 008F           ;SPR7POS = 0x008F
$70B18: 017C FFFF           ;SPR7DATA = 0xFFFF
$70B1C: 0178 0097           ;SPR7POS = 0x0097
$70B20: 017C FFFF           ;SPR7DATA = 0xFFFF
$70B24: 0178 009F           ;SPR7POS = 0x009F
$70B28: 017C FFE7           ;SPR7DATA = 0xFFE7
$70B2C: 0178 00A7           ;SPR7POS = 0x00A7
$70B30: 017C FFFF           ;SPR7DATA = 0xFFFF
$70B34: 0178 00AF           ;SPR7POS = 0x00AF
$70B38: 017C FFFF           ;SPR7DATA = 0xFFFF
$70B3C: 0178 00B7           ;SPR7POS = 0x00B7
$70B40: 017C FFFF           ;SPR7DATA = 0xFFFF
$70B44: 0178 00BF           ;SPR7POS = 0x00BF
$70B48: 017C FFFF           ;SPR7DATA = 0xFFFF
$70B4C: 0178 00C7           ;SPR7POS = 0x00C7
$70B50: 017C FFFF           ;SPR7DATA = 0xFFFF
$70B54: 0178 00CF           ;SPR7POS = 0x00CF
$70B58: 017C FFFF           ;SPR7DATA = 0xFFFF
$70B5C: 0178 00D7           ;SPR7POS = 0x00D7
$70B60: 017C FFFF           ;SPR7DATA = 0xFFFF
$70B64: 01BA 050F           ;COLOR29 = 0x050F - Background colour
$70B68: 01A0 0000           ;COLOR16 = 0x0000
$70B6C: 01A0 0000           ;COLOR16 = 0x0000
$70B70: 01A0 0000           ;COLOR16 = 0x0000
$70B74: 4F3F FFFE           ;Wait for vpos >= 0x4F and hpos >= 0x3E
$70B78: 0178 0047           ;SPR7POS = 0x0047
$70B7C: 017C FFFF           ;SPR7DATA = 0xFFFF
$70B80: 0178 004F           ;SPR7POS = 0x004F
$70B84: 017C FFF3           ;SPR7DATA = 0xFFF3
$70B88: 0178 0057           ;SPR7POS = 0x0057
$70B8C: 017C BFFF           ;SPR7DATA = 0xBFFF
$70B90: 0178 005F           ;SPR7POS = 0x005F
$70B94: 017C FFFF           ;SPR7DATA = 0xFFFF
$70B98: 0178 0067           ;SPR7POS = 0x0067
$70B9C: 017C FFFF           ;SPR7DATA = 0xFFFF
$70BA0: 0178 006F           ;SPR7POS = 0x006F
$70BA4: 017C FFFF           ;SPR7DATA = 0xFFFF
$70BA8: 0178 0077           ;SPR7POS = 0x0077
$70BAC: 017C FFFF           ;SPR7DATA = 0xFFFF
$70BB0: 0178 007F           ;SPR7POS = 0x007F
$70BB4: 017C FFFF           ;SPR7DATA = 0xFFFF
$70BB8: 0178 0087           ;SPR7POS = 0x0087
$70BBC: 017C FFFF           ;SPR7DATA = 0xFFFF
$70BC0: 0178 008F           ;SPR7POS = 0x008F
$70BC4: 017C FFFF           ;SPR7DATA = 0xFFFF
$70BC8: 0178 0097           ;SPR7POS = 0x0097
$70BCC: 017C FFFF           ;SPR7DATA = 0xFFFF
$70BD0: 0178 009F           ;SPR7POS = 0x009F
$70BD4: 017C FF99           ;SPR7DATA = 0xFF99
$70BD8: 0178 00A7           ;SPR7POS = 0x00A7
$70BDC: 017C FFFF           ;SPR7DATA = 0xFFFF
$70BE0: 0178 00AF           ;SPR7POS = 0x00AF
$70BE4: 017C FFFF           ;SPR7DATA = 0xFFFF
$70BE8: 0178 00B7           ;SPR7POS = 0x00B7
$70BEC: 017C FFFF           ;SPR7DATA = 0xFFFF
$70BF0: 0178 00BF           ;SPR7POS = 0x00BF
$70BF4: 017C FFFF           ;SPR7DATA = 0xFFFF
$70BF8: 0178 00C7           ;SPR7POS = 0x00C7
$70BFC: 017C FFFF           ;SPR7DATA = 0xFFFF
$70C00: 0178 00CF           ;SPR7POS = 0x00CF
$70C04: 017C FFFF           ;SPR7DATA = 0xFFFF
$70C08: 0178 00D7           ;SPR7POS = 0x00D7
$70C0C: 017C FFFF           ;SPR7DATA = 0xFFFF
$70C10: 01BA 040F           ;COLOR29 = 0x040F - Background colour
$70C14: 01A0 0000           ;COLOR16 = 0x0000
$70C18: 01A0 0000           ;COLOR16 = 0x0000
$70C1C: 01A0 0000           ;COLOR16 = 0x0000

... repeats for another 30 lines...

In a perfect world with more DMA time available, it would have been nice to alter both the DATA and DATB register at the same time, and able to create a 4 colour sprite layer rather than 2 colours. But this is simply not possible with the 4 bitplane screen setup.

Now the copperlist is modified to have a new palette for the main character Bubba, so the sprite colours are modified and the new sprites are setup.

 

$71F9C: 6D3F FFFE           ;Wait for vpos >= 0x6D and hpos >= 0x3E
$71FA0: 0178 0047           ;SPR7POS = 0x0047
$71FA4: 017C 0000           ;SPR7DATA = 0x0000
$71FA8: 0178 004F           ;SPR7POS = 0x004F
$71FAC: 017C 0000           ;SPR7DATA = 0x0000
$71FB0: 0178 0057           ;SPR7POS = 0x0057
$71FB4: 017C 0000           ;SPR7DATA = 0x0000
$71FB8: 0178 005F           ;SPR7POS = 0x005F
$71FBC: 017C 0000           ;SPR7DATA = 0x0000
$71FC0: 0178 0067           ;SPR7POS = 0x0067
$71FC4: 017C 0000           ;SPR7DATA = 0x0000
$71FC8: 0178 006F           ;SPR7POS = 0x006F
$71FCC: 017C 0000           ;SPR7DATA = 0x0000
$71FD0: 0178 0077           ;SPR7POS = 0x0077
$71FD4: 017C 0000           ;SPR7DATA = 0x0000
$71FD8: 0178 007F           ;SPR7POS = 0x007F
$71FDC: 017C 0000           ;SPR7DATA = 0x0000
$71FE0: 0178 0087           ;SPR7POS = 0x0087
$71FE4: 017C 0000           ;SPR7DATA = 0x0000
$71FE8: 0178 008F           ;SPR7POS = 0x008F
$71FEC: 017C 0000           ;SPR7DATA = 0x0000
$71FF0: 0178 0097           ;SPR7POS = 0x0097
$71FF4: 017C 0000           ;SPR7DATA = 0x0000
$71FF8: 0178 009F           ;SPR7POS = 0x009F
$71FFC: 017C 0000           ;SPR7DATA = 0x0000
$72000: 0178 00A7           ;SPR7POS = 0x00A7
$72004: 017C 0000           ;SPR7DATA = 0x0000
$72008: 0178 00AF           ;SPR7POS = 0x00AF
$7200C: 017C 0000           ;SPR7DATA = 0x0000
$72010: 0178 00B7           ;SPR7POS = 0x00B7
$72014: 017C 0000           ;SPR7DATA = 0x0000
$72018: 0178 00BF           ;SPR7POS = 0x00BF
$7201C: 017C 0000           ;SPR7DATA = 0x0000
$72020: 0178 00C7           ;SPR7POS = 0x00C7
$72024: 017C 0000           ;SPR7DATA = 0x0000
$72028: 0178 00CF           ;SPR7POS = 0x00CF
$7202C: 017C 0000           ;SPR7DATA = 0x0000
$72030: 0178 00D7           ;SPR7POS = 0x00D7
$72034: 017C 0000           ;SPR7DATA = 0x0000
$72038: 0088 0000           ;COPJMP1 = 0x0000
----------------------------------------------
$7203C: 017C 0000           ;SPR7DATA = 0x0000
$72040: 0104 0024           ;BPLCON2 = 0x0024
$72044: 01A2 0EEE           ;COLOR17 = 0x0EEE - Bubba sprite palette
$72048: 01A4 0E00           ;COLOR18 = 0x0E00
$7204C: 01A6 0000           ;COLOR19 = 0x0000
$72050: 01A8 044E           ;COLOR20 = 0x044E
$72054: 01AA 0ECC           ;COLOR21 = 0x0ECC
$72058: 01AC 0C64           ;COLOR22 = 0x0C64
$7205C: 01AE 0440           ;COLOR23 = 0x0440
$72060: 01B0 0EAA           ;COLOR24 = 0x0EAA
$72064: 01B2 0E86           ;COLOR25 = 0x0E86
$72068: 01B4 0A64           ;COLOR26 = 0x0A64
$7206C: 01B6 0A00           ;COLOR27 = 0x0A00
$72070: 01B8 0EE0           ;COLOR28 = 0x0EE0
$72074: 01BA 0AA0           ;COLOR29 = 0x0AA0
$72078: 01BC 022C           ;COLOR30 = 0x022C
$7207C: 01BE 000A           ;COLOR31 = 0x000A
$72080: 6ED7 FFFE           ;Wait for vpos >= 0x6E and hpos >= 0xD6
$72084: 0096 0020           ;DMACON = 0x0020
$72088: 0120 0008 0122 DC22 ;SPR0PT = 0x0008DC22 - Bubba sprite pointers
$72090: 0124 0008 0126 DD26 ;SPR1PT = 0x0008DD26
$72098: 0128 0008 012A DE2A ;SPR2PT = 0x0008DE2A
$720A0: 012C 0008 012E DF26 ;SPR3PT = 0x0008DF26
$720A8: 0130 0008 0132 0000 ;SPR4PT = 0x00080000 - Blank sprites
$720B0: 0134 0008 0136 0000 ;SPR5PT = 0x00080000
$720B8: 0138 0008 013A 0000 ;SPR6PT = 0x00080000
$720C0: 013C 0008 013E 0000 ;SPR7PT = 0x00080000
$720C8: 0140 8187           ;SPR0POS = 0x8187
$720CC: 0142 C180           ;SPR0CTL = 0xC180
$720D0: 0148 8187           ;SPR1POS = 0x8187
$720D4: 014A C180           ;SPR1CTL = 0xC180
$720D8: 0150 838F           ;SPR2POS = 0x838F
$720DC: 0152 C180           ;SPR2CTL = 0xC180
$720E0: 0158 838F           ;SPR3POS = 0x838F
$720E4: 015A C180           ;SPR3CTL = 0xC180
$720E8: 0160 E1BA           ;SPR4POS = 0xE1BA
$720EC: 0162 FE80           ;SPR4CTL = 0xFE80
$720F0: 0168 E1BA           ;SPR5POS = 0xE1BA
$720F4: 016A FE80           ;SPR5CTL = 0xFE80
$720F8: 0170 E1C2           ;SPR6POS = 0xE1C2
$720FC: 0172 FE80           ;SPR6CTL = 0xFE80
$72100: 0178 E1C2           ;SPR7POS = 0xE1C2
$72104: 017A FE80           ;SPR7CTL = 0xFE80
$72108: 0096 8020           ;DMACON = 0x8020
$7210C: 0080 0007 0082 240C ;COP1LC = 0x0007240C
$72114: 0084 0007 0086 24AC ;COP2LC = 0x000724AC
$7211C: FF01 FFFF           ;Skip if vpos >= 0xFF and hpos >= 0x00
                            ;Destination Y coordinate reached!

Now the sprites at the bottom of the display are setup, creating the score, energy level and life counter:

$72420: 0084 0007 0086 2260 ;COP2LC = 0x00072260
$72428: FF01 FFFF           ;Skip if vpos >= 0xFF and hpos >= 0x00
$7242C: 01FE 0000           ;NO-OP = 0x0000
$72430: 0104 0024           ;BPLCON2 = 0x0024
$72434: D949 FFFE           ;Wait for vpos >= 0xD9 and hpos >= 0x48
$72438: 0180 0105           ;COLOR00 = 0x0105
$7243C: 0122 E642           ;SPR0PTL = 0xE642
$72440: 0126 E6AE           ;SPR1PTL = 0xE6AE
$72444: 012A E71A           ;SPR2PTL = 0xE71A
$72448: 012E E786           ;SPR3PTL = 0xE786
$7244C: 0132 E7FA           ;SPR4PTL = 0xE7FA
$72450: 0136 E872           ;SPR5PTL = 0xE872
$72454: 013A E8EA           ;SPR6PTL = 0xE8EA
$72458: 013E E962           ;SPR7PTL = 0xE962
$7245C: 01AA 0EEE           ;COLOR21 = 0x0EEE
$72460: 01AC 0E00           ;COLOR22 = 0x0E00
$72464: 01AE 0000           ;COLOR23 = 0x0000
$72468: 008A 0000           ;COPJMP2 = 0x0000
----------------------------------------------
$72260: D949 FFFE           ;Wait for vpos >= 0xD9 and hpos >= 0x48
$72264: 0180 0105           ;COLOR00 = 0x0105
$72268: D9D7 FFFE           ;Wait for vpos >= 0xD9 and hpos >= 0xD6
$7226C: 0180 0000           ;COLOR00 = 0x0000
$72270: 0182 0105           ;COLOR01 = 0x0105
$72274: 0184 0315           ;COLOR02 = 0x0315
$72278: 0186 0425           ;COLOR03 = 0x0425
$7227C: 0188 0657           ;COLOR04 = 0x0657
$72280: 018A 0767           ;COLOR05 = 0x0767
$72284: 018C 0145           ;COLOR06 = 0x0145
$72288: 018E 0366           ;COLOR07 = 0x0366
$7228C: 0190 0696           ;COLOR08 = 0x0696
$72290: 0192 0735           ;COLOR09 = 0x0735
$72294: 0194 0705           ;COLOR10 = 0x0705
$72298: 0196 0329           ;COLOR11 = 0x0329
$7229C: 0198 043B           ;COLOR12 = 0x043B
$722A0: 019A 010F           ;COLOR13 = 0x010F
$722A4: 019C 045F           ;COLOR14 = 0x045F
$722A8: 019E 079F           ;COLOR15 = 0x079F
$722AC: DA49 FFFE           ;Wait for vpos >= 0xDA and hpos >= 0x48
$722B0: 0180 0105           ;COLOR00 = 0x0105
$722B4: DAD7 FFFE           ;Wait for vpos >= 0xDA and hpos >= 0xD6
$722B8: 0180 0000           ;COLOR00 = 0x0000
$722BC: DB49 FFFE           ;Wait for vpos >= 0xDB and hpos >= 0x48
$722C0: 0180 0105           ;COLOR00 = 0x0105
$722C4: DBD7 FFFE           ;Wait for vpos >= 0xDB and hpos >= 0xD6
$722C8: 0180 0000           ;COLOR00 = 0x0000
$722CC: DC49 FFFE           ;Wait for vpos >= 0xDC and hpos >= 0x48
$722D0: 0180 0105           ;COLOR00 = 0x0105
$722D4: DCD7 FFFE           ;Wait for vpos >= 0xDC and hpos >= 0xD6
$722D8: 0180 0000           ;COLOR00 = 0x0000
$722DC: DD49 FFFE           ;Wait for vpos >= 0xDD and hpos >= 0x48
$722E0: 0180 0105           ;COLOR00 = 0x0105
$722E4: DDD7 FFFE           ;Wait for vpos >= 0xDD and hpos >= 0xD6
$722E8: 0180 0000           ;COLOR00 = 0x0000
$722EC: DE49 FFFE           ;Wait for vpos >= 0xDE and hpos >= 0x48
$722F0: 0180 0105           ;COLOR00 = 0x0105
$722F4: DED7 FFFE           ;Wait for vpos >= 0xDE and hpos >= 0xD6
$722F8: 0180 0000           ;COLOR00 = 0x0000
$722FC: DF49 FFFE           ;Wait for vpos >= 0xDF and hpos >= 0x48
$72300: 0180 0105           ;COLOR00 = 0x0105
$72304: DFD7 FFFE           ;Wait for vpos >= 0xDF and hpos >= 0xD6
$72308: 0180 0000           ;COLOR00 = 0x0000
$7230C: E049 FFFE           ;Wait for vpos >= 0xE0 and hpos >= 0x48
$72310: 0180 0105           ;COLOR00 = 0x0105
$72314: E0D7 FFFE           ;Wait for vpos >= 0xE0 and hpos >= 0xD6
$72318: 0180 0000           ;COLOR00 = 0x0000
$7231C: E149 FFFE           ;Wait for vpos >= 0xE1 and hpos >= 0x48
$72320: 0180 0105           ;COLOR00 = 0x0105
$72324: E1D7 FFFE           ;Wait for vpos >= 0xE1 and hpos >= 0xD6
$72328: 0180 0000           ;COLOR00 = 0x0000
$7232C: E249 FFFE           ;Wait for vpos >= 0xE2 and hpos >= 0x48
$72330: 0180 0105           ;COLOR00 = 0x0105
$72334: E2D7 FFFE           ;Wait for vpos >= 0xE2 and hpos >= 0xD6
$72338: 0180 0000           ;COLOR00 = 0x0000
$7233C: E349 FFFE           ;Wait for vpos >= 0xE3 and hpos >= 0x48
$72340: 0180 0105           ;COLOR00 = 0x0105
$72344: E3D7 FFFE           ;Wait for vpos >= 0xE3 and hpos >= 0xD6
$72348: 0180 0000           ;COLOR00 = 0x0000
$7234C: E449 FFFE           ;Wait for vpos >= 0xE4 and hpos >= 0x48
$72350: 0180 0105           ;COLOR00 = 0x0105
$72354: E4D7 FFFE           ;Wait for vpos >= 0xE4 and hpos >= 0xD6
$72358: 0180 0000           ;COLOR00 = 0x0000
$7235C: E549 FFFE           ;Wait for vpos >= 0xE5 and hpos >= 0x48
$72360: 0180 0105           ;COLOR00 = 0x0105
$72364: E5D7 FFFE           ;Wait for vpos >= 0xE5 and hpos >= 0xD6
$72368: 0180 0000           ;COLOR00 = 0x0000
$7236C: E649 FFFE           ;Wait for vpos >= 0xE6 and hpos >= 0x48
$72370: 0180 0105           ;COLOR00 = 0x0105
$72374: E6D7 FFFE           ;Wait for vpos >= 0xE6 and hpos >= 0xD6
$72378: 0180 0000           ;COLOR00 = 0x0000
$7237C: E749 FFFE           ;Wait for vpos >= 0xE7 and hpos >= 0x48
$72380: 0180 0105           ;COLOR00 = 0x0105
$72384: E7D7 FFFE           ;Wait for vpos >= 0xE7 and hpos >= 0xD6
$72388: 0180 0000           ;COLOR00 = 0x0000
$7238C: E849 FFFE           ;Wait for vpos >= 0xE8 and hpos >= 0x48
$72390: 0180 0105           ;COLOR00 = 0x0105
$72394: E8D7 FFFE           ;Wait for vpos >= 0xE8 and hpos >= 0xD6
$72398: 0180 0000           ;COLOR00 = 0x0000
$7239C: E949 FFFE           ;Wait for vpos >= 0xE9 and hpos >= 0x48
$723A0: 0180 0105           ;COLOR00 = 0x0105
$723A4: 0084 0007 0086 2410 ;COP2LC = 0x00072410
$723AC: FFFF FFFF           ;Skip if vpos >= 0xFF and hpos >= 0xFE
$723B0: 008A 0000           ;COPJMP2 = 0x0000
----------------------------------------------
$72410: 0180 0000           ;COLOR00 = 0x0000
$72414: 2401 FFFE           ;Wait for vpos >= 0x24 and hpos >= 0x00
$72418: 009C 8010           ;INTREQ = 0x8010
$7241C: ffff fffe           ;End of copperlist
$7241C: FFFF FFFE           ;Wait for vpos >= 0xFF and hpos >= 0xFE

Post your comment

Comments

No one has commented on this page yet.

RSS feed for comments on this page | RSS feed for all comments

Popular Sprite Tricks

Bubba 'n' Stix

Jim Power

2 sprites are displayed then repositioned horizontally right across the screen to create the colourful static background. The remaining sprites are used for the main character, the status bar and player bullets.

Bubba 'n' Stix

Risky Woods

The 16-colour background layer was created by using all 8 hardware sprites and repositioning them across the screen. The same 64 pixel wide graphics are repeated across the entire play area.

Bubba 'n' Stix

Shadow of the Beast

One of the first jaw-droppingly beautiful Amiga games that still looks great today. Sprites were heavily re-used on the screen, along with priority changes to make them appear between the playfields.

Bubba 'n' Stix

Stardust

The amazing tunnel sequence was created with a 6 frame animation sequence made with only 4 colours and mirrored vertically. The asteroid layer sits on top of this, with a status panel and player ship made of sprites sitting on top.