This repository has been archived by the owner on Sep 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Commit but with the useful files.
- Loading branch information
TheWindowsPro98
committed
Aug 21, 2023
1 parent
e62a9aa
commit e586c9c
Showing
39 changed files
with
1,276 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export GDK ?= /opt/toolchains/mars/m68k-elf | ||
MMLNK = $(CTRMML_DIR)/mdslink | ||
MMLNK_ARGS = -o ./res/mdsseq.bin ./res/mdsbin.bin -h ./res/mdsseq.h | ||
mdsdrv: | ||
ifndef CTRMML_DIR | ||
$(error "Can not find MDSDRV music linker! Please set the CTRMML_DIR environment variable to its path.") | ||
else | ||
$(MMLNK) $(MMLNK_ARGS) res/mus/*.mds | ||
endif | ||
include $(GDK)/makefile.gen |
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 @@ | ||
#!/usr/bin/fish | ||
make mdsdrv && make release && blastem ./out/rom.bin |
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,10 @@ | ||
#pragma once | ||
|
||
#include "includes.h" | ||
|
||
enum stopCodes {genericErr,featureNotFound,regionInvalid,menuIndexInvalid}; | ||
|
||
|
||
/// @brief Shows a BSOD. | ||
/// @param stopcode The error code. | ||
void killExec(u32 stopcode); |
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,11 @@ | ||
#pragma once | ||
|
||
#include <genesis.h> | ||
#include "palettes.h" | ||
#include "image.h" | ||
#include "tiles.h" | ||
#include "spr.h" | ||
#include "mdsdat.h" | ||
#include "mdsdrv.h" | ||
#include "main.h" | ||
#include "bsod.h" |
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,24 @@ | ||
#pragma once | ||
|
||
#include "includes.h" | ||
|
||
enum consoleRegions {ntscJPN = 0x20, ntscUSA = 0xA0, palEUR = 0xE0, palJPN = 0x60}; | ||
|
||
typedef struct | ||
{ | ||
u8 x; | ||
u8 y; | ||
char* label; | ||
}Option; | ||
|
||
extern u8 palFadeTime; | ||
extern u8 vblankRate; | ||
extern const u8* region; | ||
extern u8* currentIndex; | ||
|
||
#define MUSIC_FADE MDS_fade(127,7,TRUE) | ||
#define PAL_FADE_OUT PAL_fadeOutAll(palFadeTime,TRUE); | ||
#define CLEAR_BG1 VDP_clearPlane(BG_A,TRUE); | ||
#define CLEAR_BG2 VDP_clearPlane(BG_B,TRUE); | ||
#define TILE_TO_PIXEL(tile) (tile << 3) | ||
#define SELECTION_SFX MDS_request(MDS_SE1,BGM_SFX_S1SELECT) |
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,8 @@ | ||
#pragma once | ||
|
||
#include "includes.h" | ||
|
||
extern const u16 segaPalette[32]; | ||
extern const u16 titlePalette[32]; | ||
extern const u16 playerPalettes[4][16]; | ||
extern const u16 bsodPalette[16]; |
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,19 @@ | ||
JASC-PAL | ||
0100 | ||
16 | ||
238 0 238 | ||
0 0 0 | ||
68 68 136 | ||
102 102 170 | ||
136 136 204 | ||
170 170 238 | ||
238 238 238 | ||
0 204 102 | ||
0 136 68 | ||
0 102 68 | ||
0 68 68 | ||
136 68 34 | ||
170 102 68 | ||
204 136 102 | ||
0 0 0 | ||
0 0 0 |
Binary file not shown.
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,9 @@ | ||
#ifndef _RES_IMAGE_H_ | ||
#define _RES_IMAGE_H_ | ||
|
||
extern const Image sega_fg; | ||
extern const Image sega_bg; | ||
extern const Image title_logo; | ||
extern const Image title_bg; | ||
|
||
#endif // _RES_IMAGE_H_ |
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,4 @@ | ||
IMAGE sega_fg "image/sega.png" BEST ALL | ||
IMAGE sega_bg "image/sega_clr.png" BEST ALL | ||
IMAGE title_logo "image/title.png" BEST ALL | ||
IMAGE title_bg "image/title_bg.png" BEST ALL |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
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,8 @@ | ||
#ifndef _RES_MDSDAT_H_ | ||
#define _RES_MDSDAT_H_ | ||
|
||
extern const u8 mdsdrvdat[8202]; | ||
extern const u8 mdsseqdat[2176]; | ||
extern const u8 mdspcmdat[61516]; | ||
|
||
#endif // _RES_MDSDAT_H_ |
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,3 @@ | ||
BIN mdsdrvdat "mdsdrv.bin" 2 2 0 NONE FALSE | ||
BIN mdsseqdat "mdsseq.bin" 2 2 0 NONE FALSE | ||
BIN mdspcmdat "mdsbin.bin" 32768 2 0 NONE FALSE |
Binary file not shown.
Binary file not shown.
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,7 @@ | ||
#define BGM_MIN 1 | ||
#define BGM_MUS_CLI2 1 | ||
#define BGM_MUS_S2BLVS 2 | ||
#define BGM_MUS_S3CLEAR 3 | ||
#define BGM_SFX_S1SELECT 4 | ||
#define BGM_SFX_SEGA 5 | ||
#define BGM_MAX 5 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,6 @@ | ||
#ifndef _RES_SPR_H_ | ||
#define _RES_SPR_H_ | ||
|
||
extern const SpriteDefinition cursor; | ||
|
||
#endif // _RES_SPR_H_ |
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 @@ | ||
SPRITE cursor "spr/cursor.png" 1 1 BEST 0 |
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,7 @@ | ||
#ifndef _RES_TILES_H_ | ||
#define _RES_TILES_H_ | ||
|
||
extern const TileSet main_font; | ||
extern const TileSet bsodFont; | ||
|
||
#endif // _RES_TILES_H_ |
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 @@ | ||
TILESET main_font "tiles/font_menu.png" BEST NONE | ||
TILESET bsodFont "tiles/font_lc.png" BEST NONE |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,33 @@ | ||
#include "genesis.h" | ||
|
||
__attribute__((externally_visible)) | ||
const ROMHeader rom_header = { | ||
#if (ENABLE_BANK_SWITCH != 0) | ||
"SEGA SSF ", | ||
#elif (MODULE_MEGAWIFI != 0) | ||
"SEGA MEGAWIFI ", | ||
#else | ||
"SEGA MEGA DRIVE ", | ||
#endif | ||
"(C)RD23 2023.AUG", | ||
"PROJECT DAISY MEGADRIVE BUILD 20230820", | ||
"PROJECT DAISY GENESIS BUILD 20230820", | ||
"GM 88688463-00", | ||
0x000, | ||
"JD ", | ||
0x00000000, | ||
#if (ENABLE_BANK_SWITCH != 0) | ||
0x003FFFFF, | ||
#else | ||
0x000FFFFF, | ||
#endif | ||
0xE0FF0000, | ||
0xE0FFFFFF, | ||
"RA", | ||
0xF820, | ||
0x00200000, | ||
0x0020FFFF, | ||
" ", | ||
"193 days remaining; it's a new day ", | ||
"JUE " | ||
}; |
Oops, something went wrong.