From eaf2415a631a0e919fc5ba4b8671eec1ba14afce Mon Sep 17 00:00:00 2001 From: Willem Date: Tue, 25 Dec 2018 00:49:40 +0100 Subject: [PATCH] added menus --- src/menu/0module.mk | 20 + src/menu/menu.asm | 18 + src/mmenu/0module.mk | 20 + src/mmenu/mmenu.asm | 1183 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 1241 insertions(+) create mode 100644 src/menu/0module.mk create mode 100644 src/menu/menu.asm create mode 100644 src/mmenu/0module.mk create mode 100644 src/mmenu/mmenu.asm diff --git a/src/menu/0module.mk b/src/menu/0module.mk new file mode 100644 index 0000000..62ee7f5 --- /dev/null +++ b/src/menu/0module.mk @@ -0,0 +1,20 @@ + +MENU_NAME := menu +MENU_SRC := $(PATH_SRC)/$(MENU_NAME) +MENU_BIN := $(PATH_BIN)/$(MENU_NAME) +MENU_HEX := $(MENU_BIN)/$(MENU_NAME).hex +MENU_DAT := $(MENU_BIN)/$(MENU_NAME).dat +MENU_RELS := $(MENU_BIN)/$(MENU_NAME).rel +MENU_CODE := $(MENU_SRC)/$(MENU_NAME).asm + +$(MENU_BIN): + $(call mod_mkdir,$(MENU_BIN)) + +$(MENU_BIN)/%.rel: $(MENU_SRC)/%.asm | $(MENU_BIN) + $(call mod_compile_asm,$@,$<) + +$(MENU_HEX): $(MENU_RELS) + $(call mod_link_asm_8000,$(MENU_HEX),$(MENU_RELS)) + +$(MENU_DAT): $(MENU_HEX) + $(call mod_hex2dat,$(MENU_HEX),$(MENU_DAT)) diff --git a/src/menu/menu.asm b/src/menu/menu.asm new file mode 100644 index 0000000..633876c --- /dev/null +++ b/src/menu/menu.asm @@ -0,0 +1,18 @@ +;============================= +; MENU.DAT +; +; DEZE CODE WORDT AANGEROEPEN ALS JE OP DE MENU BUUTON DRUKT IN DOME +; +;=========================== + + ; org 0x8000 +.area _CODE + +DOME_MENU_CALL: + + RET + + .str "wegwerTGQERGetrgergertgE" + .str "weRGerwgerwhwtrhwtrhwtrhtrwhrwthwtrh" + +.area _DATA diff --git a/src/mmenu/0module.mk b/src/mmenu/0module.mk new file mode 100644 index 0000000..e7d4146 --- /dev/null +++ b/src/mmenu/0module.mk @@ -0,0 +1,20 @@ + +MMENU_NAME := mmenu +MMENU_SRC := $(PATH_SRC)/$(MMENU_NAME) +MMENU_BIN := $(PATH_BIN)/$(MMENU_NAME) +MMENU_HEX := $(MMENU_BIN)/$(MMENU_NAME).hex +MMENU_DAT := $(MMENU_BIN)/$(MMENU_NAME).dat +MMENU_RELS := $(MMENU_BIN)/$(MMENU_NAME).rel +MMENU_CODE := $(MMENU_SRC)/$(MMENU_NAME).asm + +$(MMENU_BIN): + $(call mod_mkdir,$(MMENU_BIN)) + +$(MMENU_BIN)/%.rel: $(MMENU_SRC)/%.asm | $(MMENU_BIN) + $(call mod_compile_asm,$@,$<) + +$(MMENU_HEX): $(MMENU_RELS) + $(call mod_link_asm_4000,$(MMENU_HEX),$(MMENU_RELS)) + +$(MMENU_DAT): $(MMENU_HEX) + $(call mod_hex2dat,$(MMENU_HEX),$(MMENU_DAT)) diff --git a/src/mmenu/mmenu.asm b/src/mmenu/mmenu.asm new file mode 100644 index 0000000..2e0359d --- /dev/null +++ b/src/mmenu/mmenu.asm @@ -0,0 +1,1183 @@ +;--------------------------------- +; DOME LOADER +; +; (c) 1998 PARAGON Productions +; +; MMENU.DAT +; +;--------------------------------- + + +DOS .equ 0x0005 +ENASLT .equ 0x0024 + +GET_INT .equ 0x0100 +PUT_INT .equ 0x0103 +COLOR_WHITE .equ 0x0106 +COLOR_BLACK .equ 0x0109 +SCREEN_ON .equ 0x010C +SCREEN_OFF .equ 0x010F +SET_SCREEN0 .equ 0x0112 +SET_SCREEN5 .equ 0x0115 +SPRITES_ON .equ 0x0118 +SPRITES_OFF .equ 0x011B +;PUT_SPRITE .equ 0x011E +SET_PAGE .equ 0x0121 +GET_TIME .equ 0x0124 +PUT_TXT .equ 0x0127 +PUT_TXT2 .equ 0x012A +INIT_BIOS .equ 0x012D +EXIT_ON_ERR .equ 0x0130 +LOAD .equ 0x0133 +INIT_LIB .equ 0x0136 +SAVE .equ 0x0139 +PUT_PAGE_FD .equ 0x013C +PUT_PAGE_FE .equ 0x013F + +INIT_REP .equ 0x0142 + +M_MUSLOAD .equ 0x0142 +M_KITLOAD .equ 0x0145 +M_PLAY .equ 0x0148 +M_STOP .equ 0x014B +M_CONT .equ 0x014E +M_FADE .equ 0x0151 +M_LOC .equ 0x0154 +M_FREE .equ 0x0157 + +POP_UP_START .equ 0x015A +PUTBLK .equ 0x015D +PUT_COLOR .equ 0x0160 +DOME_MENU_CALL .equ 0x0163 +RESTORE_MEM .equ 0x0166 +INIT_BIOS_MEM .equ 0x0169 +RUN_GAME .equ 0x016C +INT_ROUTINE .equ 0x016F +HOOK_ON .equ 0x0172 +HOOK_OFF .equ 0x0175 +INIT_INT .equ 0x0178 + +M_MUSINFO .equ 0x017B +M_ADR .equ 0x017E +M_DRVINFO .equ 0x0181 +M_DATA .equ 0x0184 +DOSJMP .equ 0x0187 + +CHIPS .equ TAB_LOC-13 + ; CHIPS + ; 0b00000000 + ; 1 = FMPAC + ; 11 = MUS / 256 KB YES/NO + ; 1 = MOONSOUND + ; 1 = MSX-MIDI + ; 1 = FAC-MIDI + ; 1 = + ; 1 = +INT_ON .equ TAB_LOC-12 ; 0=AAN +SPRATR .equ TAB_LOC-11 +MOUSEY .equ TAB_LOC-11 +MOUSEX .equ TAB_LOC-10 +MOUSE_OFF .equ TAB_LOC-9 ; AAN OF UIT +MOUSE_USE .equ TAB_LOC-8 ; " """""""" +MOUSE_PORT .equ TAB_LOC-7 ; PORT 1 OF 2 +MOUSE_WAIT1 .equ TAB_LOC-6 ; WAIT CYCLE 1 +MOUSE_WAIT2 .equ TAB_LOC-5 ; WAIT CYCLE 2 +MOUSE_BUTTONS .equ TAB_LOC-4 +MSX_TYPE .equ TAB_LOC-3 +DOSJMPTAB .equ TAB_LOC-2 + +TAB_LOC .equ 0x0F00 +DOME_BIOS .equ 0x0F00 ; BIOS+GAMECODE(0x2500)+TANKTAB(0x3000) +DOME_VELD .equ 0x0F02 ; THE LEVEL(0x4000) +DOME_CODE .equ 0x0F04 ; THE DOME ENGINE(0x8000) +DOME_PAGE3 .equ 0x0F06 ; MORE ENGINE +DOME_MENU .equ 0x0F08 ; GFX DOME MENU+CODE(0x8000) +DOME_TEMP .equ 0x0F0A ; + +DOME_CH_CODE .equ 0x0F0C ; LEVEL CHOOSER CODE +DOME_CH_GFX1 .equ 0x0F0E ; LEVEL CHOOSE GFX +DOME_CH_GFX2 .equ 0x0F10 ; GFX + +DOME_MENT_CODE .equ 0x0F12 ; CODE VOOR MENTAT +DOME_MENT1 .equ 0x0F14 ; BUFFER VOOR GFX MENTAT + +DOME_GFX_UNIT .equ 0x0F16 ; GAME GFX (UNIT) +DOME_GFX_BLPA .equ 0x0F18 ; GAME GFX (BALK EN PAGE) + +DOME_MMENU .equ 0x0F1A ; MAIN MENU GFX + CODE AT 4000 + + + ; org 0x4000 +.area _CODE + + JP DO_MENU + +;===== + +COPY2_0: + .db 0,0,0,2 + .db 0,0,0,0 + .db 0,1,212,0 + .db 0,0,0xD0 + +ST_MISSION1: + LD A,#255 + LD (INT_ON),A ; GEEN MOUSE MEER + + LD A,#5 + CALL M_FADE +ST_MISSION1_LP: + EI + HALT + + LD HL,#0x4125 ; WACHT TOT STOP + CALL M_DATA + + OR A + ;JR NZ,ST_MISSION1_LP ; TODO: wait altijd....(als no sound drv loaded...) + + LD A,#1 + JP RUN_GAME + + +ST_MISSION2: + LD A,#255 + LD (INT_ON),A ; GEEN MOUSE MEER + + LD A,#5 + CALL M_FADE +ST_MISSION2_LP: + EI + HALT + + LD HL,#0x4125 ; WACHT TOT STOP + CALL M_DATA + + OR A + ;JR NZ,ST_MISSION2_LP + + LD A,#2 + JP RUN_GAME + +DO_MENU: + LD HL,#0x6000 + LD DE,#0x0000 + LD A,#1 + CALL POP_UP_START + + LD HL,#0x7000 + LD DE,#0x8000 + LD A,#0 + CALL POP_UP_START + + LD A,#1 + CALL M_PLAY + + LD A,#31 ; VPAGE 0 + CALL SET_PAGE + + CALL SET_SCREEN0 + CALL SET_SCREEN5 ; POPCOM VERNAGELT SCREEN5 (DENK IK) + + LD A,(0xF3E0) ; screen5,2 + OR #0b00000010 + LD (0xF3E0),A + DI + OUT (0x99),A + LD A,#129 ; REG 1 + OUT (0x99),A + EI + + LD HL,#COPY2_0 + CALL PUTBLK + + LD HL,#SPRTAB ; maak sprites + CALL MAK_SPR + + XOR A + LD (INT_ON),A + + CALL SPRITES_ON + + LD HL,#SPRATR + LD A,#1 + DI + OUT (0x99),A + LD A,#0x8E + OUT (0x99),A + + LD A,#0x00 ; ff + OUT (0x99),A + LD A,#0x76 ; 35 + OUT (0x99),A + + LD BC,#0x0498 + OTIR + EI + +MENU_LOOP: + LD DE,(SPRATR) + LD HL,#MAIN_MENU + LD B,#6 + CALL CHK_BUTTON + LD A,(EXIT_DOS) + OR A + JP Z,EXIT_ON_ERR + CP #2 + JP Z,ST_MISSION1 + CP #3 + JP Z,ST_MISSION2 + JR MENU_LOOP + + +MAIN_MENU: + .db 98,122,148,130 + .dw START_GAME + + .db 98,134,148,142 + .dw LOAD_GAME + + .db 94,146,153,154 + .dw REPLAY_INTRO + + .db 94,158,153,166 + .dw RESTART_MSX + + .db 107,170,136,178 + .dw QUIT_DOS + + .db 0,0,255,211 + .dw RES_ALL + +;--- + +START_GAME: + LD A,(MAIN_MENU_ST) + OR A + JR Z,START_GAME_FIRE + + CP #1 + CALL Z,LOAD_GAME_RES + CP #2 + CALL Z,REPLAY_INTRO_RES + CP #3 + CALL Z,RESTART_MSX_RES + CP #4 + CALL Z,QUIT_DOS_RES + + XOR A + LD (MAIN_MENU_ST),A + + LD HL,#COPY_START_GAME + LD A,(HL) + LD B,#52 + ADD B + LD (HL),A + CALL PUTBLK +START_GAME_FIRE: + LD A,(MOUSE_BUTTONS) + BIT 4,A + RET NZ + BIT 5,A + RET Z + + LD HL,#COPY_MINO_SAV + CALL PUTBLK + LD HL,#COPY_MINO1 ; BEWAAR LOGO + CALL PUTBLK + LD HL,#COPY_MINO2 ; COPY SUB MENU + CALL PUTBLK + HALT ; EVE MUIS UITLEXEN +START_GAME_LOOP: + LD DE,(SPRATR) + LD HL,#START_GAME_MENU2 + LD B,#3 ; 3 MENU'S + CALL CHK_BUTTON + LD A,(EXIT_DOS) + OR A + RET Z ; 0 = EXIT 2 DOS + CP #2 ; 1 = EXIT 2 MENU + RET Z ; 2 = START MION 1 + CP #3 ; 3 = START MION 2 + RET Z + CP #1 + JR NZ,START_GAME_LOOP + +START_GAME_NOT: + LD A,#255 ; EVEN NOG RESET + LD (EXIT_DOS),A ; ANDER NOOIT MEER EXIT + LD (SUB_MENU_ST),A ; STATUS SUB MENU RESET!! + RET + +START_GAME_MENU2: + .db 84,63,104,71 + .dw START_MISSION1 + + .db 144,63,164,71 + .dw START_MISSION2 + + .db 0,0,255,211 + .dw START_RES_ALL + + +;-- + +START_MISSION1: + LD A,(SUB_MENU_ST) + OR A + JR Z,START_MION1_FIRE + + CP #1 + CALL Z,OK_RES_MINO2 + + XOR A + LD (SUB_MENU_ST),A + + LD HL,#COPY_OK_MINO1 + LD A,(HL) + LD B,#21 + ADD B + LD (HL),A + CALL PUTBLK +START_MION1_FIRE: + LD A,(MOUSE_BUTTONS) + BIT 4,A + RET NZ + LD A,#2 + LD (EXIT_DOS),A + RET + + + + +START_MISSION2: + LD A,(SUB_MENU_ST) + CP #1 + JR Z,START_MION2_FIRE + + OR A + CALL Z,OK_RES_MINO1 + + LD A,#1 + LD (SUB_MENU_ST),A + + LD HL,#COPY_OK_MINO2 + LD A,(HL) + LD B,#21 + ADD B + LD (HL),A + CALL PUTBLK +START_MION2_FIRE: + LD A,(MOUSE_BUTTONS) + BIT 4,A + RET NZ + LD A,#3 + LD (EXIT_DOS),A + RET + + +START_RES_ALL: + LD A,(SUB_MENU_ST) + CP #255 + JR Z,START_RS_AL_FIRE + + OR A + CALL Z,OK_RES_MINO1 + CP #1 + CALL Z,OK_RES_MINO2 ; DEZE SUB'S GEVEN XOR A + XOR A + CPL + LD (SUB_MENU_ST),A ; 255 + RET +START_RS_AL_FIRE: + LD A,(MOUSE_BUTTONS) + BIT 5,A + RET NZ + + LD HL,#COPY_MINO_BACK + CALL PUTBLK + + LD A,#1 + LD (EXIT_DOS),A + LD HL,#COPY_OK + LD (HL),#0 + RET + + + +OK_RES_MINO1: + LD HL,#COPY_OK_MINO1 + LD A,#0 + LD (HL),A + CALL PUTBLK + XOR A + RET + +OK_RES_MINO2: + LD HL,#COPY_OK_MINO2 + LD A,#0 + LD (HL),A + CALL PUTBLK + XOR A + RET + + + +START_GAME_RES: + LD HL,#COPY_START_GAME + LD (HL),#0 + CALL PUTBLK + XOR A + RET + +;=---- + + +LOAD_GAME: + LD A,(MAIN_MENU_ST) + CP #1 + JR Z,LOAD_GAME_FIRE + + OR A + CALL Z,START_GAME_RES + CP #2 + CALL Z,REPLAY_INTRO_RES + CP #3 + CALL Z,RESTART_MSX_RES + CP #4 + CALL Z,QUIT_DOS_RES + + LD A,#1 + LD (MAIN_MENU_ST),A + + LD HL,#COPY_LOAD_GAME + LD A,(HL) + LD B,#52 + ADD B + LD (HL),A + CALL PUTBLK +LOAD_GAME_FIRE: + LD A,(MOUSE_BUTTONS) + BIT 4,A + RET NZ + BIT 5,A + RET Z + JP NOT_SUPPORTED + + +LOAD_GAME_RES: + LD HL,#COPY_LOAD_GAME + LD A,#0 + LD (HL),A + CALL PUTBLK + XOR A + RET + +;-==-=-= + + +REPLAY_INTRO: + LD A,(MAIN_MENU_ST) + CP #2 + JR Z,REPLAY_INT_FIRE + + OR A + CALL Z,START_GAME_RES + CP #1 + CALL Z,LOAD_GAME_RES + CP #3 + CALL Z,RESTART_MSX_RES + CP #4 + CALL Z,QUIT_DOS_RES + + LD A,#2 + LD (MAIN_MENU_ST),A + + LD HL,#COPY_REPLY_INTRO + LD A,(HL) + LD B,#61 + ADD B + LD (HL),A + CALL PUTBLK +REPLAY_INT_FIRE: + LD A,(MOUSE_BUTTONS) + BIT 4,A + RET NZ + BIT 5,A + RET Z + JP NOT_SUPPORTED + + +REPLAY_INTRO_RES: + LD HL,#COPY_REPLY_INTRO + LD A,#0 + LD (HL),A + CALL PUTBLK + XOR A + RET + + +;--0-0- + +RESTART_MSX: + LD A,(MAIN_MENU_ST) + CP #3 + JR Z,RESTART_MSX_FIRE + + OR A + CALL Z,START_GAME_RES + CP #1 + CALL Z,LOAD_GAME_RES + CP #2 + CALL Z,REPLAY_INTRO_RES + CP #4 + CALL Z,QUIT_DOS_RES + + LD A,#3 + LD (MAIN_MENU_ST),A + + LD HL,#COPY_RESTART_MSX + LD A,(HL) + LD B,#61 + ADD B + LD (HL),A + CALL PUTBLK +RESTART_MSX_FIRE: + LD A,(MOUSE_BUTTONS) + BIT 4,A + RET NZ + BIT 5,A + RET Z + + LD HL,#COPY_DOME_PAGE3 ; BEWAAR LOGO + CALL PUTBLK + LD HL,#COPY_YES_NO ; COPY SUB MENU + CALL PUTBLK + HALT ; EVE MUIS UITLEXEN +RESTART_LOOP: + LD DE,(SPRATR) + LD HL,#RESTART_MENU + LD B,#3 ; 3 MENU'S + CALL CHK_BUTTON + LD A,(EXIT_DOS) + DEC A ; 1 = EXIT 2 MENU + JR NZ,RESTART_LOOP + + LD A,#255 ; EVEN NOG RESET + LD (EXIT_DOS),A ; ANDER NOOIT MEER EXIT + LD (SUB_MENU_ST),A ; STATUS SUB MENU RESET!! + RET + +RESTART_MSX_RES: + LD HL,#COPY_RESTART_MSX + LD A,#0 + LD (HL),A + CALL PUTBLK + XOR A + RET + +RESTART_MENU: + .db 102,93,122,101 + .dw RESTART_YES + + .db 126,93,146,101 + .dw RESTART_NO + + .db 0,0,255,211 + .dw RES_YES_NO + +;-- + +RESTART_YES: + LD A,(SUB_MENU_ST) + OR A + JR Z,RESTART_YES_FIRE + + DEC A + CALL Z,NO_RES + + XOR A + LD (SUB_MENU_ST),A + + LD HL,#COPY_YES + LD A,(HL) + LD B,#21 + ADD B + LD (HL),A + CALL PUTBLK +RESTART_YES_FIRE: + LD A,(MOUSE_BUTTONS) + BIT 4,A + RET NZ + + LD A,#255 + LD (INT_ON),A ; GEEN MOUSE MEER + + LD A,#5 + CALL M_FADE +RESTART_MSX_LP: + EI + HALT + + LD HL,#0x4125 ; WACHT TOT STOP + CALL M_DATA + + OR A + JR NZ,RESTART_MSX_LP + + CALL SCREEN_OFF + + LD A,#0 + LD HL,#0 + CALL ENASLT ; BIOS AAN + JP 0x0 + + +RESTART_NO: + LD A,(SUB_MENU_ST) + CP #1 + JR Z,RESTART_NO_FIRE + + OR A + CALL Z,YES_RES + + LD A,#1 + LD (SUB_MENU_ST),A + + LD HL,#COPY_NO + LD A,(HL) + LD B,#21 + ADD B + LD (HL),A + CALL PUTBLK +RESTART_NO_FIRE: + LD A,(MOUSE_BUTTONS) + BIT 4,A + RET NZ + + LD HL,#COPY_DOME_PAGE0 ; LOGO BACK + CALL PUTBLK + LD A,#1 + LD (EXIT_DOS),A + LD HL,#COPY_NO ; ANDER ZWART BLOCK + LD (HL),#0 ; WEL OP 0 ZEWTTEN + RET + +;=-=-=-=-= + + +QUIT_DOS: + LD A,(MAIN_MENU_ST) + CP #4 + JR Z,QUIT_DOS_FIRE + + OR A + CALL Z,START_GAME_RES + CP #1 + CALL Z,LOAD_GAME_RES + CP #2 + CALL Z,REPLAY_INTRO_RES + CP #3 + CALL Z,RESTART_MSX_RES + + LD A,#4 + LD (MAIN_MENU_ST),A + + LD HL,#COPY_QUIT_DOS + LD A,(HL) + LD B,#31 + ADD B + LD (HL),A + CALL PUTBLK +QUIT_DOS_FIRE: + LD A,(MOUSE_BUTTONS) + BIT 4,A + RET NZ + BIT 5,A + RET Z + + LD HL,#COPY_DOME_PAGE3 ; BEWAAR LOGO + CALL PUTBLK + LD HL,#COPY_YES_NO ; COPY SUB MENU + CALL PUTBLK + HALT ; EVE MUIS UITLEXEN +QUIT_DOS_LOOP: + LD DE,(SPRATR) + LD HL,#QUIT_DOS_MENU2 + LD B,#3 ; 3 MENU'S + CALL CHK_BUTTON + LD A,(EXIT_DOS) + OR A + RET Z ; 0 = EXIT 2 DOS + CP #1 ; 1 = NO 2 MENU + JR NZ,QUIT_DOS_LOOP + + LD A,#255 ; EVEN NOG RESET + LD (EXIT_DOS),A ; ANDER NOOIT MEER EXIT + LD (SUB_MENU_ST),A ; STATUS SUB MENU RESET!! + RET + +QUIT_DOS_MENU2: + .db 102,93,122,101 + .dw QUIT_DOS_YES + + .db 126,93,146,101 + .dw QUIT_DOS_NO + + .db 0,0,255,211 + .dw RES_YES_NO + + +;-- + +QUIT_DOS_YES: + LD A,(SUB_MENU_ST) + OR A + JR Z,QUIT_DO_YE_FIRE + + CP #1 + CALL Z,NO_RES + + XOR A + LD (SUB_MENU_ST),A + + LD HL,#COPY_YES + LD A,(HL) + LD B,#21 + ADD B + LD (HL),A + CALL PUTBLK +QUIT_DO_YE_FIRE: + LD A,(MOUSE_BUTTONS) + BIT 4,A + RET NZ + + XOR A + LD (EXIT_DOS),A + RET + +QUIT_DOS_NO: + LD A,(SUB_MENU_ST) + CP #1 + JR Z,QUIT_DOS_NO_FIRE + + OR A + CALL Z,YES_RES + + LD A,#1 + LD (SUB_MENU_ST),A + + LD HL,#COPY_NO + LD A,(HL) + LD B,#21 + ADD B + LD (HL),A + CALL PUTBLK +QUIT_DOS_NO_FIRE: + LD A,(MOUSE_BUTTONS) + BIT 4,A + RET NZ + + LD HL,#COPY_DOME_PAGE0 ; LOGO BACK + CALL PUTBLK + LD A,#1 + LD (EXIT_DOS),A + LD HL,#COPY_NO ; ANDER ZWART BLOCK + LD (HL),#0 ; WEL OP 0 ZEWTTEN + RET +RES_YES_NO: + LD A,(MOUSE_BUTTONS) + BIT 5,A + JR Z,RES_YES_NO_CAN + LD A,(SUB_MENU_ST) + CP #255 + RET Z + OR A + CALL Z,YES_RES + CP #1 + CALL Z,NO_RES ; DEZE SUB'S GEVEN XOR A + CPL + LD (SUB_MENU_ST),A ; 255 + RET +RES_YES_NO_CAN: + LD A,#1 + LD (EXIT_DOS),A + LD HL,#COPY_DOME_PAGE0 ; LOGO BACK + CALL PUTBLK + LD A,#1 + LD (EXIT_DOS),A + LD HL,#COPY_NO ; ANDER ZWART BLOCK + LD (HL),#0 ; WEL OP 0 ZEWTTEN + LD HL,#COPY_YES + LD (HL),#0 + RET + + +QUIT_DOS_RES: + LD HL,#COPY_QUIT_DOS + LD A,#0 + LD (HL),A + CALL PUTBLK + XOR A + RET + +YES_RES: + LD HL,#COPY_YES + LD A,#0 + LD (HL),A + CALL PUTBLK + XOR A + RET +NO_RES: + LD HL,#COPY_NO + LD A,#0 + LD (HL),A + CALL PUTBLK + XOR A + RET +OK_RES: + LD HL,#COPY_OK + LD A,#0 + LD (HL),A + CALL PUTBLK + XOR A + RET + + +;-=-=-=-= + +RES_ALL: + LD A,(MAIN_MENU_ST) + CP #255 + RET Z ; ANDERS BLIJF JE KOPIIEREN + OR A + CALL Z,START_GAME_RES + CP #1 + CALL Z,LOAD_GAME_RES + CP #2 + CALL Z,REPLAY_INTRO_RES + CP #3 + CALL Z,RESTART_MSX_RES + CP #4 + CALL Z,QUIT_DOS_RES + CPL + LD (MAIN_MENU_ST),A + RET + +;-=-=- + +NOT_SUPPORTED: + LD HL,#COPY_DOME_PAGE3 ; BEWAAR LOGO + CALL PUTBLK + LD HL,#COPY_OK_MENU ; COPY SUB MENU + CALL PUTBLK + HALT ; MINSTENS 1 KEER MUIS UITLEZEN +NOT_SUPPOR_LOOP: + LD DE,(SPRATR) + LD HL,#NOT_SUPPOR_MENU + LD B,#3 ; 3 MENU'S + CALL CHK_BUTTON + LD A,(EXIT_DOS) + CP #1 + JR Z,NOT_SUPPOR_2MAIN + JR NOT_SUPPOR_LOOP + +NOT_SUPPOR_2MAIN: + LD A,#255 ; EVEN NOG RESET + LD (EXIT_DOS),A ; ANDER NOOIT MEER EXIT + LD (SUB_MENU_ST),A ; STATUS SUB MENU RESET!! + + LD HL,#COPY_DOME_PAGE0 ; LOGO BACK + CALL PUTBLK + RET + +NOT_SUPPOR_MENU: + .db 114,93,134,101 + .dw NOT_SUPPOR_OK + + .db 0,0,255,211 + .dw NOT_SUPPOR_NOT + +NOT_SUPPOR_OK: + LD A,(MOUSE_BUTTONS) + BIT 4,A + JR Z,NOT_SUPPOR_OKB + + LD A,(SUB_MENU_ST) + OR A + RET Z ; DIT IS ONS MENU + + XOR A + LD (SUB_MENU_ST),A + + LD HL,#COPY_OK + LD A,(HL) + LD B,#21 + ADD B + LD (HL),A + CALL PUTBLK + RET +NOT_SUPPOR_OKB: + LD A,#1 + LD (EXIT_DOS),A + RET + + +NOT_SUPPOR_NOT: + LD A,(SUB_MENU_ST) + DEC A ; 1 + CALL NZ,OK_RES + LD A,#1 + LD (SUB_MENU_ST),A + LD A,(MOUSE_BUTTONS) + BIT 5,A + RET NZ + LD A,#1 + LD (EXIT_DOS),A + LD HL,#COPY_OK + LD (HL),#0 + RET + + +CHK_BUTTON: + LD A,D ; X + CP (HL) + INC HL + JR C,CHK_BUTTON_2 + + LD A,E ; Y + CP (HL) + INC HL + JR C,CHK_BUTTON_3 + + LD A,D ; X + CP (HL) + INC HL + JR NC,CHK_BUTTON_4 + + LD A,E ; Y + CP (HL) + INC HL + JR NC,CHK_BUTTON_5 + + LD A,(HL) + INC HL + LD H,(HL) + LD L,A + JP (HL) ; Gevonden dus JP (HL) + +CHK_BUTTON_2: INC HL +CHK_BUTTON_3: INC HL +CHK_BUTTON_4: INC HL +CHK_BUTTON_5: INC HL + INC HL + DJNZ CHK_BUTTON + RET + +MAK_SPR: + DI + LD A,#1 + OUT (0x99),A + LD A,#0x8E + OUT (0x99),A + LD A,#255 + OUT (0x99),A + LD A,#0x37 + OUT (0x99),A + LD HL,#SPRTAB + + LD B,#13 +MAK_SPR_LP: + PUSH BC + LD BC,#0x2098 + OTIR + POP BC + DJNZ MAK_SPR_LP + + EI + RET + + +SUB_MENU_ST: .db 255 +MAIN_MENU_ST: .db 255 +EXIT_DOS: .db 255 ; 0=2DOS 1=2MAINMENU + +COPY_START_GAME: + .db 0,0,0,1 + .db 98,0,122,0 + .db 50,0,8,0 + .db 0,0,0xD0 + +COPY_MINO1: + .db 0,0,103,1 + .db 68,0,45,0 + .db 52,0,30,0 + .db 0,0,0xD0 + +COPY_MINO2: + .db 54,0,103,1 + .db 128,0,45,0 + .db 52,0,30,0 + .db 0,0,0xD0 + +COPY_MINO_SAV: + .db 68,0,45,0 + .db 106,0,103,1 + .db 156,0,30,0 + .db 0,0,0xD0 + +COPY_MINO_BACK: + .db 106,0,103,1 + .db 68,0,45,0 + .db 156,0,30,0 + .db 0,0,0xD0 + +COPY_OK_MINO1: + .db 0,0,63,1 + .db 84,0,63,0 + .db 20,0,8,0 + .db 0,0,0xD0 + +COPY_OK_MINO2: + .db 0,0,63,1 + .db 144,0,63,0 + .db 20,0,8,0 + .db 0,0,0xD0 + + +COPY_LOAD_GAME: + .db 0,0,9,1 + .db 98,0,134,0 + .db 50,0,8,0 + .db 0,0,0xD0 + +COPY_REPLY_INTRO: + .db 0,0,18,1 + .db 94,0,146,0 + .db 59,0,8,0 + .db 0,0,0xD0 + +COPY_RESTART_MSX: + .db 0,0,27,1 + .db 94,0,158,0 + .db 59,0,8,0 + .db 0,0,0xD0 + +COPY_QUIT_DOS: + .db 0,0,36,1 + .db 107,0,170,0 + .db 29,0,8,0 + .db 0,0,0xD0 + +COPY_DOME_PAGE3: + .db 98,0,75,0 + .db 108,0,72,1 + .db 52,0,30,0 + .db 0,0,0xD0 + +COPY_DOME_PAGE0: + .db 108,0,72,1 + .db 98,0,75,0 + .db 52,0,30,0 + .db 0,0,0xD0 + + +COPY_YES_NO: + .db 0,0,72,1 + .db 98,0,75,0 + .db 52,0,30,0 + .db 0,0,0xD0 + +COPY_OK_MENU: + .db 54,0,72,1 + .db 98,0,75,0 + .db 52,0,30,0 + .db 0,0,0xD0 + + +COPY_YES: + .db 0,0,45,1 + .db 102,0,93,0 + .db 20,0,8,0 + .db 0,0,0xD0 + +COPY_NO: + .db 0,0,54,1 + .db 126,0,93,0 + .db 20,0,8,0 + .db 0,0,0xD0 + +COPY_OK: + .db 0,0,63,1 + .db 114,0,93,0 + .db 20,0,8,0 + .db 0,0,0xD0 + +SPRTAB: + .db 254,130,132,136,144,160,192,0 + .db 0,0,0,0,0,0,0,0 + .db 0,0,0,0,0,0,0,0 + .db 0,0,0,0,0,0,0,0 + + .db 0xFF,0x80,0x80,0x80,0x80,0x80,0x80,0x80 + .db 0x80,0xFF,0,0,0,0,0,0 + .db 0xC0,0x40,0x40,0x40,0x40,0x40,0x40,0x40 + .db 0x40,0xC0,0,0,0,0,0,0 + + .db 0x20,0x40,0xA0,0x10,0x08,0,0,0 + .db 0,0,0,0x08,0x10,0xA0,0x40,0x20 + .db 0x04,0x02,0x05,0x08,0x10,0,0,0 + .db 0,0,0,0x10,0x08,0x05,0x02,0x04 + + ; pijl omhoog + .db 0x01,0x02,0x04,0x08,0x0e,0x02,0x02,0x03 + .db 0,0,0,0,0,0,0,0 + .db 0x80,0x40,0x20,0x10,0x70,0x40,0x40,0xc0 + .db 0,0,0,0,0,0,0,0 + ; pijl rechts + .db 0,0,0,0,0x18,0x14,0xF2,0x81 + .db 0x81,0xF2,0x14,0x18,0,0,0,0 + .db 0,0,0,0,0,0,0,0 + .db 0,0,0,0,0,0,0,0 + ; pijl omlaag + .db 0x03,0x02,0x02,0x0E,0x08,0x04,0x02,0x01 + .db 0,0,0,0,0,0,0,0 + .db 0xC0,0x40,0x40,0x70,0x10,0x20,0x40,0x80 + .db 0,0,0,0,0,0,0,0 + ; pijl links + .db 0,0,0,0,0x18,0x24,0x47,0x81 + .db 0x81,0x47,0x24,0x18,0,0,0,0 + .db 0,0,0,0,0,0,0,0 + .db 0,0,0,0,0,0,0,0 + ; attack rondje + .db 0x07,0x18,0x20,0x40,0x40,0x80,0x83,0x83 + .db 0x80,0x40,0x40,0x20,0x18,0x07,0,0 + .db 0x80,0x60,0x10,0x08,0x08,0x04,0x04,0x04 + .db 0x04,0x08,0x08,0x10,0x60,0x80,0,0 + ; build blokje + .db 0x88,0x11,0x22,0x44,0x88,0x11,0x22,0x44 + .db 0x88,0x11,0x22,0x44,0x88,0x11,0x22,0x44 + .db 0x88,0x11,0x22,0x44,0x88,0x11,0x22,0x44 + .db 0x88,0x11,0x22,0x44,0x88,0x11,0x22,0x44 + ; multiple select 1 + .db 0xF0,0x80,0x80,0x80,0x00,0x00,0x00,0x00 + .db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + .db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + .db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + ; multiple select 2 + .db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + .db 0x00,0x00,0x00,0x00,0x80,0x80,0x80,0xf0 + .db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + .db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + ; multiple select 3 + .db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + .db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + .db 0x0f,0x01,0x01,0x01,0x00,0x00,0x00,0x00 + .db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + ; multiple select 4 + .db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + .db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + .db 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 + .db 0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x0f + +.area _DATA