-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Final version of the Malabars Bumper demo by Resistance (http://res…
- Loading branch information
Showing
75 changed files
with
9,117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
# demo-Malabars-Bumper | ||
A demo for the Sega Megadrive/Genesis video game system | ||
|
||
Code : Fra / 2D Art : Grass, Gelmir, Sim1, Kyoto1222, Fra / Music : Nainain / Text : 4Play | ||
|
||
More details can be found here : http://www.pouet.net/prod.php?which=67778 | ||
|
||
![Intro Screenhot](https://raw.githubusercontent.com/ResistanceVault/demo-Malabars-Bumper/master/release/screenshot.png) |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "genesis.h" | ||
|
||
/* grid_cube_small.obj */ | ||
/* List of vertices */ | ||
const Vect3D_f16 vb_grid_cube_small_vertex_pos[20] = | ||
{ | ||
{FIX16(-5.900219083928085), FIX16(-5.511336103603647), FIX16(-5.900219083928085)}, | ||
{FIX16(-5.900219083928085), FIX16(5.511336455280305), FIX16(-5.900219083928085)}, | ||
{FIX16(-5.900219083928085), FIX16(-0.02985819879262088), FIX16(-5.900219083928085)}, | ||
{FIX16(-5.900219083928085), FIX16(-5.511336103603647), FIX16(5.900219083928085)}, | ||
{FIX16(5.900219083928085), FIX16(-5.511336103603647), FIX16(-5.900219083928085)}, | ||
{FIX16(5.900219083928085), FIX16(5.511336455280305), FIX16(-5.900219083928085)}, | ||
{FIX16(-5.900219083928085), FIX16(5.511336455280305), FIX16(5.900219083928085)}, | ||
{FIX16(-5.900219083928085), FIX16(-0.02985819879262088), FIX16(5.900219083928085)}, | ||
{FIX16(5.900219083928085), FIX16(-0.02985819879262088), FIX16(-5.900219083928085)}, | ||
{FIX16(5.900219083928085), FIX16(-5.511336103603647), FIX16(5.900219083928085)}, | ||
{FIX16(5.900219083928085), FIX16(5.511336455280305), FIX16(5.900219083928085)}, | ||
{FIX16(5.900219083928085), FIX16(-0.02985819879262088), FIX16(5.900219083928085)}, | ||
{FIX16(0.0), FIX16(-5.511336103603647), FIX16(5.900219083928085)}, | ||
{FIX16(-5.900219083928085), FIX16(-5.511336103603647), FIX16(-0.0)}, | ||
{FIX16(0.0), FIX16(-5.511336103603647), FIX16(-5.900219083928085)}, | ||
{FIX16(5.900219083928085), FIX16(-5.511336103603647), FIX16(-0.0)}, | ||
{FIX16(0.0), FIX16(5.511336455280305), FIX16(-5.900219083928085)}, | ||
{FIX16(-5.900219083928085), FIX16(5.511336455280305), FIX16(-0.0)}, | ||
{FIX16(0.0), FIX16(5.511336455280305), FIX16(5.900219083928085)}, | ||
{FIX16(5.900219083928085), FIX16(5.511336455280305), FIX16(-0.0)}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#define grid_cube_small_VTX_COUNT 20 | ||
const Vect3D_f16 vb_grid_cube_small_vertex_pos[20]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
const char *strings_logo_0[] = | ||
{ | ||
/* | ||
"<----------- MAX HEADROOM ------------->\0" | ||
*/ | ||
"ccc RESISTANCE PRESENTS ccc\0", | ||
"A DEMO FOR THE SEGA MEGADRIVE\0", | ||
"RELEASED AT SOLSKOGEN 2016\0", | ||
|
||
/* Do not remove the next line */ | ||
"\0" | ||
}; | ||
|
||
const char *strings_credits[] = | ||
{ | ||
/* | ||
"<----------- MAX HEADROOM ------------->\0" | ||
*/ | ||
"c\0", | ||
"ccc\0", | ||
" \0", | ||
|
||
"ccc CREDITS ccc\0", | ||
" \0", | ||
|
||
"PIXELS : GRASS, GELMIR,\0", | ||
" \0", | ||
"KOYOT1222, SIM1, FRA\0", | ||
" \0", | ||
|
||
"MUSIC : NAINAIN\0", | ||
" \0", | ||
|
||
"TEXT : 4PLAY\0", | ||
" \0", | ||
|
||
"CODE : FRA\0", | ||
" \0", | ||
|
||
"DONE WITH THE SGDK FRAMEWORK\0", | ||
" \0", | ||
|
||
"ccc\0", | ||
"c\0", | ||
" \0", | ||
|
||
/* Do not remove the next line */ | ||
"\0" | ||
}; | ||
|
||
const char *strings_greets[] = | ||
{ | ||
/* | ||
"<----------- MAX HEADROOM ------------->\0" | ||
*/ | ||
// "---------------------------------\0", | ||
// " \0", | ||
|
||
"ccc GREETINGS FLY OUT TO ccc\0", | ||
" \0", | ||
"DARKLITE, DEFENCE FORCE, DEKADENCE\0", | ||
" \0", | ||
"DESIRE, FOCUS DESIGN, INSANE, LEMON\0", | ||
" \0", | ||
"LIVE!, LOONIES, MANKIND, CONDENSE,\0", | ||
" \0", | ||
"MOODS PLATEAU, PACIFIC, RSI, SCARAB\0", | ||
" \0", | ||
"SCOOPEX, TRBL, WANTED TEAM, Y-CREW\0", | ||
" \0", | ||
"FUNKENSTORT, MANDARINE, FLUSH, FLC\0", | ||
" \0", | ||
"ADORU, ZERKMAN, MOOZ, MAAK, UKKO\0", | ||
" \0", | ||
"BAUDSURFER, MOG, NORECESS, PTOING\0", | ||
" \0", | ||
"PHAAZON, STFSUX, PLAYMOGAMES ORLEANS\0", | ||
" \0", | ||
"MOONSOON AND ALL RESISTANCE MEMBERS!\0", | ||
" \0", | ||
"ccc\0", | ||
// "---------------------------------\0", | ||
/* Do not remove the next line */ | ||
"\0" | ||
}; | ||
|
||
|
||
const char *strings_sim_0[] = | ||
{ | ||
/* | ||
"<----------- MAX HEADROOM ------------->\0" | ||
*/ | ||
"HELLO HELLO SOLSKOGEN AND WELCOME TO\0", | ||
"THIS FRESH MEGADRIVE PRODUCTION\0", | ||
"BROUGHT TO YOU BY THE BOYS IN RESISTANCE\0", | ||
"INTRODUCING ONE OF THE FIRST\0", | ||
"PHYSICS SIMULATIONS ON THE SEGA CONSOLE!\0", | ||
"IT WON'T SET THE 68K ON FIRE, BUT STILL!\0", | ||
|
||
/* Do not remove the next line */ | ||
"\0" | ||
}; | ||
|
||
const char *strings_sim_1[] = | ||
{ | ||
/* | ||
"<----------- MAX HEADROOM ------------->\0" | ||
*/ | ||
"ARE YOU ALL DRUNK AND READY TO PARTY\0", | ||
"ALL NIGHT LONG? ...NOT DRUNK ENOUGH?!\0", | ||
"RESPONSE WILL SHARE HIS BEERS WITH YOU\0", | ||
"ALL :-), VISIT HIS CAMPER FOR FREE\0", | ||
"BEERS AND REMEMBER TO VOTE RESISTANCE\0", | ||
|
||
/* Do not remove the next line */ | ||
"\0" | ||
}; | ||
|
||
const char *strings_sim_2[] = | ||
{ | ||
/* | ||
"<----------- MAX HEADROOM ------------->\0" | ||
*/ | ||
"HAVE YOU NOTICED THAT AUDIO TWIST ?!\0", | ||
"AFTER OUR LATEST MEGADRIVE RELEASE...\0", | ||
"SOMEONE SAID THE MD MUSIC SHOULD INCLUDE\0", | ||
"SOME PCM AND PSG!!! SO HERE YOU ARE!\0", | ||
"NAINAIN WORKED HARD TO MAKE AN ORIGINAL\0", | ||
"PIECE OF JAZZY SOUND FOR THE GENNY!\0", | ||
// "I HOPE YOU WILL LIKE IT...\0", | ||
"CAN YOU HEAR THE RIFF OF HIS OLD IBANEZ?\0", | ||
|
||
/* Do not remove the next line */ | ||
"\0" | ||
}; | ||
|
||
|
||
const char *strings_sim_3[] = | ||
{ | ||
/* | ||
"<----------- MAX HEADROOM ------------->\0" | ||
*/ | ||
"ABOUT SOLSKOGEN AGAIN...", | ||
"I HOPE THAT DBUG WILL SHOW\0", | ||
"SOME KICKASS STUFF ON THE ORIC COMPUTER\0", | ||
"OR EVEN SOME GAME ?!\0", | ||
"ANYWAY, DBUG, THANKS FOR THE OSDK!\0", | ||
"THAT'S A HELL OF A PIECE OF SOFTWARE!\0", | ||
"THE WORLD DESERVES MORE TOOLS LIKE THIS!\0", | ||
// "AND I'D LOVE 48H DAYS TO TEST IT :')\0", | ||
|
||
/* Do not remove the next line */ | ||
"\0" | ||
}; | ||
|
||
const char *strings_end[] = | ||
{ | ||
/* | ||
"<----------- MAX HEADROOM ------------->\0" | ||
*/ | ||
"YOU'VE REACHED THE END OF THIS DEMO\0", | ||
"PRESS ANY BUTTON TO RESTART\0", | ||
"ccc RESISTANCE 2016 ccc\0", | ||
/* Do not remove the next line */ | ||
"\0" | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef RSE_DEMO_STRINGS | ||
#define RSE_DEMO_STRINGS | ||
|
||
extern char **demo_strings; | ||
extern const char *strings_logo_0[]; | ||
extern const char *strings_sim_0[]; | ||
extern const char *strings_sim_1[]; | ||
extern const char *strings_sim_2[]; | ||
extern const char *strings_sim_3[]; | ||
extern const char *strings_sim_4[]; | ||
extern const char *strings_sim_5[]; | ||
extern const char *strings_credits[]; | ||
extern const char *strings_greets[]; | ||
extern const char *strings_end[]; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
#include <genesis.h> | ||
#include <gfx.h> | ||
#include "img_seq.h" | ||
#include "transition_helper.h" | ||
|
||
#define RSE_DOT_UNPACK_2 TILE_BITS | ||
#define RSE_DOT_UNPACK_3 (TILE_BITS * 2) | ||
#define RSE_DOT_UNPACK_4 (TILE_BITS * 3) | ||
|
||
#define RSE_DOT_MASK_1 ((1 << TILE_BITS) - 1) | ||
#define RSE_DOT_MASK_2 ((1 << (TILE_BITS * 2)) - 1) | ||
#define RSE_DOT_MASK_3 ((1 << (TILE_BITS * 3)) - 1) | ||
#define RSE_DOT_MASK_4 ((1 << (TILE_BITS * 4)) - 1) | ||
|
||
#define RSE_GFX_WRITE_VRAM_ADDR(adr) ((0x4000 + ((adr) & 0x3FFF)) << 16) + (((adr) >> 14) | 0x00) | ||
#define RSE_CTRL_PORT 0xC00004 | ||
#define RSE_DATA_PORT 0xC00000 | ||
|
||
extern u16 vramIndex; | ||
extern u16 fontIndex; | ||
extern u8 framerate; | ||
|
||
void RSE_gridTileAnimation() | ||
{ | ||
u16 vblCount = 0, i, w; | ||
// u8 frame_switch = 0; | ||
u16 tmp_timer; | ||
Sprite sprites[16]; | ||
|
||
static void inline drawDotMatrix(void) | ||
{ | ||
u16 i = 0, j = 0, k; | ||
u16 tile_index, luma, unpacked_luma; | ||
u16 plan_width_by_y = 0; | ||
|
||
// frame_switch = !frame_switch; | ||
// if (frame_switch) | ||
// return; | ||
|
||
vu32 *plctrl; | ||
vu16 *pwdata; | ||
u32 addr; | ||
|
||
k = tore_tunnel_IMG_LEN; | ||
tile_index = (vblCount & (tore_tunnel_IMG_COUNT - 1)) * tore_tunnel_IMG_LEN; | ||
|
||
plctrl = (u32 *) RSE_CTRL_PORT; | ||
pwdata = (u16 *) RSE_DATA_PORT; | ||
|
||
while(k--) | ||
{ | ||
luma = star_tunnel_seq[tile_index]; | ||
|
||
unpacked_luma = (luma & RSE_DOT_MASK_4) >> RSE_DOT_UNPACK_4; | ||
addr = VDP_PLAN_A + ((i + plan_width_by_y) << 1); | ||
*plctrl = RSE_GFX_WRITE_VRAM_ADDR(addr); | ||
*pwdata = vramIndex + unpacked_luma; | ||
|
||
unpacked_luma = (luma & RSE_DOT_MASK_3) >> RSE_DOT_UNPACK_3; | ||
addr += 2; | ||
*plctrl = RSE_GFX_WRITE_VRAM_ADDR(addr); | ||
*pwdata = vramIndex + unpacked_luma; | ||
|
||
unpacked_luma = (luma & RSE_DOT_MASK_2) >> RSE_DOT_UNPACK_2; | ||
addr += 2; | ||
*plctrl = RSE_GFX_WRITE_VRAM_ADDR(addr); | ||
*pwdata = vramIndex + unpacked_luma; | ||
|
||
unpacked_luma = luma & RSE_DOT_MASK_1; | ||
addr += 2; | ||
*plctrl = RSE_GFX_WRITE_VRAM_ADDR(addr); | ||
*pwdata = vramIndex + unpacked_luma; | ||
i += 4; | ||
|
||
if (i >= 40) | ||
{ | ||
i = 0; | ||
plan_width_by_y += w; | ||
} | ||
|
||
tile_index++; | ||
} | ||
} | ||
|
||
SYS_disableInts(); | ||
|
||
/* Set a larger tileplan to be able to scroll */ | ||
VDP_setPlanSize(64, 64); | ||
w = VDP_getPlanWidth(); | ||
SPR_init(257); | ||
|
||
vramIndex = fontIndex; | ||
|
||
/* Load the fond tiles */ | ||
VDP_drawImageEx(APLAN, &pat_round, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, vramIndex), 0, 0, FALSE, FALSE); | ||
// VDP_setPalette(PAL0, pat_round.palette->data); | ||
|
||
VDP_setScrollingMode(HSCROLL_PLANE, VSCROLL_PLANE); | ||
VDP_drawImageEx(BPLAN, &alexkidd, TILE_ATTR_FULL(PAL1, TRUE, FALSE, FALSE, vramIndex + pat_round.tileset->numTile), ((320 - 207) >> 4) + 3, (128 >> 3) + 4, FALSE, FALSE); | ||
VDP_setVerticalScroll(PLAN_B, -64); | ||
// VDP_setPalette(PAL1, alexkidd.palette->data); | ||
|
||
SYS_enableInts(); | ||
|
||
SPR_initSprite(&sprites[0], &alexkidd_overlay, 48, 4, TILE_ATTR_FULL(PAL2, TRUE, FALSE, FALSE, FALSE)); | ||
SPR_update(sprites, 1); | ||
|
||
VDP_fadePalTo(PAL1, alexkidd.palette->data, 32, TRUE); | ||
for(i = 0; i < 32; i++) | ||
{ | ||
VDP_waitVSync(); | ||
VDP_setVerticalScroll(PLAN_B, ((easing_table[i << 5] * (108 + 64)) / 1024) - 64); | ||
} | ||
|
||
VDP_fadePalTo(PAL2, alexkidd_overlay.palette->data, 16, TRUE); | ||
for(i = 0; i < 32; i+=2) | ||
{ | ||
VDP_waitVSync(); | ||
SPR_setPosition(&sprites[0], (easing_table[i << 5] * 48) / 1024, 4); | ||
SPR_update(sprites, 1); | ||
} | ||
|
||
tmp_timer = RSE_FRAMES(32); | ||
VDP_fadePalTo(PAL0, pat_round.palette->data, tmp_timer, TRUE); | ||
|
||
while (vblCount < tmp_timer) | ||
{ | ||
VDP_waitVSync(); | ||
drawDotMatrix(); | ||
vblCount++; | ||
} | ||
|
||
tmp_timer += RSE_FRAMES(60 * 3); | ||
|
||
while (vblCount < tmp_timer) | ||
{ | ||
VDP_waitVSync(); | ||
drawDotMatrix(); | ||
vblCount++; | ||
} | ||
|
||
tmp_timer += RSE_FRAMES(16); | ||
VDP_fadeOut(0, 63, RSE_FRAMES(16), TRUE); | ||
|
||
while (vblCount < tmp_timer) | ||
{ | ||
VDP_waitVSync(); | ||
drawDotMatrix(); | ||
vblCount++; | ||
} | ||
|
||
RSE_turn_screen_to_black(); | ||
|
||
SPR_end(); | ||
|
||
for(i = 0; i < 224 >> 3; i++) | ||
{ | ||
VDP_waitVSync(); | ||
RSE_clearTileRowB(i); | ||
RSE_clearTileRowA(i); | ||
} | ||
|
||
RSE_resetScrolling(); | ||
} |
Oops, something went wrong.