Skip to content

Commit d08a7a0

Browse files
committed
funtech/supracan.cpp: rectify sprite ysizes == 9, skip blank sprites for drawing
1 parent f40c987 commit d08a7a0

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Diff for: hash/supracan.xml

-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ Broken [video] during intro, uses bitmap mode with ROZ layer
8080
<year>1995</year>
8181
<publisher>AV Artisan</publisher>
8282
<notes><![CDATA[
83-
[video] title animation glitches some sprites.
8483
[video] uses per-tile priority during gameplay.
8584
[sound] noisy channels 13-15 when jump occurs (12 00 0f 79)
8685
[sound] jump (1f 0f 0e a9) and attack (1f 00 0f 69) channels 11-12 keeps repeating
@@ -205,7 +204,6 @@ Erratic gameplay speed, controls [irq 3] as FRC
205204
[sound] BGM plays random tune on title (verify, two video refs plays different BGMs there wtf?)
206205
[video] title screen doesn't cliprect properly against white
207206
[video] title screen has priority issues with overlapping overlays (layer 1 + ROZ)
208-
[video] garbage sprites in 1p vs. com gameplay, [DMA]s with invalid dest pointers.
209207
[sound] main menu selection channel 14 keeps repeating (1f 15 0b dd)
210208
]]></notes>
211209
<info name="serial" value="F010" />

Diff for: src/mame/funtech/supracan.cpp

+9-3
Original file line numberDiff line numberDiff line change
@@ -776,8 +776,10 @@ void supracan_state::draw_sprites(bitmap_ind16 &bitmap, bitmap_ind8 &maskmap, bi
776776
// TODO: check on real HW
777777
static const int ysizes_table[16] = {
778778
1, 2, 3, 4, 5, 6, 7, 8, 9,
779-
// 0x9: speedyd intro dash frame
780-
11,
779+
// 0x9: speedyd intro dash frame, speedyd bonus stages, boomzoo intro
780+
// 11 would be more logical for former, except it will break latter and
781+
// is confirmed to "cut" feet anyway.
782+
10,
781783
// 0xa: A'Can logo
782784
12,
783785
// 0xb/0xc: jttlaugh stage 1-3 (particularly on the web scrolling jump platforms)
@@ -819,7 +821,7 @@ void supracan_state::draw_sprites(bitmap_ind16 &bitmap, bitmap_ind8 &maskmap, bi
819821
if (y >= 0x180) y -= 0x200;
820822
if (x >= 0x180) x -= 0x200;
821823

822-
if ((vram[i + 0] & 0x4000))
824+
if ((vram[i + 0] & 0x4000) && sprite_ptr)
823825
{
824826
int xsize = 1 << (vram[i + 1] & 7);
825827
int ysize = ysizes_table[(vram[i + 0] & 0x1e00) >> 9];
@@ -853,6 +855,10 @@ void supracan_state::draw_sprites(bitmap_ind16 &bitmap, bitmap_ind8 &maskmap, bi
853855
for (int xtile = 0; xtile < xsize; xtile++)
854856
{
855857
uint16_t data = vram[((sprite_ptr << 1) + ytile * xsize + xtile) & VRAM_MASK];
858+
// magipool will draw garbage during gameplay if we don't skip empty entries.
859+
// NOTE: sets up both main table pointer and sub entries
860+
if (data == 0)
861+
continue;
856862
int tile = (bank * bank_size) + (data & 0x03ff);
857863
int palette = (data & 0xf000) >> 12;
858864

0 commit comments

Comments
 (0)