Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto pull sgdk #8

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,8 @@ dkms.conf
/.idea/
/cmake-build-release/
out.lst

# CMake
build

.DS_Store
29 changes: 29 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
SGDK_VERSION=1.90
SGDK_FOLDER=depends/sgdk

pull:
git submodule update --init --remote --recursive
cd ${SGDK_FOLDER} && git checkout tags/v${SGDK_VERSION}

.PHONY: build
build: pull
mkdir -p build && \
cd build && \
cmake .. && \
make

clean:
rm -rf build out/*

OSM=$(shell uname -sm)
ifeq ($(OSM),Darwin arm64) # Mac OS X - arm
M1=-m1
endif
docker-build-sgdk: pull
cd ${SGDK_FOLDER} && docker build . -f Dockerfile${M1} -t sgdk:${SGDK_VERSION}${M1}

docker-build: docker-build-sgdk
docker run -it --rm -v "${PWD}":/src -w /src sgdk:${SGDK_VERSION}${M1}

docker-shell:
docker run -it --rm -v "${PWD}":/src -w /src --entrypoint=/bin/bash sgdk:${SGDK_VERSION}${M1}
2 changes: 1 addition & 1 deletion depends/sgdk
Submodule sgdk updated 4319 files
2 changes: 1 addition & 1 deletion res/resource.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _RES_RESOURCE_H_
#define _RES_RESOURCE_H_

extern const SpriteDefinition player;
extern const Image tilemap;
extern const SpriteDefinition player;

#endif // _RES_RESOURCE_H_
84 changes: 33 additions & 51 deletions src/boot/rom_head.c
Original file line number Diff line number Diff line change
@@ -1,51 +1,33 @@
#include "genesis.h"

__attribute__((externally_visible))
const struct
{
char console[16]; /* Console Name (16) */
char copyright[16]; /* Copyright Information (16) */
char title_local[48]; /* Domestic Name (48) */
char title_int[48]; /* Overseas Name (48) */
char serial[14]; /* Serial Number (2, 12) */
u16 checksum; /* Checksum (2) */
char IOSupport[16]; /* I/O Support (16) */
u32 rom_start; /* ROM Start Address (4) */
u32 rom_end; /* ROM End Address (4) */
u32 ram_start; /* Start of Backup RAM (4) */
u32 ram_end; /* End of Backup RAM (4) */
char sram_sig[2]; /* "RA" for save ram (2) */
u16 sram_type; /* 0xF820 for save ram on odd bytes (2) */
u32 sram_start; /* SRAM start address - normally 0x200001 (4) */
u32 sram_end; /* SRAM end address - start + 2*sram_size (4) */
char modem_support[12]; /* Modem Support (24) */
char notes[40]; /* Memo (40) */
char region[16]; /* Country Support (16) */
} rom_header = {
#if (ENABLE_BANK_SWITCH != 0)
"SEGA SSF ",
#else
"SEGA MEGA DRIVE ",
#endif
"(C)SGDK 2019 ",
"MegaDrive Maze ",
"MegaDrive Maze ",
"GM 00000000-00",
0x0000,
"JD ",
0x00000000,
#if (ENABLE_BANK_SWITCH != 0)
0x003FFFFF,
#else
0x000FFFFF,
#endif
0x00FF0000,
0x00FFFFFF,
" ",
0x0000,
0x00200000,
0x002001FF,
" ",
"DEMONSTRATION PROGRAM ",
"JUE "
};
#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)SGDK 2023 ",
"MegaDrive Maze ",
"MegaDrive Maze ",
"GM 00000000-00",
0x000,
"JD ",
0x00000000,
#if (ENABLE_BANK_SWITCH != 0)
0x003FFFFF,
#else
0x000FFFFF,
#endif
0xE0FF0000,
0xE0FFFFFF,
"RA",
0xF820,
0x00200000,
0x0020FFFF,
" ",
"DEMONSTRATION PROGRAM ",
"JUE "
};
Loading