commit e69bcd5df44198a4aa2c376c72d812e80735b8bf Author: Squideo Kojima Date: Tue Nov 17 21:34:26 2015 -0800 Hello World diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1f90d69 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.o +*.nes +*~ +game.s +.DS_Store +*.swp diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7854aa5 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +ROM_CONFIG = nrom.cfg +CRT_OBJ = crt0.o +GAME_OBJ = game.o +RUNTIME_LIB = runtime.lib + +EXECUTABLE = splatood.nes + +ASM = ca65 +CC = cc65 +LD = ld65 + + +all: $(EXECUTABLE) ${CRT_OBJ} + +crt0.o: *.s + +%.s: %.c *.h + $(CC) -Oi $< --add-source + +%.o: %.s + $(ASM) $< + +$(EXECUTABLE): $(GAME_OBJ) $(ROM_CONFIG) $(CRT_OBJ) $(RUNTIME_LIB) + $(LD) -C $(ROM_CONFIG) -o $(EXECUTABLE) $(CRT_OBJ) $(GAME_OBJ) $(RUNTIME_LIB) + +clean: + rm -f game.s *.o *.nes + + +.SECONDARY: # suppress removal of intermediate build files +%.o: %.c # suppress built in rule to build .o from .c diff --git a/README.md b/README.md new file mode 100644 index 0000000..9daf734 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# SplatooD: A Splatoon demake for NES + +![screenshot](http://i.imgur.com/jGOvsaF.png) + +## Controls + +D-pad to move, A to flick roller, START to pause. Menus accept D-pad to move cursor and START to select an item. + +## Building + +Install [cc65](ftp://ftp.musoftware.de/pub/uz/cc65/cc65-sources-2.13.3.tar.bz2) v2.13.3 or thereabouts and then run `make`. + +Assets were created in NESST and Famitracker. + +### Updating Strings + +All strings in SplatooD are formatted as EBCDIC with an offset. Use the Python script in `util/ebcdic.py` to convert ASCII to appropriate arrays. + +### Updating Nametable Headers + +There is a tool to convert binary nametables into C headers in `util/bin-to-h.py`. + +## Cartridge Details + +We target an NROM256 cartridge with two 16kB PRG ROMs and one 8kB CHR ROM. diff --git a/art/bluefin.nam b/art/bluefin.nam new file mode 100644 index 0000000..1c7b3c0 Binary files /dev/null and b/art/bluefin.nam differ diff --git a/art/bluefin_depot_nametable.bmp b/art/bluefin_depot_nametable.bmp new file mode 100644 index 0000000..ad440da Binary files /dev/null and b/art/bluefin_depot_nametable.bmp differ diff --git a/art/bluefin_depot_nametable.nam b/art/bluefin_depot_nametable.nam new file mode 100644 index 0000000..43772af Binary files /dev/null and b/art/bluefin_depot_nametable.nam differ diff --git a/art/combined_chr.chr b/art/combined_chr.chr new file mode 100644 index 0000000..e9daa46 Binary files /dev/null and b/art/combined_chr.chr differ diff --git a/art/combined_tiles.bmp b/art/combined_tiles.bmp new file mode 100644 index 0000000..3e834db Binary files /dev/null and b/art/combined_tiles.bmp differ diff --git a/art/endgame.nam b/art/endgame.nam new file mode 100644 index 0000000..7154dd1 Binary files /dev/null and b/art/endgame.nam differ diff --git a/art/inkling_tiles.bmp b/art/inkling_tiles.bmp new file mode 100644 index 0000000..514f982 Binary files /dev/null and b/art/inkling_tiles.bmp differ diff --git a/art/kelp_dome_nametable.bmp b/art/kelp_dome_nametable.bmp new file mode 100644 index 0000000..f19f14e Binary files /dev/null and b/art/kelp_dome_nametable.bmp differ diff --git a/art/kelp_dome_nametable.nam b/art/kelp_dome_nametable.nam new file mode 100644 index 0000000..7e7b639 Binary files /dev/null and b/art/kelp_dome_nametable.nam differ diff --git a/art/map_tiles.bmp b/art/map_tiles.bmp new file mode 100644 index 0000000..27ee45f Binary files /dev/null and b/art/map_tiles.bmp differ diff --git a/art/palette.pal b/art/palette.pal new file mode 100644 index 0000000..b4d5733 --- /dev/null +++ b/art/palette.pal @@ -0,0 +1 @@ +00!1$): \ No newline at end of file diff --git a/art/saltspray_rig.bmp b/art/saltspray_rig.bmp new file mode 100644 index 0000000..80ffb82 Binary files /dev/null and b/art/saltspray_rig.bmp differ diff --git a/art/saltspray_rig.nam b/art/saltspray_rig.nam new file mode 100644 index 0000000..683a3a0 Binary files /dev/null and b/art/saltspray_rig.nam differ diff --git a/art/test_map.nam b/art/test_map.nam new file mode 100644 index 0000000..bc5a86f Binary files /dev/null and b/art/test_map.nam differ diff --git a/crt0.s b/crt0.s new file mode 100644 index 0000000..8002161 --- /dev/null +++ b/crt0.s @@ -0,0 +1,259 @@ +; Startup code for cc65 and Shiru's NES library +; based on code by Groepaz/Hitmen , Ullrich von Bassewitz + + +FT_DPCM_OFF = $c000 ;$c000..$ffc0, 64-byte steps +FT_SFX_STREAMS = 4 ;number of sound effects played at once, 1..4 + +.define FT_DPCM_ENABLE 1 ;undefine to exclude all DMC code +.define FT_SFX_ENABLE 1 ;undefine to exclude all sound effects code + + + + .export _exit,__STARTUP__:absolute=1 + .import initlib,push0,popa,popax,_main,zerobss,copydata + +; Linker generated symbols + .import __RAM_START__ ,__RAM_SIZE__ + .import __ROM0_START__ ,__ROM0_SIZE__ + .import __STARTUP_LOAD__,__STARTUP_RUN__,__STARTUP_SIZE__ + .import __CODE_LOAD__ ,__CODE_RUN__ ,__CODE_SIZE__ + .import __RODATA_LOAD__ ,__RODATA_RUN__ ,__RODATA_SIZE__ + .import NES_MAPPER,NES_PRG_BANKS,NES_CHR_BANKS,NES_MIRRORING + .include "zeropage.inc" + + + +FT_BASE_ADR =$0100 ;page in RAM, should be $xx00 + +.define FT_THREAD 1 ;undefine if you call sound effects in the same thread as sound update +.define FT_PAL_SUPPORT 1 ;undefine to exclude PAL support +.define FT_NTSC_SUPPORT 1 ;undefine to exclude NTSC support + + +PPU_CTRL =$2000 +PPU_MASK =$2001 +PPU_STATUS =$2002 +PPU_OAM_ADDR=$2003 +PPU_OAM_DATA=$2004 +PPU_SCROLL =$2005 +PPU_ADDR =$2006 +PPU_DATA =$2007 +PPU_OAM_DMA =$4014 +PPU_FRAMECNT=$4017 +DMC_FREQ =$4010 +CTRL_PORT1 =$4016 +CTRL_PORT2 =$4017 + +OAM_BUF =$0200 +PAL_BUF =$01c0 + + + +.segment "ZEROPAGE" + +NTSC_MODE: .res 1 +FRAME_CNT1: .res 1 +FRAME_CNT2: .res 1 +VRAM_UPDATE: .res 1 +NAME_UPD_ADR: .res 2 +NAME_UPD_ENABLE: .res 1 +PAL_UPDATE: .res 1 +PAL_BG_PTR: .res 2 +PAL_SPR_PTR: .res 2 +SCROLL_X: .res 1 +SCROLL_Y: .res 1 +SCROLL_X1: .res 1 +SCROLL_Y1: .res 1 +PAD_STATE: .res 2 ;one byte per controller +PAD_STATEP: .res 2 +PAD_STATET: .res 2 +PPU_CTRL_VAR: .res 1 +PPU_CTRL_VAR1: .res 1 +PPU_MASK_VAR: .res 1 +RAND_SEED: .res 2 +FT_TEMP: .res 3 + +TEMP: .res 11 + +PAD_BUF =TEMP+1 + +PTR =TEMP ;word +LEN =TEMP+2 ;word +NEXTSPR =TEMP+4 +SCRX =TEMP+5 +SCRY =TEMP+6 +SRC =TEMP+7 ;word +DST =TEMP+9 ;word + +RLE_LOW =TEMP +RLE_HIGH =TEMP+1 +RLE_TAG =TEMP+2 +RLE_BYTE =TEMP+3 + + + +.segment "HEADER" + + .byte $4e,$45,$53,$1a + .byte (__RAM_START__+__RAM_SIZE__) + sta sp+1 ; Set argument stack ptr + + jsr initlib + + lda #%10000000 + sta music_data + lda sounds_data + jsr FamiToneSfxInit + .endif + + lda #$fd + sta >6 + + +;zero page variables + +FT_TEMP_PTR = FT_TEMP ;word +FT_TEMP_PTR_L = FT_TEMP_PTR+0 +FT_TEMP_PTR_H = FT_TEMP_PTR+1 +FT_TEMP_VAR1 = FT_TEMP+2 + + +;envelope structure offsets, 5 bytes per envelope, grouped by variable type + +FT_ENVELOPES_ALL = 3+3+3+2 ;3 for the pulse and triangle channels, 2 for the noise channel +FT_ENV_STRUCT_SIZE = 5 + +FT_ENV_VALUE = FT_BASE_ADR+0*FT_ENVELOPES_ALL +FT_ENV_REPEAT = FT_BASE_ADR+1*FT_ENVELOPES_ALL +FT_ENV_ADR_L = FT_BASE_ADR+2*FT_ENVELOPES_ALL +FT_ENV_ADR_H = FT_BASE_ADR+3*FT_ENVELOPES_ALL +FT_ENV_PTR = FT_BASE_ADR+4*FT_ENVELOPES_ALL + + +;channel structure offsets, 7 bytes per channel + +FT_CHANNELS_ALL = 5 +FT_CHN_STRUCT_SIZE = 9 + +FT_CHN_PTR_L = FT_BASE_ADR+0*FT_CHANNELS_ALL +FT_CHN_PTR_H = FT_BASE_ADR+1*FT_CHANNELS_ALL +FT_CHN_NOTE = FT_BASE_ADR+2*FT_CHANNELS_ALL +FT_CHN_INSTRUMENT = FT_BASE_ADR+3*FT_CHANNELS_ALL +FT_CHN_REPEAT = FT_BASE_ADR+4*FT_CHANNELS_ALL +FT_CHN_RETURN_L = FT_BASE_ADR+5*FT_CHANNELS_ALL +FT_CHN_RETURN_H = FT_BASE_ADR+6*FT_CHANNELS_ALL +FT_CHN_REF_LEN = FT_BASE_ADR+7*FT_CHANNELS_ALL +FT_CHN_DUTY = FT_BASE_ADR+8*FT_CHANNELS_ALL + + +;variables and aliases + +FT_ENVELOPES = FT_BASE_ADR +FT_CH1_ENVS = FT_ENVELOPES+0 +FT_CH2_ENVS = FT_ENVELOPES+3 +FT_CH3_ENVS = FT_ENVELOPES+6 +FT_CH4_ENVS = FT_ENVELOPES+9 + +FT_CHANNELS = FT_ENVELOPES+FT_ENVELOPES_ALL*FT_ENV_STRUCT_SIZE +FT_CH1_VARS = FT_CHANNELS+0 +FT_CH2_VARS = FT_CHANNELS+1 +FT_CH3_VARS = FT_CHANNELS+2 +FT_CH4_VARS = FT_CHANNELS+3 +FT_CH5_VARS = FT_CHANNELS+4 + + +FT_CH1_NOTE = FT_CH1_VARS+.lobyte(FT_CHN_NOTE) +FT_CH2_NOTE = FT_CH2_VARS+.lobyte(FT_CHN_NOTE) +FT_CH3_NOTE = FT_CH3_VARS+.lobyte(FT_CHN_NOTE) +FT_CH4_NOTE = FT_CH4_VARS+.lobyte(FT_CHN_NOTE) +FT_CH5_NOTE = FT_CH5_VARS+.lobyte(FT_CHN_NOTE) + +FT_CH1_INSTRUMENT = FT_CH1_VARS+.lobyte(FT_CHN_INSTRUMENT) +FT_CH2_INSTRUMENT = FT_CH2_VARS+.lobyte(FT_CHN_INSTRUMENT) +FT_CH3_INSTRUMENT = FT_CH3_VARS+.lobyte(FT_CHN_INSTRUMENT) +FT_CH4_INSTRUMENT = FT_CH4_VARS+.lobyte(FT_CHN_INSTRUMENT) +FT_CH5_INSTRUMENT = FT_CH5_VARS+.lobyte(FT_CHN_INSTRUMENT) + +FT_CH1_DUTY = FT_CH1_VARS+.lobyte(FT_CHN_DUTY) +FT_CH2_DUTY = FT_CH2_VARS+.lobyte(FT_CHN_DUTY) +FT_CH3_DUTY = FT_CH3_VARS+.lobyte(FT_CHN_DUTY) +FT_CH4_DUTY = FT_CH4_VARS+.lobyte(FT_CHN_DUTY) +FT_CH5_DUTY = FT_CH5_VARS+.lobyte(FT_CHN_DUTY) + +FT_CH1_VOLUME = FT_CH1_ENVS+.lobyte(FT_ENV_VALUE)+0 +FT_CH2_VOLUME = FT_CH2_ENVS+.lobyte(FT_ENV_VALUE)+0 +FT_CH3_VOLUME = FT_CH3_ENVS+.lobyte(FT_ENV_VALUE)+0 +FT_CH4_VOLUME = FT_CH4_ENVS+.lobyte(FT_ENV_VALUE)+0 + +FT_CH1_NOTE_OFF = FT_CH1_ENVS+.lobyte(FT_ENV_VALUE)+1 +FT_CH2_NOTE_OFF = FT_CH2_ENVS+.lobyte(FT_ENV_VALUE)+1 +FT_CH3_NOTE_OFF = FT_CH3_ENVS+.lobyte(FT_ENV_VALUE)+1 +FT_CH4_NOTE_OFF = FT_CH4_ENVS+.lobyte(FT_ENV_VALUE)+1 + +FT_CH1_PITCH_OFF = FT_CH1_ENVS+.lobyte(FT_ENV_VALUE)+2 +FT_CH2_PITCH_OFF = FT_CH2_ENVS+.lobyte(FT_ENV_VALUE)+2 +FT_CH3_PITCH_OFF = FT_CH3_ENVS+.lobyte(FT_ENV_VALUE)+2 + + +FT_VARS = FT_CHANNELS+FT_CHANNELS_ALL*FT_CHN_STRUCT_SIZE + +FT_PAL_ADJUST = FT_VARS+0 +FT_SONG_LIST_L = FT_VARS+1 +FT_SONG_LIST_H = FT_VARS+2 +FT_INSTRUMENT_L = FT_VARS+3 +FT_INSTRUMENT_H = FT_VARS+4 +FT_TEMPO_STEP_L = FT_VARS+5 +FT_TEMPO_STEP_H = FT_VARS+6 +FT_TEMPO_ACC_L = FT_VARS+7 +FT_TEMPO_ACC_H = FT_VARS+8 +FT_SONG_SPEED = FT_CH5_INSTRUMENT +FT_PULSE1_PREV = FT_CH3_DUTY +FT_PULSE2_PREV = FT_CH5_DUTY +FT_DPCM_LIST_L = FT_VARS+9 +FT_DPCM_LIST_H = FT_VARS+10 +FT_DPCM_EFFECT = FT_VARS+11 +FT_OUT_BUF = FT_VARS+12 ;11 bytes + + +;sound effect stream variables, 2 bytes and 15 bytes per stream +;when sound effects are disabled, this memory is not used + +FT_SFX_ADR_L = FT_VARS+23 +FT_SFX_ADR_H = FT_VARS+24 +FT_SFX_BASE_ADR = FT_VARS+25 + +FT_SFX_STRUCT_SIZE = 15 +FT_SFX_REPEAT = FT_SFX_BASE_ADR+0 +FT_SFX_PTR_L = FT_SFX_BASE_ADR+1 +FT_SFX_PTR_H = FT_SFX_BASE_ADR+2 +FT_SFX_OFF = FT_SFX_BASE_ADR+3 +FT_SFX_BUF = FT_SFX_BASE_ADR+4 ;11 bytes + + +;aliases for sound effect channels to use in user calls + +FT_SFX_CH0 = FT_SFX_STRUCT_SIZE*0 +FT_SFX_CH1 = FT_SFX_STRUCT_SIZE*1 +FT_SFX_CH2 = FT_SFX_STRUCT_SIZE*2 +FT_SFX_CH3 = FT_SFX_STRUCT_SIZE*3 + + +;aliases for the APU registers + +APU_PL1_VOL = $4000 +APU_PL1_SWEEP = $4001 +APU_PL1_LO = $4002 +APU_PL1_HI = $4003 +APU_PL2_VOL = $4004 +APU_PL2_SWEEP = $4005 +APU_PL2_LO = $4006 +APU_PL2_HI = $4007 +APU_TRI_LINEAR = $4008 +APU_TRI_LO = $400a +APU_TRI_HI = $400b +APU_NOISE_VOL = $400c +APU_NOISE_LO = $400e +APU_NOISE_HI = $400f +APU_DMC_FREQ = $4010 +APU_DMC_RAW = $4011 +APU_DMC_START = $4012 +APU_DMC_LEN = $4013 +APU_SND_CHN = $4015 + + +;aliases for the APU registers in the output buffer + + .if(!FT_SFX_ENABLE) ;if sound effects are disabled, write to the APU directly +FT_MR_PULSE1_V = APU_PL1_VOL +FT_MR_PULSE1_L = APU_PL1_LO +FT_MR_PULSE1_H = APU_PL1_HI +FT_MR_PULSE2_V = APU_PL2_VOL +FT_MR_PULSE2_L = APU_PL2_LO +FT_MR_PULSE2_H = APU_PL2_HI +FT_MR_TRI_V = APU_TRI_LINEAR +FT_MR_TRI_L = APU_TRI_LO +FT_MR_TRI_H = APU_TRI_HI +FT_MR_NOISE_V = APU_NOISE_VOL +FT_MR_NOISE_F = APU_NOISE_LO + .else ;otherwise write to the output buffer +FT_MR_PULSE1_V = FT_OUT_BUF +FT_MR_PULSE1_L = FT_OUT_BUF+1 +FT_MR_PULSE1_H = FT_OUT_BUF+2 +FT_MR_PULSE2_V = FT_OUT_BUF+3 +FT_MR_PULSE2_L = FT_OUT_BUF+4 +FT_MR_PULSE2_H = FT_OUT_BUF+5 +FT_MR_TRI_V = FT_OUT_BUF+6 +FT_MR_TRI_L = FT_OUT_BUF+7 +FT_MR_TRI_H = FT_OUT_BUF+8 +FT_MR_NOISE_V = FT_OUT_BUF+9 +FT_MR_NOISE_F = FT_OUT_BUF+10 + .endif + + + +;------------------------------------------------------------------------------ +; reset APU, initialize FamiTone +; in: A 0 for PAL, not 0 for NTSC +; X,Y pointer to music data +;------------------------------------------------------------------------------ + +FamiToneInit: + + stx FT_SONG_LIST_L ;store music data pointer for further use + sty FT_SONG_LIST_H + stx 0 + ldx #FT_SFX_CH0 + jsr _FT2SfxUpdate + .endif + .if FT_SFX_STREAMS>1 + ldx #FT_SFX_CH1 + jsr _FT2SfxUpdate + .endif + .if FT_SFX_STREAMS>2 + ldx #FT_SFX_CH2 + jsr _FT2SfxUpdate + .endif + .if FT_SFX_STREAMS>3 + ldx #FT_SFX_CH3 + jsr _FT2SfxUpdate + .endif + + + ;send data from the output buffer to the APU + + lda FT_OUT_BUF ;pulse 1 volume + sta APU_PL1_VOL + lda FT_OUT_BUF+1 ;pulse 1 period LSB + sta APU_PL1_LO + lda FT_OUT_BUF+2 ;pulse 1 period MSB, only applied when changed + cmp FT_PULSE1_PREV + beq @no_pulse1_upd + sta FT_PULSE1_PREV + sta APU_PL1_HI +@no_pulse1_upd: + + lda FT_OUT_BUF+3 ;pulse 2 volume + sta APU_PL2_VOL + lda FT_OUT_BUF+4 ;pulse 2 period LSB + sta APU_PL2_LO + lda FT_OUT_BUF+5 ;pulse 2 period MSB, only applied when changed + cmp FT_PULSE2_PREV + beq @no_pulse2_upd + sta FT_PULSE2_PREV + sta APU_PL2_HI +@no_pulse2_upd: + + lda FT_OUT_BUF+6 ;triangle volume (plays or not) + sta APU_TRI_LINEAR + lda FT_OUT_BUF+7 ;triangle period LSB + sta APU_TRI_LO + lda FT_OUT_BUF+8 ;triangle period MSB + sta APU_TRI_HI + + lda FT_OUT_BUF+9 ;noise volume + sta APU_NOISE_VOL + lda FT_OUT_BUF+10 ;noise period + sta APU_NOISE_LO + + .endif + + .if(FT_THREAD) + pla + sta FT_TEMP_PTR_H + pla + sta FT_TEMP_PTR_L + .endif + + rts + + +;internal routine, sets up envelopes of a channel according to current instrument +;in X envelope group offset, A instrument number + +_FT2SetInstrument: + asl a ;instrument number is pre multiplied by 4 + tay + lda FT_INSTRUMENT_H + adc #0 ;use carry to extend range for 64 instruments + sta > 8) + 3, 0xc0 + palette_address, palette_state[palette_address]); +} + +void reset_palette_state() { + unsigned char i; + for (i = 0; i < 64; i++) { + palette_state[i] = 0; + } +} + +/* Player scores */ +static unsigned int player_score[2] = { 0 }; + +/** + * Calculate a player's score from map data. + */ +unsigned int score_player(unsigned char player_id) { + unsigned char mask; + unsigned char intermediate; + unsigned int score = 0; + unsigned char i; + mask = player_id + 1; + mask = ((mask << 2) | mask ); + mask = ((mask << 4) | mask ); + for (i = 0; i < 64; i++) { + intermediate = palette_state[i] ^ (~ mask); + intermediate = 0x55 & intermediate & (intermediate >> 1); + intermediate = (intermediate >> 4) + (intermediate & 0x0f); + score += (intermediate >> 2) + (intermediate & 0x03); + } + return score; +} + +/** + * Determine if a given map tile can be inked. + */ +unsigned char can_ink(unsigned char map_type) { + if (map_type == 0x2c || + map_type == 0x2d || + map_type == 0x3c || + map_type == 0x3d || + map_type == 0x2a || + map_type == 0x2b || + map_type == 0x3a || + map_type == 0x3b) { + return FALSE; + } + return TRUE; +} + +/* Make sure this stays a multiple of 2 */ +#define TITLE_ROLL_HEIGHT 110 + +/** + * Used on title and credits screens to + * delay while waiting for "START" to be pressed. + * + * Allows for skippable animations. + */ +#define WAIT_WITH_SKIP(w) \ + wait = w; \ + while (1) { \ + if (wait == 0) break; \ + wait--; \ + ppu_wait_frame(); \ + if ((pad_trigger(0) | pad_trigger(1)) & PAD_START) { \ + goto _skip_title; \ + } \ + } + +/** + * Show title screen. + */ +void show_title(void) { + /* Ensure we have the write CHR bank set for the title, and reset scroll to 0. */ + ppu_off(); + bank_bg(0); + scroll(0,TITLE_ROLL_HEIGHT); + + /* Load title screen into NAME A */ + vram_adr(NAMETABLE_A); + vram_write(splat_title,sizeof(splat_title)); + + /* Clear nametable C to avoid artifacts when bouncing. */ + vram_adr(NAMETABLE_C); + vram_fill(0,1024); + + pal_bright(4); + pal_bg(palTitleA); + ppu_on_bg(); + WAIT_WITH_SKIP(20); + + frame_cnt=0; + wait=10; + + /* Scroll */ + while (1) { + frame_cnt += 2; + scroll(0,TITLE_ROLL_HEIGHT-frame_cnt); + + if (frame_cnt == TITLE_ROLL_HEIGHT) break; + + ppu_wait_frame(); + + if ((pad_trigger(0) | pad_trigger(1)) & PAD_START) { + goto _skip_title; + } + } + + scroll(0,0); + + /* Splat splat splat */ + WAIT_WITH_SKIP(20); + sfx_play(SFX_ITEM,0); + pal_bg(palTitleB); + WAIT_WITH_SKIP(20); + sfx_play(SFX_ITEM,0); + pal_bg(palTitleC); + WAIT_WITH_SKIP(20); + sfx_play(SFX_ITEM,0); + pal_bg(palTitle); + WAIT_WITH_SKIP(20); + music_play(MUSIC_TITLE); + + pal_col(15,0x30); + + wait = 10; + frame_cnt = 0; + + while (1) { + + /* Flash start between white and gray. */ + wait--; + if (!wait) { + pal_col(15,(frame_cnt&1)?0x30:0x20); + wait = 10; + frame_cnt++; + } + + ppu_wait_frame(); + + /* Wait for input to start game. */ + if ((pad_trigger(0) | pad_trigger(1)) & PAD_START) { + break; + } + } + +_skip_title: + scroll(0,0); + pal_bg(palTitle); + + music_stop(); + + sfx_play(SFX_START,0); + + /* Blink rapidly. */ + for (i=0;i<16;++i) { + pal_col(15, (i & 1) ? 0x0f : 0x20); + delay(4); + } + +} + +/* Where numbers start in the EBCDIC tileset */ +#define NUM_START 0xB0 + +/** + * Put a number into the vram nametable when not rendering. + * Cheaper than an update table, but only use this when + * initializing VRAM and not during play. + */ +void put_num(unsigned int adr,unsigned int num,unsigned char len) { + vram_adr(adr); + + if (len>2) vram_put(NUM_START+(num/100)%10); + if (len>1) vram_put(NUM_START+(num/10)%10); + vram_put(NUM_START+(num%10)); +} + +/** + * Print a string (EBCDIC) into VRAM. + * Use only between frames! + */ +void print_str(unsigned int adr, const unsigned char * str) { + vram_adr(adr); + while (*str) { + vram_put(*str); + str++; + } +} + +/** + * Map select screen. + */ +void show_select() { + /* Use bank 1 to get full characterset tiles */ + bank_bg(1); + bank_spr(1); + music_play(MUSIC_STAGE_SELECT); + + while (1) { + /* We disable the PPU while we draw text. */ + ppu_off(); + pal_bg(palEndgame); + + /* We don't use an existing nametable, but instead clear out NAMETABLE_A */ + vram_adr(NAMETABLE_A); + vram_fill(0xa0,1024-64); + vram_fill(0,64); + + /* "Select Map" */ + print_str(NAMETABLE_A+0x0EB,select_map); + + /* Map names */ + for (i = 0; i < LEVELS_ALL; ++i) { + print_str(NAMETABLE_A+0x148+0x20*i,levelList[i*LEVEL_ENTRY+3]); + } + + /* + * An asterisk represents the current selection. + * TODO: use something nicer in 1.1 + */ + print_str(NAMETABLE_A+0x146+0x20*game_level,selector); + ppu_on_bg(); + + /* Loop waiting for input. */ + while (1) { + ppu_wait_frame(); + j = pad_trigger(0) | pad_trigger(1); + /* Start - Select map */ + if (j & PAD_START) return; + /* Up - move cursor up */ + if (j & PAD_UP) { + if (game_level == 0) { + game_level = LEVELS_ALL-1; + } else { + game_level -= 1; + } + + break; + } + /* Select or Down - move cursor down */ + if (j & PAD_SELECT || j & PAD_DOWN) { + game_level += 1; + if (game_level == LEVELS_ALL) game_level = 0; + break; + } + } + + } +} + +/** + * Credits sequence. + */ +void show_credits() { + bank_bg(1); + bank_spr(1); + + /* Clear the screen. */ + ppu_off(); + pal_bg(palEndgame); + + /* Write credits. */ + i = 0; + + while (i < 17) { /* 4 6 A C */ + ppu_off(); + vram_adr(NAMETABLE_A); + vram_fill(0xa0,1024-64); + vram_fill(0,64); + ppu_on_bg(); + + /* + * This works much the same as the map select screen. + * + * We turn off the PPU and render text. Then we'll delay + * a bit before writing the next line. + * + * We show four lines per screen, which usually means + * two people, with their titles. + */ + + ppu_off(); + print_str(NAMETABLE_A+0x122, credits[i]); + ppu_on_bg(); + WAIT_WITH_SKIP(50); + + ppu_off(); + print_str(NAMETABLE_A+0x162, credits[i+1]); + ppu_on_bg(); + WAIT_WITH_SKIP(50); + + ppu_off(); + print_str(NAMETABLE_A+0x1C2, credits[i+2]); + ppu_on_bg(); + WAIT_WITH_SKIP(50); + + ppu_off(); + print_str(NAMETABLE_A+0x202, credits[i+3]); + ppu_on_bg(); + WAIT_WITH_SKIP(50); + i+=4; + } + WAIT_WITH_SKIP(200); + +_skip_title: + delay(20); +} + +/** + * Post Game Screen + * + * Shows Judd pointing to the winner, + * inked % of map, total inked cells, + * and a gauge. + */ +void show_endgame(void) { + bank_bg(1); + bank_spr(1); + + /* Set up the background (meter, "Game Over") */ + ppu_off(); + vram_adr(NAMETABLE_A); + vram_write(endgame,1024); + pal_bg(palEndgame); + pal_spr(palJudd); + oam_clear(); + + /* We're going to use the update lists to set background palettes */ + clear_update_list(); + + /* Give players with no points a freebie to help with the math. */ + if (player_score[0] == 0) player_score[0] = 1; + if (player_score[1] == 0) player_score[1] = 1; + + /* + * We calculate percentages and bar gauge based on total inked + * not total available for inking. This is a bit different from + * the real deal. + */ + sum = (player_score[0] + player_score[1]); + + /* Calculate percentage for player 1 */ + div = player_score[0] * 100; + div /= sum; + if (div == 100) div = 99; + if (div == 0) div = 1; + put_num(NAMETABLE_A+0x1EA,div,2); + + /* Player 2 must be 100% - (player 1) */ + div = 100 - div; + put_num(NAMETABLE_A+0x1F4,div,2); + + /* Convert Player 2's percentage to a gauge width */ + div *= 9; + div /= 100; + + /* Print the victory message. */ + if (player_score[0] > player_score[1]) { + print_str(NAMETABLE_A+0x1C9,victoryMsg); + oam_meta_spr(0x68,0x48,0,judd_left); + } else if (player_score[0] == player_score[1]) { + /* If both players have the same score, it was a tie. */ + print_str(NAMETABLE_A+0x1CB,tieMsg); + oam_meta_spr(0x70,0x48,0,judd_tie); + } else { + print_str(NAMETABLE_A+0x1CF,victoryMsg); + oam_meta_spr(0x70,0x48,0,judd_right); + } + + /* Print raw player scores below the gauge */ + put_num(NAMETABLE_A+0x24A,player_score[0],3); + put_num(NAMETABLE_A+0x253,player_score[1],3); + + /* Enable the background */ + ppu_on_all(); + + /* Play the post-game music. */ + music_play(MUSIC_WELL_DONE); + + /* Set the gauge palettes. */ + clear_update_list(); + for (i = 4; i < 12 - div; ++i) { + /* Player 1 on the left. */ + set_tile_palette(i,8,1); + } + for (i = 12 - div; i <= 11; ++i) { + /* Player 2 on the right. */ + set_tile_palette(i,8,2); + + } + set_vram_update(update_list); + + while (1) { + /* Wait for someone to hit start. */ + ppu_wait_frame(); + clear_update_list(); + if ((pad_trigger(0) | pad_trigger(1)) & PAD_START) break; + } + reset_palette_state(); + oam_clear(); +} + +/* + * Move a projectile if the is no wall + */ +void projectile_move(unsigned char id) { + unsigned char map_type = 0; + unsigned char dir = projectile_dir[id]; + + /* + * Reset speed; if the last direction we check is valid, we'll set speed, but we + * shouldn't let players input a valid direction that sets speed plus a higher priority + * invalid direction to let them move in the invalid direction + */ + projectile_cnt[id]=0; + projectile_dist[id]-=1; + + if (projectile_dist[id] == 0) { + projectile_dir[id]=DIR_NONE; + return; + } + + px=projectile_x[id]>>(TILE_SIZE_BIT+FP_BITS); + py=projectile_y[id]>>(TILE_SIZE_BIT+FP_BITS); + + switch (dir) { + case DIR_NONE: return; break; + case DIR_LEFT: --px; break; + case DIR_RIGHT: ++px; break; + case DIR_UP: --py; break; + case DIR_DOWN: ++py; break; + } + + + if (px > MAP_WDT-1) { + projectile_dir[id]=DIR_NONE; + return; + } + + if (py > MAP_HGT-1) { + projectile_dir[id]=DIR_NONE; + return; + } + + map_type = map[MAP_ADR(px, py)]; + + if (can_ink(map_type)) { + set_tile_palette(px, py, id+1); + } + + if ((map_type >= 0x22 && map_type <= 0x29) || (map_type >= 0x32 && map_type <= 0x39)) { + projectile_dir[id]=DIR_NONE; + return; + } + + projectile_cnt[id]=TILE_SIZE<>(TILE_SIZE_BIT+FP_BITS); + py=player_y[id]>>(TILE_SIZE_BIT+FP_BITS); + + switch (dir) { + case DIR_LEFT: --px; break; + case DIR_RIGHT: ++px; break; + case DIR_UP: --py; break; + case DIR_DOWN: ++py; break; + } + + + if (px > MAP_WDT-1) { + return; + } + + if (py > MAP_HGT-1) { + return; + } + + /* + * Wall tiles: + * 0x22~0x29 + * 0x32~0x39 + */ + map_type = map[MAP_ADR(px, py)]; + + if (can_ink(map_type)) { + set_tile_palette(px, py, id+1); + } + + if ((map_type >= 0x22 && map_type <= 0x29) || (map_type >= 0x32 && map_type <= 0x39)) { + return; + } + + player_cnt[id]=TILE_SIZE<>FP_BITS; + + if (player_wait[i]) { + if (player_wait[i]>=16||player_wait[i]&2) py=240; + } + + px = player_x[i]>>FP_BITS; + + anim_index = i * WALK_CYCLE + (player_anim_cnt[i] / FRAMES_PER_STEP) % WALK_CYCLE; + + switch (player_dir[i]) { + case DIR_NONE: + case DIR_DOWN: oam_meta_spr(px,py,spr,sprListPlayerDown[anim_index]); break; + case DIR_LEFT: oam_meta_spr(px,py,spr,sprListPlayerLeft[anim_index]); break; + case DIR_RIGHT: oam_meta_spr(px,py,spr,sprListPlayerRight[anim_index]); break; + case DIR_UP: oam_meta_spr(px,py,spr,sprListPlayerUp[anim_index]); break; + } + spr-=16; + } + + /* Wait for the next frame. */ + ppu_wait_frame(); + clear_update_list(); + + /* Tick the timer */ + ++frame_cnt; + if (!game_paused && (frame_cnt % TIMER_CYCLE == 0)) { + timer--; + } + /* And update it on screen. */ + insert_into_update_list(0x20,0x4f,timer/10 + 0xb0); + insert_into_update_list(0x20,0x50,timer%10 + 0xb0); + + + /* Read both inputs for "START" in trigger mode. */ + i = pad_trigger(0); + i |= pad_trigger(1); + + /* Pause the game if someone hit start. */ + if (i & PAD_START) { + game_paused ^= TRUE; + if (game_paused) { + /* When the game is paused, we switch to a grayscale palette */ + pal_bg(palPaused); + pal_spr(palCharPaused); + } else { + /* Switch back to level palette. */ + pal_bg(levelList[game_level*LEVEL_ENTRY+1]); + pal_spr(levelList[game_level*LEVEL_ENTRY+2]); + } + music_pause(game_paused); + sfx_play(SFX_ITEM,0); + } + + /* Skip processing inputs when the game is paused. */ + if (game_paused) continue; + + /* + * When players spawn, they flash a bit. + * We don't start the music until they are done flashing. + */ + if (wait) { + --wait; + + if (!wait) { + music_play(MUSIC_GAME); + } + } + + /* When the timer reaches 0, the game is over. */ + if (timer == 0) { + music_play(MUSIC_CLEAR); + game_done = TRUE; + } + + /* + * Process player actions. + */ + for (i = 0; i < player_all; ++i) { + /* Flash respawning players, and prevent them from providing input. */ + if (player_wait[i]) { + if (player_wait[i] == 16) { + sfx_play(i?SFX_RESPAWN2:SFX_RESPAWN1,i); + } + --player_wait[i]; + continue; + } + + if (wait) continue; /* Avoid processing input during initial spawn. */ + + /* This player is moving, so animate their movement. */ + if (player_cnt[i]) { + switch (player_dir[i]) { + case DIR_RIGHT: player_x[i]+=player_speed[i]; break; + case DIR_LEFT: player_x[i]-=player_speed[i]; break; + case DIR_DOWN: player_y[i]+=player_speed[i]; break; + case DIR_UP: player_y[i]-=player_speed[i]; break; + } + + player_cnt[i]-=player_speed[i]; + + /* Finish movement. */ + if (player_cnt[i] <= 0) { + if (player_cnt[i] < 0) { + player_cnt[i] = 0; + + /* Align player to grid. */ + player_x[i]=(player_x[i]&0xff00)+(player_dir[i]==DIR_LEFT?0x100:0); + player_y[i]=(player_y[i]&0xff00)+(player_dir[i]==DIR_UP ?0x100:0); + } + + } else { + /* Continue animating movement. */ + player_anim_cnt[i] += 1; + } + } + + /* No current movement, accept input. */ + if (!player_cnt[i]) { + + /* Read pad state. */ + j = pad_state(i); + + if (player_cooldown[i]) { + player_cooldown[i] -= 1; + } + + if (j & player_dir[i] && player_diag_flip[i]) { + /* Give priority new new direction (useful for cornering) */ + j &= ~player_dir[i]; + player_diag_flip[i] = 0; + player_move(i, player_dir[i]); + } + + if (j&PAD_LEFT) player_move(i,DIR_LEFT); + if (j&PAD_RIGHT) player_move(i,DIR_RIGHT); + if (j&PAD_UP) player_move(i,DIR_UP); + if (j&PAD_DOWN) player_move(i,DIR_DOWN); + if (j&PAD_A) player_make_projectile(i); + } + + /* If this player has a projectile, move it as well. */ + if (projectile_cnt[i]) { + if (projectile_cnt[i] <= 0) { + if (projectile_cnt[i] < 0) { + projectile_cnt[i] = 0; + + /* Projectiles also lock to tiles, like players. */ + + projectile_x[i]=(projectile_x[i]&0xff00)+(projectile_dir[i]==DIR_LEFT?0x100:0); + projectile_y[i]=(projectile_y[i]&0xff00)+(projectile_dir[i]==DIR_UP ?0x100:0); + } + } + } + + if (!projectile_cnt[i]) { + projectile_move(i); + } + + if (projectile_cnt[i]) { + switch (projectile_dir[i]) { + case DIR_RIGHT: projectile_x[i]+=projectile_speed[i]; break; + case DIR_LEFT: projectile_x[i]-=projectile_speed[i]; break; + case DIR_DOWN: projectile_y[i]+=projectile_speed[i]; break; + case DIR_UP: projectile_y[i]-=projectile_speed[i]; break; + } + + projectile_cnt[i]-=projectile_speed[i]; + } + + } + + /* Kill players that collide with eachother. */ + for (i = 0; i < player_all; ++i) { + for (j = i + 1; j < player_all; ++j) { + if (player_x[i] == player_x[j] && player_y[i] == player_y[j]) { + /* + * Since all players have rollers and move at the same speed, if you + * share a space you must have run into each other, so you both die. + */ + player_die(i); + player_die(j); + } + if (projectile_dir[j] != DIR_NONE && + (player_x[i] >> (TILE_SIZE_BIT+FP_BITS)) == (projectile_x[j] >> (TILE_SIZE_BIT+FP_BITS)) && + (player_y[i] >> (TILE_SIZE_BIT+FP_BITS)) == (projectile_y[j] >> (TILE_SIZE_BIT+FP_BITS))) { + /* Player j kills player i using a projectile */ + player_die(i); + } + if (projectile_dir[i] != DIR_NONE && + (player_x[j] >> (TILE_SIZE_BIT+FP_BITS)) == (projectile_x[i] >> (TILE_SIZE_BIT+FP_BITS)) && + (player_y[j] >> (TILE_SIZE_BIT+FP_BITS)) == (projectile_y[i] >> (TILE_SIZE_BIT+FP_BITS))) { + /* Player i kills player j using a projectile */ + player_die(j); + } + } + } + + /* Kill players that fall in water. */ + for ( i = 0; i < player_all; ++i) { + px = player_x[i] >> (TILE_SIZE_BIT + FP_BITS); + py = player_y[i] >> (TILE_SIZE_BIT + FP_BITS); + map_type = map[MAP_ADR(px, py)]; + /* Water tiles are 0x2c, 0x2d, 0x3c, 0x3d */ + if (map_type == 0x2c || map_type == 0x2d || map_type == 0x3c || map_type == 0x3d) { + player_die(i); + } + } + } + + /* Game is over, calculate score. */ + for (i = 0; i < player_all; ++i) { + player_score[i] = score_player(i); + } + + reset_palette_state(); + delay(100); +} + + + +void main(void) { + while (1) { + /* Show the main title. */ + show_title(); + + /* Select a map. */ + show_select(); + + /* Start the game. */ + game_loop(); + + /* Show the final scores. */ + show_endgame(); + + /* Play the credits. */ + show_credits(); + + /* Loop back to the title... */ + } +} diff --git a/levels/bluefin.h b/levels/bluefin.h new file mode 100644 index 0000000..19b829f --- /dev/null +++ b/levels/bluefin.h @@ -0,0 +1,40 @@ +const unsigned char bluefin_depot[ 1024 ] = { +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x22,0x23,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x26,0x27,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x22,0x29,0x24,0x25,0x28,0x29,0x28,0x23,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x32,0x39,0x38,0x39,0x34,0x35,0x38,0x33,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x26,0x27,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x32,0x33,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d, +0x2c,0x2d,0x20,0x21,0x2c,0x2d,0x20,0x21,0x2c,0x2d,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x2c,0x2d,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x3c,0x3d,0x30,0x31,0x3c,0x3d,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x3c,0x3d,0x30,0x31,0x3c,0x3d, +0x11,0x2b,0x20,0x21,0x2c,0x2d,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x10,0x2b, +0x3a,0x3b,0x30,0x31,0x3c,0x3d,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x3a,0x3b, +0x2c,0x2d,0x20,0x21,0x2c,0x2d,0x20,0x21,0x2c,0x2d,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x2c,0x2d,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x3c,0x3d,0x30,0x31,0x3c,0x3d,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x3c,0x3d,0x30,0x31,0x3c,0x3d, +0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x22,0x23,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x26,0x27,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x22,0x29,0x24,0x25,0x28,0x29,0x28,0x23,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x32,0x39,0x38,0x39,0x34,0x35,0x38,0x33,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x26,0x27,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x32,0x33,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, + +0xff,0xff,0x0f,0x0f,0x0f,0x0f,0xff,0xff, +0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff, +0x3f,0x03,0x30,0x00,0x00,0xc0,0x0c,0xcf, +0x13,0x33,0xc3,0xfc,0xf3,0x3c,0xcc,0x8c, +0x33,0x03,0x33,0x0c,0x03,0xcc,0x0c,0xcc, +0xff,0xf3,0x00,0x00,0x00,0x00,0xfc,0xff, +0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff, +0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f }; diff --git a/levels/endgame.h b/levels/endgame.h new file mode 100644 index 0000000..0285432 --- /dev/null +++ b/levels/endgame.h @@ -0,0 +1 @@ +const unsigned char endgame[ 1024 ] = { 0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xc7,0xe1,0xed,0xe5,0xa0,0xef,0xf6,0xe5,0xf2,0xa1,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa5,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa5,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0x22,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x28,0x23,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0x32,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x33,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xb1,0xb2,0xb3,0xf0,0xa0,0xa0,0xa0,0xa0,0xa0,0xb0,0xb1,0xb2,0xf0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0xa0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x05,0x05,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; diff --git a/levels/kelpdome.h b/levels/kelpdome.h new file mode 100644 index 0000000..a2dd7a9 --- /dev/null +++ b/levels/kelpdome.h @@ -0,0 +1,40 @@ +const unsigned char kelpdome[ 1024 ] = { +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31, +0x2c,0x2d,0x22,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x23,0x20,0x21,0x20,0x21,0x10,0x2b,0x20,0x21, +0x3c,0x3d,0x26,0x35,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x34,0x27,0x30,0x31,0x30,0x31,0x3a,0x3b,0x30,0x31, +0x2c,0x2d,0x36,0x37,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x26,0x27,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21, +0x3c,0x3d,0x26,0x37,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x32,0x33,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31, +0x2c,0x2d,0x36,0x37,0x20,0x21,0x22,0x23,0x20,0x21,0x22,0x23,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21, +0x3c,0x3d,0x26,0x37,0x30,0x31,0x32,0x33,0x30,0x31,0x26,0x27,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31, +0x2c,0x2d,0x36,0x37,0x20,0x21,0x20,0x21,0x20,0x21,0x36,0x25,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x23,0x20,0x21,0x20,0x21,0x22,0x28,0x29,0x23,0x2c,0x2d, +0x3c,0x3d,0x26,0x37,0x30,0x31,0x30,0x31,0x30,0x31,0x32,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x34,0x27,0x30,0x31,0x30,0x31,0x32,0x38,0x34,0x27,0x3c,0x3d, +0x2c,0x2d,0x36,0x37,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x26,0x27,0x20,0x21,0x20,0x21,0x20,0x21,0x26,0x27,0x2c,0x2d, +0x3c,0x3d,0x26,0x37,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x36,0x27,0x30,0x31,0x30,0x31,0x30,0x31,0x36,0x27,0x3c,0x3d, +0x2c,0x2d,0x36,0x37,0x20,0x21,0x22,0x28,0x29,0x28,0x29,0x23,0x20,0x21,0x22,0x28,0x29,0x23,0x20,0x21,0x26,0x25,0x28,0x29,0x28,0x23,0x20,0x21,0x26,0x27,0x2c,0x2d, +0x3c,0x3d,0x26,0x37,0x30,0x31,0x32,0x38,0x39,0x38,0x34,0x27,0x30,0x31,0x32,0x38,0x39,0x33,0x30,0x31,0x32,0x38,0x39,0x38,0x39,0x33,0x30,0x31,0x36,0x27,0x3c,0x3d, +0x2c,0x2d,0x36,0x37,0x20,0x21,0x20,0x21,0x20,0x21,0x26,0x27,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x26,0x27,0x2c,0x2d, +0x3c,0x3d,0x26,0x37,0x30,0x31,0x30,0x31,0x30,0x31,0x36,0x27,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x36,0x27,0x3c,0x3d, +0x2c,0x2d,0x36,0x25,0x28,0x23,0x20,0x21,0x20,0x21,0x26,0x25,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x23,0x20,0x21,0x20,0x21,0x20,0x21,0x26,0x27,0x2c,0x2d, +0x3c,0x3d,0x32,0x38,0x39,0x33,0x30,0x31,0x30,0x31,0x32,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x34,0x27,0x30,0x31,0x30,0x31,0x30,0x31,0x36,0x27,0x3c,0x3d, +0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x26,0x27,0x20,0x21,0x22,0x23,0x20,0x21,0x26,0x27,0x2c,0x2d, +0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x32,0x33,0x30,0x31,0x32,0x33,0x30,0x31,0x36,0x27,0x3c,0x3d, +0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x22,0x23,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x26,0x27,0x2c,0x2d, +0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x26,0x27,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x36,0x27,0x3c,0x3d, +0x20,0x21,0x11,0x2b,0x20,0x21,0x20,0x21,0x36,0x25,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x28,0x29,0x24,0x27,0x2c,0x2d, +0x30,0x31,0x3a,0x3b,0x30,0x31,0x30,0x31,0x32,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x38,0x39,0x33,0x3c,0x3d, +0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, + +0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0x0f, +0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x01, +0x33,0x00,0x00,0x00,0x00,0x00,0x00,0xc0, +0x33,0x00,0x00,0x00,0x00,0x00,0x00,0xcc, +0x33,0x00,0x00,0x00,0x00,0x00,0x00,0xcc, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcc, +0x08,0x00,0xf0,0xf0,0xf0,0xf0,0xf0,0xfc, +0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f }; diff --git a/levels/saltspray.h b/levels/saltspray.h new file mode 100644 index 0000000..c2040d2 --- /dev/null +++ b/levels/saltspray.h @@ -0,0 +1,40 @@ +const unsigned char saltspray[ 1024 ] = { +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x10,0x2b,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3a,0x3b,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21, +0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x22,0x28,0x29,0x23,0x20,0x21, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x26,0x35,0x34,0x27,0x30,0x31, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x36,0x25,0x24,0x37,0x20,0x21, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x32,0x38,0x39,0x33,0x30,0x31, +0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21, +0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31, +0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x2c,0x2d,0x20,0x21,0x22,0x23,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21, +0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x3c,0x3d,0x30,0x31,0x26,0x27,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x20, +0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x36,0x25,0x28,0x23,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21, +0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x26,0x35,0x38,0x33,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x20, +0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x2c,0x2d,0x20,0x21,0x36,0x37,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21, +0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x3c,0x3d,0x30,0x31,0x32,0x33,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x20, +0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21, +0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x22,0x28,0x29,0x23,0x20,0x21, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x26,0x35,0x34,0x27,0x30,0x31, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x20,0x21,0x36,0x25,0x24,0x37,0x20,0x21, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x30,0x31,0x32,0x38,0x39,0x33,0x30,0x31, +0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21, +0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31, +0x11,0x2b,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3a,0x3b,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, + +0x1f,0xff,0x0f,0x0f,0xcf,0xff,0xff,0xff, +0xf0,0xf0,0xcc,0x3f,0x0c,0xcf,0x00,0x00, +0x0f,0xff,0x0c,0x33,0x00,0xcc,0x00,0x00, +0x00,0x0f,0x03,0x33,0x00,0x00,0x00,0x00, +0x00,0xff,0x03,0x33,0x00,0xc0,0x00,0x00, +0xff,0xff,0xcc,0x33,0x00,0xcc,0x00,0x00, +0x20,0xf0,0x0c,0x0f,0xcc,0xff,0xf0,0xf0, +0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f }; diff --git a/levels/splat_title.h b/levels/splat_title.h new file mode 100644 index 0000000..d658ca4 --- /dev/null +++ b/levels/splat_title.h @@ -0,0 +1,37 @@ +const unsigned char splat_title[1024]={ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x06,0x00,0x07,0x08,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x0a,0x0b,0x00,0x0c,0x0d,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x02,0x00,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x19,0x1a,0x1b,0x1c,0x1c,0x1c,0x1c,0x1d,0x1e,0x1f,0x20,0x00,0x00, + 0x00,0x00,0x00,0x00,0x01,0x02,0x00,0x03,0x21,0x22,0x23,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x26,0x27,0x28,0x00,0x00, + 0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x29,0x2a,0x2b,0x2b,0x2c,0x2d,0x00,0x2e,0x2f,0x30,0x31,0x32,0x33,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1d,0x34,0x35,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x09,0x36,0x2b,0x2b,0x2b,0x2b,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3e,0x3f,0x40,0x1c,0x1c,0x41,0x42,0x43,0x1c,0x1c,0x44,0x45,0x00,0x00, + 0x00,0x00,0x0e,0x02,0x00,0x46,0x47,0x2b,0x2b,0x48,0x49,0x4a,0x4b,0x4c,0x4d,0x4e,0x4f,0x50,0x51,0x52,0x53,0x54,0x55,0x56,0x57,0x58,0x59,0x1c,0x5a,0x5b,0x5c,0x5d, + 0x00,0x00,0x18,0x19,0x1a,0x5e,0x5f,0x2b,0x2b,0x60,0x61,0x62,0x63,0x64,0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x02,0x73,0x74,0x75, + 0x00,0x00,0x00,0x25,0x1c,0x76,0x77,0x78,0x79,0x7a,0x7b,0x7c,0x7d,0x7e,0x7f,0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x1c,0x8b,0x8c,0x8d,0x8e,0x00, + 0x30,0x31,0x8f,0x90,0x1c,0x1c,0x91,0x92,0x93,0x94,0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0x9c,0x9d,0x00,0x9e,0x9f,0xa0,0x1c,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0x00, + 0xa8,0x00,0x00,0xa9,0x1c,0x1c,0x1c,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0x00,0x00,0x00,0x00,0x00,0x00,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0x00,0x00,0x00, + 0xba,0xbb,0xbc,0xbd,0x1c,0x1c,0x1c,0xbe,0xbf,0xc0,0xc1,0xc2,0xc3,0x5b,0x5c,0x5d,0x00,0x00,0x00,0xc4,0xc5,0xc6,0xc7,0x00,0xc8,0xc9,0x00,0x00,0x00,0x00,0x00,0x00, + 0xca,0xcb,0xcc,0xcd,0xce,0x1c,0x1c,0xcf,0xd0,0xd1,0xd2,0xd3,0x02,0x73,0x74,0x75,0x00,0x00,0x00,0xd4,0xd5,0x00,0x00,0x00,0xd6,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xd7,0xd8,0x00,0xd9,0xda,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x8b,0x8c,0x8d,0x8e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdb,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x9e,0x9f,0xa0,0x1c,0x1c,0xdc,0xa3,0xa4,0xa5,0xa6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xc4,0xc5,0xc6,0xc7,0x00,0xc8,0xc9,0x00,0x00,0x00,0xe0,0xe1,0xe2,0xe3,0xe3,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0xd4,0xd5,0x00,0x00,0x00,0xd6,0x00,0x00,0x00,0x00,0x00,0xe3,0xe4,0xe5,0xe1,0xe4,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdb,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x05,0x00,0x06,0x00,0x07,0x08,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0x0a,0x0b,0x00,0x0c,0x0d,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0e,0x02,0x00,0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x19,0x1a,0x1b,0x1c,0x1c,0x1c,0x1c,0x1d,0x1e,0x1f,0x20,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x25,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x26,0x27,0x28,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdd,0x30,0x31,0x8f,0x90,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1d,0x34,0x35,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xde,0xa8,0x00,0x00,0xa9,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x44,0x45,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdf,0xba,0xbb,0xbc,0xbd,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x5a,0x5b,0x5c, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xca,0xcb,0xcc,0xcd,0xce,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x72,0x02,0x73,0x74, + + 0x0,0x30,0x0,0x0,0x55,0x55,0x55,0x5d,0xc,0x0,0x0,0x4c,0x57,0x55,0x55,0xd5,0x0,0x0,0x0,0x4c,0x55,0x55,0x55,0x55,0x0,0x0,0x0,0x0,0x77,0x55,0x55,0xd5,0x0,0x0,0xc0, + 0xfc,0xff,0xff,0xbf,0xaa,0xc0,0xfc,0x3f,0xcf,0xaf,0xaa,0xaa,0xaa,0xcc,0x0,0x80,0xaf,0xaa,0xaa,0xaa,0xaa,0x0,0x0,0x8,0xa,0xa,0xa,0xa,0xa +}; + + diff --git a/levels/twofish.h b/levels/twofish.h new file mode 100644 index 0000000..510d533 --- /dev/null +++ b/levels/twofish.h @@ -0,0 +1,40 @@ +const unsigned char twofish[ 1024 ] = { +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d, +0x2c,0x2d,0x20,0x21,0x22,0x23,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x22,0x23,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x36,0x37,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x36,0x37,0x30,0x31,0x3c,0x3d, +0x2c,0x2d,0x20,0x21,0x26,0x27,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x26,0x27,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x36,0x37,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x36,0x37,0x30,0x31,0x3c,0x3d, +0x2c,0x2d,0x20,0x21,0x26,0x27,0x20,0x21,0x22,0x29,0x28,0x29,0x28,0x23,0x20,0x21,0x20,0x21,0x22,0x29,0x28,0x29,0x28,0x23,0x20,0x21,0x26,0x27,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x32,0x33,0x30,0x31,0x32,0x38,0x39,0x38,0x34,0x37,0x30,0x31,0x30,0x31,0x36,0x35,0x39,0x38,0x39,0x33,0x30,0x31,0x32,0x33,0x30,0x31,0x3c,0x3d, +0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x26,0x27,0x20,0x21,0x20,0x21,0x26,0x27,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x36,0x37,0x30,0x31,0x30,0x31,0x36,0x37,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d, +0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x11,0x2b,0x26,0x27,0x20,0x21,0x20,0x21,0x26,0x27,0x10,0x2b,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3a,0x3b,0x36,0x37,0x30,0x31,0x30,0x31,0x36,0x37,0x3a,0x3b,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d, +0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x26,0x27,0x20,0x21,0x20,0x21,0x26,0x27,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x36,0x37,0x30,0x31,0x30,0x31,0x36,0x37,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d, +0x2c,0x2d,0x20,0x21,0x22,0x23,0x20,0x21,0x22,0x29,0x28,0x29,0x24,0x27,0x20,0x21,0x20,0x21,0x26,0x25,0x28,0x29,0x28,0x23,0x20,0x21,0x22,0x23,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x36,0x37,0x30,0x31,0x32,0x38,0x39,0x38,0x39,0x33,0x30,0x31,0x30,0x31,0x32,0x38,0x39,0x38,0x39,0x33,0x30,0x31,0x36,0x37,0x30,0x31,0x3c,0x3d, +0x2c,0x2d,0x20,0x21,0x26,0x27,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x20,0x21,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x20,0x21,0x26,0x27,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x36,0x37,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x30,0x31,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x30,0x31,0x36,0x37,0x30,0x31,0x3c,0x3d, +0x2c,0x2d,0x20,0x21,0x26,0x27,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x26,0x27,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x32,0x33,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x32,0x33,0x30,0x31,0x3c,0x3d, +0x2c,0x2d,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x20,0x21,0x2c,0x2d, +0x3c,0x3d,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x31,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, +0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d,0x2c,0x2d, +0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d,0x3c,0x3d, + +0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, +0x33,0x00,0x00,0x00,0x00,0x00,0x00,0xcc, +0x33,0x00,0x0f,0x03,0x0c,0x0f,0x00,0xcc, +0x33,0x00,0x40,0x00,0x00,0x20,0x00,0xcc, +0x33,0x00,0x00,0x00,0x00,0x00,0x00,0xcc, +0x33,0x00,0x0f,0x03,0x0c,0x0f,0x00,0xcc, +0xf3,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0,0xfc, +0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f }; diff --git a/music.s b/music.s new file mode 100644 index 0000000..92cf279 --- /dev/null +++ b/music.s @@ -0,0 +1,653 @@ +;this file for FamiTone2 library generated by text2data tool + +fork_music_data: + .byte 7 + .word @instruments + .word @samples-3 + .word @song0ch0,@song0ch1,@song0ch2,@song0ch3,@song0ch4,307,256 + .word @song1ch0,@song1ch1,@song1ch2,@song1ch3,@song1ch4,245,204 + .word @song2ch0,@song2ch1,@song2ch2,@song2ch3,@song2ch4,307,256 + .word @song3ch0,@song3ch1,@song3ch2,@song3ch3,@song3ch4,307,256 + .word @song4ch0,@song4ch1,@song4ch2,@song4ch3,@song4ch4,204,170 + .word @song5ch0,@song5ch1,@song5ch2,@song5ch3,@song5ch4,307,256 + .word @song6ch0,@song6ch1,@song6ch2,@song6ch3,@song6ch4,280,233 + +@instruments: + .byte $30 ;instrument $00 + .word @env1,@env0,@env0 + .byte $00 + .byte $30 ;instrument $01 + .word @env2,@env13,@env0 + .byte $00 + .byte $30 ;instrument $02 + .word @env3,@env14,@env0 + .byte $00 + .byte $30 ;instrument $03 + .word @env4,@env15,@env0 + .byte $00 + .byte $30 ;instrument $04 + .word @env5,@env16,@env0 + .byte $00 + .byte $70 ;instrument $05 + .word @env6,@env17,@env0 + .byte $00 + .byte $30 ;instrument $06 + .word @env7,@env18,@env24 + .byte $00 + .byte $30 ;instrument $07 + .word @env8,@env0,@env0 + .byte $00 + .byte $30 ;instrument $08 + .word @env9,@env0,@env0 + .byte $00 + .byte $30 ;instrument $09 + .word @env9,@env0,@env0 + .byte $00 + .byte $70 ;instrument $0a + .word @env9,@env0,@env0 + .byte $00 + .byte $b0 ;instrument $0b + .word @env9,@env0,@env0 + .byte $00 + .byte $b0 ;instrument $0c + .word @env9,@env0,@env0 + .byte $00 + .byte $30 ;instrument $0d + .word @env10,@env0,@env0 + .byte $00 + .byte $70 ;instrument $0e + .word @env10,@env0,@env0 + .byte $00 + .byte $70 ;instrument $0f + .word @env11,@env0,@env0 + .byte $00 + .byte $30 ;instrument $10 + .word @env1,@env19,@env25 + .byte $00 + .byte $30 ;instrument $11 + .word @env1,@env20,@env0 + .byte $00 + .byte $b0 ;instrument $12 + .word @env9,@env21,@env0 + .byte $00 + .byte $30 ;instrument $14 + .word @env12,@env22,@env0 + .byte $00 + .byte $70 ;instrument $15 + .word @env5,@env23,@env0 + .byte $00 + .byte $b0 ;instrument $16 + .word @env5,@env23,@env0 + .byte $00 + .byte $70 ;instrument $17 + .word @env5,@env23,@env0 + .byte $00 + +@samples: +@env0: + .byte $c0,$00,$00 +@env1: + .byte $cf,$00,$00 +@env2: + .byte $c7,$c1,$c2,$c3,$c4,$c5,$c6,$c6,$c5,$02,$c4,$02,$c3,$02,$c2,$02 + .byte $c1,$02,$c0,$00,$12 +@env3: + .byte $c7,$c4,$c2,$c1,$c1,$c0,$00,$05 +@env4: + .byte $c9,$c6,$c5,$c4,$c3,$c3,$c2,$02,$c1,$03,$c0,$00,$0a +@env5: + .byte $c6,$c5,$c5,$c4,$c4,$c3,$c4,$c6,$c5,$c4,$c3,$c3,$c2,$00,$0c +@env6: + .byte $cb,$cb,$c8,$c7,$c5,$c5,$c1,$04,$c0,$00,$08 +@env7: + .byte $cf,$06,$c0,$00,$02 +@env8: + .byte $cf,$c0,$00,$01 +@env9: + .byte $c4,$c7,$02,$c6,$c5,$00,$04 +@env10: + .byte $c8,$c6,$02,$c5,$00,$03 +@env11: + .byte $c4,$00,$00 +@env12: + .byte $c7,$c7,$ca,$02,$c9,$c7,$c6,$c4,$c2,$00,$08 +@env13: + .byte $c0,$c4,$00,$01 +@env14: + .byte $c0,$c2,$c4,$00,$02 +@env15: + .byte $c0,$c7,$c9,$cb,$00,$03 +@env16: + .byte $c0,$c2,$05,$c0,$c2,$c4,$00,$05 +@env17: + .byte $c0,$c4,$bc,$00,$02 +@env18: + .byte $ea,$e3,$dd,$da,$d6,$d4,$d1,$00,$06 +@env19: + .byte $c0,$bf,$be,$00,$02 +@env20: + .byte $c0,$c1,$c1,$c2,$c2,$c3,$c3,$c4,$c4,$c5,$c5,$c6,$c6,$c7,$c7,$c8 + .byte $c8,$c9,$c9,$ca,$ca,$cb,$cb,$cc,$cc,$00,$18 +@env21: + .byte $c0,$c0,$c7,$c7,$c0,$c0,$c7,$c7,$c0,$c0,$00,$09 +@env22: + .byte $c0,$c3,$c8,$00,$00 +@env23: + .byte $c0,$c0,$cc,$cc,$00,$00 +@env24: + .byte $ac,$00,$00 +@env25: + .byte $c0,$c0,$c1,$c2,$c4,$c7,$cc,$d1,$00,$07 + + +@song0ch0: + .byte $fb,$04 +@song0ch0loop: +@ref0: + .byte $a0,$4a,$83,$00,$4a,$83,$00,$ef + .byte $fd + .word @song0ch0loop + +@song0ch1: +@song0ch1loop: +@ref1: + .byte $f9,$85 + .byte $fd + .word @song0ch1loop + +@song0ch2: +@song0ch2loop: +@ref2: + .byte $f9,$85 + .byte $fd + .word @song0ch2loop + +@song0ch3: +@song0ch3loop: +@ref3: + .byte $f9,$85 + .byte $fd + .word @song0ch3loop + +@song0ch4: +@song0ch4loop: +@ref4: + .byte $f9,$85 + .byte $fd + .word @song0ch4loop + + +@song1ch0: + .byte $fb,$04 +@song1ch0loop: +@ref5: + .byte $9c,$2d,$33,$37,$2c,$8b,$00,$9a,$28,$85,$28,$85,$34,$8f,$00,$9c + .byte $2d,$33,$37,$2c,$8b,$00,$9a,$28,$85,$28,$85,$22,$91 + .byte $ff,$19 + .word @ref5 + .byte $ff,$19 + .word @ref5 + .byte $ff,$19 + .word @ref5 +@ref9: + .byte $90,$49,$96,$4f,$53,$98,$48,$8b,$00,$90,$44,$85,$98,$44,$85,$92 + .byte $50,$8f,$00,$90,$49,$4f,$94,$53,$90,$48,$8b,$00,$44,$85,$98,$44 + .byte $85,$92,$3e,$87,$00,$87 + .byte $ff,$1b + .word @ref9 + .byte $fd + .word @song1ch0loop + +@song1ch1: +@song1ch1loop: +@ref11: + .byte $81,$9a,$2d,$33,$37,$2c,$89,$00,$9c,$1e,$85,$1e,$85,$12,$8f,$01 + .byte $9a,$2d,$33,$37,$2c,$89,$00,$9c,$1e,$85,$1e,$85,$18,$91 + .byte $ff,$1a + .word @ref11 +@ref13: + .byte $9e,$61,$5d,$59,$52,$a7,$00,$4f,$53,$61,$5d,$59,$52,$87,$00,$4d + .byte $52,$93,$00,$a2,$60,$89 +@ref14: + .byte $9e,$79,$75,$71,$6a,$a5,$01,$67,$6b,$79,$75,$71,$6a,$89,$65,$6a + .byte $9f,$00 +@ref15: + .byte $90,$31,$96,$37,$3b,$98,$30,$8b,$00,$90,$2c,$85,$98,$2c,$85,$92 + .byte $38,$8f,$00,$90,$31,$37,$94,$3b,$90,$30,$8b,$00,$2c,$85,$98,$2c + .byte $85,$92,$26,$87,$00,$87 + .byte $ff,$1b + .word @ref15 + .byte $fd + .word @song1ch1loop + +@song1ch2: +@song1ch2loop: +@ref17: + .byte $00,$99,$80,$11,$01,$11,$01,$1c,$8f,$00,$9b,$11,$01,$11,$01,$0a + .byte $8b,$00,$83 +@ref18: + .byte $00,$99,$11,$01,$11,$01,$1c,$8f,$00,$9b,$11,$01,$11,$01,$0a,$8b + .byte $00,$83 +@ref19: + .byte $61,$5d,$59,$52,$a7,$00,$4f,$53,$61,$5d,$59,$52,$87,$00,$4d,$52 + .byte $93,$00,$a2,$52,$89 +@ref20: + .byte $80,$79,$75,$71,$6a,$a5,$01,$67,$6b,$9e,$79,$80,$75,$71,$6a,$89 + .byte $65,$6a,$9f,$00 +@ref21: + .byte $9e,$18,$00,$18,$00,$18,$00,$18,$00,$18,$00,$18,$00,$18,$00,$18 + .byte $00,$14,$00,$14,$00,$14,$00,$14,$00,$14,$00,$14,$00,$14,$00,$14 + .byte $00,$18,$00,$18,$00,$18,$00,$18,$00,$18,$00,$18,$00,$18,$00,$18 + .byte $00,$14,$00,$14,$00,$14,$00,$14,$00,$14,$00,$14,$00,$14,$00,$14 + .byte $81 +@ref22: + .byte $18,$00,$18,$00,$18,$00,$18,$00,$18,$00,$18,$00,$18,$00,$18,$00 + .byte $14,$00,$14,$00,$14,$00,$14,$00,$14,$00,$14,$00,$14,$00,$14,$00 + .byte $18,$00,$18,$00,$18,$00,$18,$00,$18,$00,$18,$00,$18,$00,$18,$00 + .byte $14,$00,$14,$00,$14,$00,$14,$00,$14,$00,$14,$00,$14,$00,$14,$81 + .byte $fd + .word @song1ch2loop + +@song1ch3: +@song1ch3loop: +@ref23: + .byte $82,$17,$84,$17,$8a,$0d,$84,$17,$82,$17,$84,$17,$8a,$0d,$84,$17 + .byte $82,$17,$84,$17,$8a,$0d,$84,$17,$82,$17,$84,$17,$8a,$0d,$84,$17 + .byte $82,$17,$84,$17,$8a,$0d,$84,$17,$82,$17,$84,$17,$8a,$0d,$84,$17 + .byte $82,$17,$84,$17,$8a,$0d,$84,$17,$82,$17,$84,$17,$8a,$0d,$8c,$16 + .byte $81 + .byte $ff,$21 + .word @ref23 + .byte $ff,$21 + .word @ref23 + .byte $ff,$21 + .word @ref23 + .byte $ff,$21 + .word @ref23 + .byte $ff,$21 + .word @ref23 + .byte $fd + .word @song1ch3loop + +@song1ch4: +@song1ch4loop: +@ref29: + .byte $f9,$85 +@ref30: + .byte $f9,$85 +@ref31: + .byte $f9,$85 +@ref32: + .byte $f9,$85 +@ref33: + .byte $f9,$85 +@ref34: + .byte $f9,$85 + .byte $fd + .word @song1ch4loop + + +@song2ch0: + .byte $fb,$06 +@song2ch0loop: +@ref35: + .byte $00,$f9,$83 + .byte $fd + .word @song2ch0loop + +@song2ch1: +@song2ch1loop: +@ref36: + .byte $00,$f9,$83 + .byte $fd + .word @song2ch1loop + +@song2ch2: +@song2ch2loop: +@ref37: + .byte $00,$f9,$83 + .byte $fd + .word @song2ch2loop + +@song2ch3: +@song2ch3loop: +@ref38: + .byte $00,$f9,$83 + .byte $fd + .word @song2ch3loop + +@song2ch4: +@song2ch4loop: +@ref39: + .byte $00,$f9,$83 + .byte $fd + .word @song2ch4loop + + +@song3ch0: + .byte $fb,$06 +@song3ch0loop: +@ref40: + .byte $00,$f9,$83 + .byte $fd + .word @song3ch0loop + +@song3ch1: +@song3ch1loop: +@ref41: + .byte $00,$f9,$83 + .byte $fd + .word @song3ch1loop + +@song3ch2: +@song3ch2loop: +@ref42: + .byte $00,$f9,$83 + .byte $fd + .word @song3ch2loop + +@song3ch3: +@song3ch3loop: +@ref43: + .byte $00,$f9,$83 + .byte $fd + .word @song3ch3loop + +@song3ch4: +@song3ch4loop: +@ref44: + .byte $00,$f9,$83 + .byte $fd + .word @song3ch4loop + + +@song4ch0: + .byte $fb,$04 +@song4ch0loop: +@ref45: + .byte $94,$4a,$85,$01,$8e,$45,$94,$45,$92,$47,$01,$90,$41,$00,$9d +@ref46: + .byte $98,$4a,$85,$01,$8e,$45,$94,$45,$47,$01,$92,$41,$00,$89,$94,$3d + .byte $92,$3d,$94,$41,$41,$00,$81 +@ref47: + .byte $4e,$85,$01,$8e,$49,$94,$49,$92,$4b,$01,$90,$45,$00,$9d +@ref48: + .byte $98,$4e,$85,$01,$8e,$49,$94,$49,$4b,$01,$92,$45,$00,$91,$94,$51 + .byte $4f,$4c,$81 + .byte $fd + .word @song4ch0loop + +@song4ch1: +@song4ch1loop: +@ref49: + .byte $96,$1a,$85,$01,$8e,$15,$96,$15,$17,$01,$11,$00,$9d +@ref50: + .byte $1a,$85,$01,$8e,$15,$96,$15,$17,$01,$11,$00,$89,$0d,$98,$0d,$96 + .byte $11,$11,$00,$81 +@ref51: + .byte $1e,$85,$01,$8e,$19,$96,$19,$1b,$01,$15,$00,$9d +@ref52: + .byte $1e,$85,$01,$8e,$19,$96,$19,$1b,$01,$15,$00,$91,$94,$39,$37,$34 + .byte $81 + .byte $fd + .word @song4ch1loop + +@song4ch2: +@song4ch2loop: +@ref53: + .byte $8c,$02,$85,$01,$8e,$2d,$8c,$03,$80,$2f,$01,$29,$8c,$02,$8d,$02 + .byte $8d +@ref54: + .byte $02,$85,$01,$8e,$2d,$8c,$03,$80,$2f,$01,$29,$8c,$02,$89,$80,$25 + .byte $8c,$03,$80,$29,$29,$00,$81 +@ref55: + .byte $8c,$02,$85,$01,$8e,$31,$8c,$03,$80,$33,$01,$2d,$8c,$02,$8d,$02 + .byte $8d +@ref56: + .byte $02,$85,$01,$8e,$31,$8c,$03,$80,$33,$01,$2d,$8c,$02,$8d,$03,$94 + .byte $39,$37,$34,$81 + .byte $fd + .word @song4ch2loop + +@song4ch3: +@song4ch3loop: +@ref57: + .byte $8e,$0c,$85,$8a,$15,$84,$17,$8e,$0d,$84,$17,$8a,$15,$84,$17,$8e + .byte $0c,$85,$8a,$15,$84,$17,$8e,$0d,$86,$19,$8a,$15,$84,$16,$81 + .byte $ff,$11 + .word @ref57 + .byte $ff,$11 + .word @ref57 + .byte $ff,$11 + .word @ref57 + .byte $fd + .word @song4ch3loop + +@song4ch4: +@song4ch4loop: +@ref61: + .byte $bf +@ref62: + .byte $bf +@ref63: + .byte $bf +@ref64: + .byte $bf + .byte $fd + .word @song4ch4loop + + +@song5ch0: + .byte $fb,$06 +@ref65: + .byte $96,$38,$85,$01,$92,$35,$90,$38,$85,$01,$94,$34,$81 +@ref66: + .byte $90,$38,$85,$01,$92,$35,$90,$39,$a4,$39,$94,$2f,$96,$34,$81 +@ref67: + .byte $90,$38,$85,$01,$92,$35,$96,$38,$85,$01,$92,$34,$81 +@ref68: + .byte $94,$39,$96,$3f,$43,$47,$38,$85,$01,$34,$81 +@ref69: + .byte $38,$85,$01,$35,$38,$85,$01,$34,$81 +@ref70: + .byte $38,$85,$01,$35,$39,$a4,$39,$96,$2f,$34,$81 +@ref71: + .byte $39,$01,$39,$35,$2f,$01,$2f,$34,$81 +@ref72: + .byte $39,$3f,$43,$47,$4d,$47,$43,$3e,$81 +@song5ch0loop: +@ref73: + .byte $92,$50,$4c,$46,$42,$46,$42,$3e,$38,$3e,$38,$34,$2e,$34,$2e,$2a + .byte $26 +@ref74: + .byte $50,$4c,$46,$42,$46,$42,$3e,$38,$3e,$38,$34,$2e,$34,$2e,$2a,$26 + .byte $ff,$10 + .word @ref74 + .byte $ff,$10 + .word @ref74 + .byte $fd + .word @song5ch0loop + +@song5ch1: +@ref77: + .byte $9e,$26,$8d,$2a,$8d +@ref78: + .byte $20,$9d +@ref79: + .byte $26,$8d,$2a,$8d +@ref80: + .byte $20,$8d,$1a,$8d +@ref81: + .byte $26,$8d,$2a,$8d +@ref82: + .byte $20,$9d +@ref83: + .byte $1a,$9d +@ref84: + .byte $18,$8d,$1c,$8d +@song5ch1loop: +@ref85: + .byte $9a,$20,$83,$26,$83,$2b,$2e,$83,$34,$83,$38,$81 +@ref86: + .byte $20,$83,$26,$83,$2b,$2e,$83,$34,$83,$38,$81 + .byte $ff,$0b + .word @ref86 +@ref88: + .byte $21,$21,$27,$2b,$2f,$2e,$34,$83,$38,$81 + .byte $fd + .word @song5ch1loop + +@song5ch2: +@ref89: + .byte $8c,$02,$9d +@ref90: + .byte $9b,$02,$81 +@ref91: + .byte $02,$9d +@ref92: + .byte $97,$02,$02,$02,$02 +@ref93: + .byte $02,$9d +@ref94: + .byte $9b,$02,$81 +@ref95: + .byte $02,$9d + .byte $ff,$05 + .word @ref92 +@song5ch2loop: +@ref97: + .byte $8c,$02,$85,$02,$85,$02,$85,$02,$85 +@ref98: + .byte $02,$85,$02,$85,$02,$85,$02,$85 + .byte $ff,$08 + .word @ref98 + .byte $ff,$08 + .word @ref98 + .byte $fd + .word @song5ch2loop + +@song5ch3: +@ref101: + .byte $9f +@ref102: + .byte $9f +@ref103: + .byte $9f +@ref104: + .byte $9f +@ref105: + .byte $9f +@ref106: + .byte $9f +@ref107: + .byte $9f +@ref108: + .byte $9f +@song5ch3loop: +@ref109: + .byte $83,$86,$1e,$85,$1e,$85,$1e,$85,$1e,$81 +@ref110: + .byte $83,$1e,$85,$1e,$85,$1e,$85,$1e,$81 + .byte $ff,$09 + .word @ref110 + .byte $ff,$09 + .word @ref110 + .byte $fd + .word @song5ch3loop + +@song5ch4: +@ref113: + .byte $9f +@ref114: + .byte $9f +@ref115: + .byte $9f +@ref116: + .byte $9f +@ref117: + .byte $9f +@ref118: + .byte $9f +@ref119: + .byte $9f +@ref120: + .byte $9f +@song5ch4loop: +@ref121: + .byte $9f +@ref122: + .byte $9f +@ref123: + .byte $9f +@ref124: + .byte $9f + .byte $fd + .word @song5ch4loop + + +@song6ch0: +@song6ch0loop: + .byte $fb,$03 +@ref125: + .byte $af +@ref126: + .byte $8f,$a6,$32,$8b,$a8,$42,$83,$aa,$42,$8d,$a8,$3e,$87,$aa,$3e,$83 + .byte $a8,$3e,$89,$a6,$32,$bd,$2e,$91,$a8,$34,$87,$34,$83,$34,$87,$aa + .byte $34,$83,$a8,$3e,$89,$a6,$2e,$ad +@ref127: + .byte $8f,$32,$8b,$a8,$42,$83,$aa,$42,$8d,$a8,$3e,$87,$aa,$3e,$83,$a8 + .byte $3e,$89,$a6,$32,$bd,$2e,$91,$aa,$3e,$87,$3e,$83,$ac,$3e,$87,$a8 + .byte $42,$83,$46,$89,$a6,$2e,$ab + .byte $fd + .word @song6ch0loop + +@song6ch1: +@song6ch1loop: +@ref128: + .byte $af +@ref129: + .byte $8f,$a6,$32,$87,$a8,$42,$83,$aa,$42,$8d,$a8,$3e,$87,$aa,$3e,$83 + .byte $a8,$3e,$8d,$aa,$38,$ad,$00,$8d,$a6,$2e,$8d,$a8,$34,$87,$34,$83 + .byte $34,$87,$aa,$34,$83,$a8,$3e,$8d,$38,$ad +@ref130: + .byte $00,$8d,$a6,$32,$87,$a8,$42,$83,$42,$8d,$aa,$3e,$87,$a8,$3e,$83 + .byte $3e,$8d,$ac,$46,$ad,$00,$8d,$a6,$2e,$8d,$aa,$3e,$87,$3e,$83,$ac + .byte $3e,$87,$a8,$42,$83,$46,$8d,$aa,$42,$9d,$00,$8b + .byte $fd + .word @song6ch1loop + +@song6ch2: +@song6ch2loop: +@ref131: + .byte $97,$8c,$02,$85,$02,$85,$02,$85 +@ref132: + .byte $9f,$8c,$02,$bd,$02,$bd,$02,$bd,$02,$9d +@ref133: + .byte $9f,$02,$bd,$02,$bd,$02,$bd,$02,$9b + .byte $fd + .word @song6ch2loop + +@song6ch3: +@song6ch3loop: +@ref134: + .byte $8a,$18,$84,$14,$88,$18,$84,$14,$8a,$18,$84,$14,$88,$18,$84,$14 + .byte $8a,$18,$9d +@ref135: + .byte $82,$14,$8d,$84,$14,$9d,$14,$9d,$14,$9d,$14,$9d,$14,$9d,$14,$9d + .byte $14,$9d,$14,$87,$8a,$16,$16,$81 +@ref136: + .byte $16,$8d,$84,$14,$9d,$14,$9d,$14,$9d,$14,$9d,$14,$9d,$14,$10,$86 + .byte $15,$88,$11,$82,$14,$91,$84,$14,$9d,$14,$85,$8a,$16,$16,$81 + .byte $fd + .word @song6ch3loop + +@song6ch4: +@song6ch4loop: +@ref137: + .byte $af +@ref138: + .byte $f9,$f9,$8b +@ref139: + .byte $f9,$f9,$89 + .byte $fd + .word @song6ch4loop diff --git a/neslib.h b/neslib.h new file mode 100644 index 0000000..d71e07a --- /dev/null +++ b/neslib.h @@ -0,0 +1,296 @@ +//NES hardware-dependent functions by Shiru (shiru@mail.ru) +//Feel free to do anything you want with this code, consider it Public Domain + +//Versions history: +// 030914 - minor fixes in the vram update system +// 310814 - added vram_flush_update +// 120414 - removed adr argument from vram_write and vram_read, +// unrle_vram renamed to vram_unrle, with adr argument removed +// 060414 - many fixes and improvements, including sequental VRAM updates +// previous versions were created since mid-2011, there were many updates + + + + + +//set bg and spr palettes, data is 32 bytes array + +void __fastcall__ pal_all(const char *data); + +//set bg palette only, data is 16 bytes array + +void __fastcall__ pal_bg(const char *data); + +//set spr palette only, data is 16 bytes array + +void __fastcall__ pal_spr(const char *data); + +//set a palette entry, index is 0..31 + +void __fastcall__ pal_col(unsigned char index,unsigned char color); + +//reset palette to $0f + +void __fastcall__ pal_clear(void); + +//set virtual bright both for sprites and background, 0 is black, 4 is normal, 8 is white + +void __fastcall__ pal_bright(unsigned char bright); + +//set virtual bright for sprites only + +void __fastcall__ pal_spr_bright(unsigned char bright); + +//set virtual bright for sprites background only + +void __fastcall__ pal_bg_bright(unsigned char bright); + + + +//wait actual TV frame, 50hz for PAL, 60hz for NTSC + +void __fastcall__ ppu_wait_nmi(void); + +//wait virtual frame, it is always 50hz, frame-to-frame in PAL, frameskip in NTSC + +void __fastcall__ ppu_wait_frame(void); + +//turn off rendering, nmi still enabled when rendering is disabled + +void __fastcall__ ppu_off(void); + +//turn on bg, spr + +void __fastcall__ ppu_on_all(void); + +//turn on bg only + +void __fastcall__ ppu_on_bg(void); + +//turn on spr only + +void __fastcall__ ppu_on_spr(void); + +//set PPU_MASK directly + +void __fastcall__ ppu_mask(unsigned char mask); + +//get current video system, 0 for PAL, not 0 for NTSC + +unsigned char __fastcall__ ppu_system(void); + + + +//clear OAM buffer, all the sprites are hidden + +void __fastcall__ oam_clear(void); + +//set sprite display mode, 0 for 8x8 sprites, 1 for 8x16 sprites + +void __fastcall__ oam_size(unsigned char size); + +//set sprite in OAM buffer, chrnum is tile, attr is attribute, sprid is offset in OAM in bytes +//returns sprid+4, which is offset for a next sprite + +unsigned char __fastcall__ oam_spr(unsigned char x,unsigned char y,unsigned char chrnum,unsigned char attr,unsigned char sprid); + +//set metasprite in OAM buffer +//meta sprite is a const unsigned char array, it contains four bytes per sprite +//in order x offset, y offset, tile, attribute +//x=128 is end of a meta sprite +//returns sprid+4, which is offset for a next sprite + +unsigned char __fastcall__ oam_meta_spr(unsigned char x,unsigned char y,unsigned char sprid,const unsigned char *data); + +//hide all remaining sprites from given offset + +void __fastcall__ oam_hide_rest(unsigned char sprid); + + + +//play a music in FamiTone format + +void __fastcall__ music_play(unsigned char song); + +//stop music + +void __fastcall__ music_stop(void); + +//pause and unpause music + +void __fastcall__ music_pause(unsigned char pause); + +//play FamiTone sound effect on channel 0..3 + +void __fastcall__ sfx_play(unsigned char sound,unsigned char channel); + +//play a DPCM sample, 1..63 + +void __fastcall__ sample_play(unsigned char sample); + + + +//poll controller and return flags like PAD_LEFT etc, input is pad number (0 or 1) + +unsigned char __fastcall__ pad_poll(unsigned char pad); + +//poll controller in trigger mode, a flag is set only on button down, not hold +//if you need to poll the pad in both normal and trigger mode, poll it in the +//trigger mode for first, then use pad_state + +unsigned char __fastcall__ pad_trigger(unsigned char pad); + +//get previous pad state without polling ports + +unsigned char __fastcall__ pad_state(unsigned char pad); + + +//set scroll, including rhe top bits +//it is always applied at beginning of a TV frame, not at the function call + +void __fastcall__ scroll(unsigned int x,unsigned int y); + +//set scroll after screen split invoked by the sprite 0 hit +//warning: all CPU time between the function call and the actual split point will be wasted! +//warning: the program loop has to fit into the frame time, ppu_wait_frame should not be used +// otherwise empty frames without split will be inserted, resulting in jumpy screen +//warning: only X scroll could be changed in this version + +void __fastcall__ split(unsigned int x,unsigned int y); + + +//select current chr bank for sprites, 0..1 + +void __fastcall__ bank_spr(unsigned char n); + +//select current chr bank for background, 0..1 + +void __fastcall__ bank_bg(unsigned char n); + + + +//get random number 0..255 or 0..65535 + +unsigned char __fastcall__ rand8(void); +unsigned int __fastcall__ rand16(void); + +//set random seed + +void __fastcall__ set_rand(unsigned int seed); + + + +//when display is enabled, vram access could only be done with this vram update system +//the function sets a pointer to the update buffer that contains data and addresses +//in a special format. It allows to write non-sequental bytes, as well as horizontal or +//vertical nametable sequences. +//buffer pointer could be changed during rendering, but it only takes effect on a new frame +//number of transferred bytes is limited by vblank time +//to disable updates, call this function with NULL pointer + +//the update data format: +// MSB, LSB, byte for a non-sequental write +// MSB|NT_UPD_HORZ, LSB, LEN, [bytes] for a horizontal sequence +// MSB|NT_UPD_VERT, LSB, LEN, [bytes] for a vertical sequence +// NT_UPD_EOF to mark end of the buffer + +//length of this data should be under 256 bytes + +void __fastcall__ set_vram_update(unsigned char *buf); + +//all following vram functions only work when display is disabled + +//do a series of VRAM writes, the same format as for set_vram_update, but writes done right away + +void __fastcall__ flush_vram_update(unsigned char *buf); + +//set vram pointer to write operations if you need to write some data to vram + +void __fastcall__ vram_adr(unsigned int adr); + +//put a byte at current vram address, works only when rendering is turned off + +void __fastcall__ vram_put(unsigned char n); + +//fill a block with a byte at current vram address, works only when rendering is turned off + +void __fastcall__ vram_fill(unsigned char n,unsigned int len); + +//set vram autoincrement, 0 for +1 and not 0 for +32 + +void __fastcall__ vram_inc(unsigned char n); + +//read a block from current address of vram, works only when rendering is turned off + +void __fastcall__ vram_read(unsigned char *dst,unsigned int size); + +//write a block to current address of vram, works only when rendering is turned off + +void __fastcall__ vram_write(const unsigned char *src,unsigned int size); + + +//unpack RLE data to current address of vram, mostly used for nametables + +void __fastcall__ vram_unrle(const unsigned char *data); + + + +//like a normal memcpy, but does not return anything + +void __fastcall__ memcpy(void *dst,void *src,unsigned int len); + +//like memset, but does not return anything + +void __fastcall__ memfill(void *dst,unsigned char value,unsigned int len); + +//delay for N frames + +void __fastcall__ delay(unsigned char frames); + + + +#define PAD_A 0x01 +#define PAD_B 0x02 +#define PAD_SELECT 0x04 +#define PAD_START 0x08 +#define PAD_UP 0x10 +#define PAD_DOWN 0x20 +#define PAD_LEFT 0x40 +#define PAD_RIGHT 0x80 + +#define OAM_FLIP_V 0x80 +#define OAM_FLIP_H 0x40 +#define OAM_BEHIND 0x20 + +#define MAX(x1,x2) ((x1)<(x2)?(x2):(x1)) +#define MIN(x1,x2) ((x1)<(x2)?(x1):(x2)) + +#define MASK_SPR 0x10 +#define MASK_BG 0x08 +#define MASK_EDGE_SPR 0x04 +#define MASK_EDGE_BG 0x02 + +#define NAMETABLE_A 0x2000 +#define NAMETABLE_B 0x2400 +#define NAMETABLE_C 0x2800 +#define NAMETABLE_D 0x2c00 + +#define NULL 0 +#define TRUE 1 +#define FALSE 0 + +#define NT_UPD_HORZ 0x40 +#define NT_UPD_VERT 0x80 +#define NT_UPD_EOF 0xff + +//macro to calculate nametable address from X,Y in compile time + +#define NTADR_A(x,y) (NAMETABLE_A|(((y)<<5)|(x))) +#define NTADR_B(x,y) (NAMETABLE_B|(((y)<<5)|(x))) +#define NTADR_C(x,y) (NAMETABLE_C|(((y)<<5)|(x))) +#define NTADR_D(x,y) (NAMETABLE_D|(((y)<<5)|(x))) + +//macro to get MSB and LSB + +#define MSB(x) (((x)>>8)) +#define LSB(x) (((x)&0xff)) diff --git a/neslib.s b/neslib.s new file mode 100644 index 0000000..1041dde --- /dev/null +++ b/neslib.s @@ -0,0 +1,1245 @@ +;NES hardware-dependent functions by Shiru (shiru@mail.ru) +;with improvements by VEG +;Feel free to do anything you want with this code, consider it Public Domain + + + .export _pal_all,_pal_bg,_pal_spr,_pal_col,_pal_clear + .export _pal_bright,_pal_spr_bright,_pal_bg_bright + .export _ppu_off,_ppu_on_all,_ppu_on_bg,_ppu_on_spr,_ppu_mask,_ppu_system + .export _oam_clear,_oam_size,_oam_spr,_oam_meta_spr,_oam_hide_rest + .export _ppu_wait_frame,_ppu_wait_nmi + .export _scroll,_split + .export _bank_spr,_bank_bg + .export _vram_read,_vram_write + .export _music_play,_music_stop,_music_pause + .export _sfx_play,_sample_play + .export _pad_poll,_pad_trigger,_pad_state + .export _rand8,_rand16,_set_rand + .export _vram_adr,_vram_put,_vram_fill,_vram_inc,_vram_unrle + .export _set_vram_update,_flush_vram_update + .export _memcpy,_memfill,_delay + + + +;NMI handler + +nmi: + pha + txa + pha + tya + pha + + lda OAM_BUF + sta PPU_OAM_DMA + + lda palBrightTable0,>palBrightTable1,>palBrightTable2 + .byte >palBrightTable3,>palBrightTable4,>palBrightTable5 + .byte >palBrightTable6,>palBrightTable7,>palBrightTable8 + +palBrightTable0: + .byte $0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f ;black +palBrightTable1: + .byte $0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f +palBrightTable2: + .byte $0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f +palBrightTable3: + .byte $0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f,$0f +palBrightTable4: + .byte $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0a,$0b,$0c,$0f,$0f,$0f ;normal colors +palBrightTable5: + .byte $10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$1a,$1b,$1c,$00,$00,$00 +palBrightTable6: + .byte $10,$21,$22,$23,$24,$25,$26,$27,$28,$29,$2a,$2b,$2c,$10,$10,$10 ;$10 because $20 is the same as $30 +palBrightTable7: + .byte $30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$3a,$3b,$3c,$20,$20,$20 +palBrightTable8: + .byte $30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30 ;white + .byte $30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30 + .byte $30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30 + .byte $30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30,$30 + + .include "famitone2.s" diff --git a/nrom.cfg b/nrom.cfg new file mode 100644 index 0000000..4a67b7c --- /dev/null +++ b/nrom.cfg @@ -0,0 +1,59 @@ +MEMORY { + + ZP: start = $0000, size = $0100, type = rw, define = yes; + HEADER: start = $0000, size = $0010, file = %O ,fill = yes; + PRG: start = $8000, size = $7fc0, file = %O ,fill = yes, define = yes; + DMC: start = $ffc0, size = $003a, file = %O, fill = yes; + VECTORS: start = $fffa, size = $0006, file = %O, fill = yes; + CHR: start = $0000, size = $2000, file = %O, fill = yes; + RAM: start = $0300, size = $0500, define = yes; + + # Use this definition instead if you going to use extra 8K RAM + # RAM: start = $6000, size = $2000, define = yes; +} + +SEGMENTS { + + HEADER: load = HEADER, type = ro; + STARTUP: load = PRG, type = ro, define = yes; + LOWCODE: load = PRG, type = ro, optional = yes; + INIT: load = PRG, type = ro, define = yes, optional = yes; + CODE: load = PRG, type = ro, define = yes; + RODATA: load = PRG, type = ro, define = yes; + DATA: load = PRG, run = RAM, type = rw, define = yes; + VECTORS: load = VECTORS, type = rw; + SAMPLES: load = DMC, type = rw; + CHARS: load = CHR, type = rw; + BSS: load = RAM, type = bss, define = yes; + HEAP: load = RAM, type = bss, optional = yes; + ZEROPAGE: load = ZP, type = zp; + +} + +FEATURES { + + CONDES: segment = INIT, + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; + CONDES: segment = RODATA, + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; + +} + +SYMBOLS { + + __STACKSIZE__ = $0500; # 5 pages stack + + NES_MAPPER = 0; # mapper number + NES_PRG_BANKS = 2; # number of 16K PRG banks, change to 2 for NROM256 + NES_CHR_BANKS = 1; # number of 8K CHR banks + NES_MIRRORING = 0; # 0 horizontal, 1 vertical, 8 four screen + +} diff --git a/runtime.lib b/runtime.lib new file mode 100644 index 0000000..fa9a112 Binary files /dev/null and b/runtime.lib differ diff --git a/sound/music.ftm b/sound/music.ftm new file mode 100644 index 0000000..a01a353 Binary files /dev/null and b/sound/music.ftm differ diff --git a/sound/sounds.ftm b/sound/sounds.ftm new file mode 100644 index 0000000..b709f45 Binary files /dev/null and b/sound/sounds.ftm differ diff --git a/sounds.s b/sounds.s new file mode 100644 index 0000000..d8dcda4 --- /dev/null +++ b/sounds.s @@ -0,0 +1,52 @@ +;this file for FamiTone2 libary generated by nsf2data tool + +sounds: + .word @sfx_ntsc_0,@sfx_pal_0 + .word @sfx_ntsc_1,@sfx_pal_1 + .word @sfx_ntsc_2,@sfx_pal_2 + .word @sfx_ntsc_3,@sfx_pal_3 + +@sfx_ntsc_0: + .byte $80,$7f,$81,$ab,$82,$01,$04,$81,$3f,$04,$81,$1c,$04,$81,$d5,$82 + .byte $00,$04,$81,$9f,$04,$81,$8e,$04,$80,$74,$81,$ab,$82,$01,$04,$81 + .byte $3f,$04,$81,$1c,$04,$81,$d5,$82,$00,$04,$81,$9f,$04,$81,$8e,$04 + .byte $80,$71,$81,$ab,$82,$01,$04,$81,$3f,$04,$81,$1c,$04,$81,$d5,$82 + .byte $00,$04,$81,$9f,$04,$81,$8e,$04,$80,$30,$00 +@sfx_ntsc_1: + .byte $80,$3f,$81,$ab,$82,$01,$01,$81,$3f,$01,$81,$2d,$01,$81,$1c,$01 + .byte $80,$32,$81,$ab,$01,$81,$3f,$01,$81,$2d,$01,$81,$1c,$01,$80,$30 + .byte $00 +@sfx_ntsc_2: + .byte $80,$38,$81,$34,$82,$00,$01,$80,$3a,$81,$27,$01,$80,$3c,$81,$23 + .byte $01,$80,$3e,$81,$34,$01,$80,$3f,$81,$27,$01,$81,$23,$01,$81,$34 + .byte $01,$81,$27,$01,$80,$32,$81,$23,$01,$81,$34,$01,$81,$27,$01,$81 + .byte $23,$01,$81,$34,$01,$81,$27,$01,$81,$23,$01,$81,$34,$01,$81,$27 + .byte $01,$81,$23,$01,$81,$34,$01,$81,$27,$01,$81,$23,$01,$80,$30,$00 +@sfx_ntsc_3: + .byte $83,$38,$84,$46,$85,$00,$01,$83,$3a,$84,$42,$01,$83,$3c,$84,$5e + .byte $01,$83,$3e,$84,$46,$01,$83,$3f,$84,$42,$01,$84,$5e,$01,$84,$46 + .byte $01,$84,$42,$01,$83,$32,$84,$5e,$01,$84,$46,$01,$84,$42,$01,$84 + .byte $5e,$01,$84,$46,$01,$84,$42,$01,$84,$5e,$01,$84,$46,$01,$84,$42 + .byte $01,$84,$5e,$01,$84,$46,$01,$84,$42,$01,$84,$5e,$01,$83,$30,$00 +@sfx_pal_0: + .byte $80,$7f,$81,$8c,$82,$01,$04,$81,$29,$03,$81,$08,$03,$81,$c6,$82 + .byte $00,$04,$81,$94,$03,$81,$84,$03,$80,$74,$81,$8c,$82,$01,$04,$81 + .byte $29,$03,$81,$08,$03,$81,$c6,$82,$00,$04,$81,$94,$03,$81,$84,$03 + .byte $80,$71,$81,$8c,$82,$01,$04,$81,$29,$03,$81,$08,$03,$81,$c6,$82 + .byte $00,$04,$81,$94,$03,$81,$84,$03,$80,$30,$00 +@sfx_pal_1: + .byte $80,$3f,$81,$8c,$82,$01,$01,$81,$29,$01,$81,$18,$01,$81,$08,$01 + .byte $80,$32,$81,$8c,$01,$81,$29,$01,$81,$18,$01,$81,$08,$01,$80,$30 + .byte $00 +@sfx_pal_2: + .byte $80,$38,$81,$31,$82,$00,$01,$80,$3a,$81,$24,$01,$80,$3c,$81,$20 + .byte $01,$80,$3e,$81,$31,$01,$80,$3f,$81,$24,$01,$81,$20,$01,$81,$31 + .byte $01,$81,$24,$01,$80,$32,$81,$20,$01,$81,$31,$01,$81,$24,$01,$81 + .byte $20,$01,$81,$31,$01,$81,$24,$01,$81,$20,$01,$81,$31,$01,$81,$24 + .byte $01,$81,$20,$01,$81,$31,$01,$81,$24,$01,$81,$20,$01,$80,$30,$00 +@sfx_pal_3: + .byte $83,$38,$84,$41,$85,$00,$01,$83,$3a,$84,$3e,$01,$83,$3c,$84,$57 + .byte $01,$83,$3e,$84,$41,$01,$83,$3f,$84,$3e,$01,$84,$57,$01,$84,$41 + .byte $01,$84,$3e,$01,$83,$32,$84,$57,$01,$84,$41,$01,$84,$3e,$01,$84 + .byte $57,$01,$84,$41,$01,$84,$3e,$01,$84,$57,$01,$84,$41,$01,$84,$3e + .byte $01,$84,$57,$01,$84,$41,$01,$84,$3e,$01,$84,$57,$01,$83,$30,$00 diff --git a/tileset.chr b/tileset.chr new file mode 100644 index 0000000..3f94661 Binary files /dev/null and b/tileset.chr differ diff --git a/util/bin-to-h.py b/util/bin-to-h.py new file mode 100644 index 0000000..6adc180 --- /dev/null +++ b/util/bin-to-h.py @@ -0,0 +1,33 @@ +import sys + +use_rle = False +if "--rle" in sys.argv: + use_rle = True + +out = [] + +previous = "NO" +count = 0 + +with open(sys.argv[1]) as f: + x = f.read() + for i in x: + c = hex(ord(i)) + if len(c) == len('0x0'): + c = c[:2] + '0' + c[2] + if use_rle: + if c == previous: + count += 1 + else: + if count: + out.append( hex(count) ) + out.append( previous ) + count = 1 + previous = c + else: + out.append( c ) + if use_rle and count: + out.append( hex(count) ) + out.append( previous ) + +print "const unsigned char __rename_me__[",len(out),"] = {",",".join(out),"};" diff --git a/util/credits.sh b/util/credits.sh new file mode 100644 index 0000000..18270f9 --- /dev/null +++ b/util/credits.sh @@ -0,0 +1,26 @@ +function credit_line() { + echo -n "const unsigned char credits_$1[] = "; + echo "$2" | python ebcdic.py +} + + +# " " +credit_line 0 " SplatooD" +credit_line 1 " a Splatoon demake" +credit_line 2 " Project Lead" +credit_line 3 " John Carmackeral" +credit_line 4 " Music" +credit_line 5 " Nobuo Squidimatsu" +credit_line 6 " Title & Postgame" +credit_line 7 " Koji Ikarashi" +credit_line 8 " Game Design" +credit_line 9 " Squideo Kojima" +credit_line 10 " Graphics" +credit_line 11 " Squid Meier" +credit_line 12 " Game Mechanics" +credit_line 13 " American McGill" +credit_line 14 " Splatoon (C) 2015" +credit_line 15 " Nintendo" +credit_line 16 " Thanks for playing!" + +echo "const unsigned char * credits[] = {" credits_{0..16}, zero, zero, zero "};" diff --git a/util/ebcdic.py b/util/ebcdic.py new file mode 100644 index 0000000..3cf92ae --- /dev/null +++ b/util/ebcdic.py @@ -0,0 +1,9 @@ +import codecs + +out = [] +for i in codecs.encode(raw_input()): + out.append(hex(ord(i)+0x80)) + +out.append("0x00"); + +print "{",",".join(out),"};"