(M ret eplayGameBegin >F>(= ̀>Date 981017 "   *   *    A "    A *  ret Gam'ff s nٙgcnܙ3>CHAPTER 4 LINK603n> /7G>/Gx>0Gɯ>>>>ȯ>( (( ()(%>>( >>>1Q0͊ P(͠>ͩ nPʹrͱͿG!x͇ ^#V# (A xE$&.<<(5![ ͍!́!́>>>>> CB>GHI!͛!> ́>@@ˇD @˿@!d ͍a!!{ Game BeginPress Start ͻ ͻ xxxxxxxxxxxx ɼ Ȼ ͻ xxxxxxxxxxxx ͼ xxxxxxxxxxxx Ȼ ɼ ͼ xxxxxxxxxxxx ͼ xxxxxxxxxxxx ͻͻ xxxxxxxxxxxx xxxxxxxxxxxx ͼͼ xxxxxxxxxxxx~BBBBBB~~~~~l|88||88|8|8|8||8|<<><~~<ffffff{>c8ll8x~~~<~~<<~~< 0``0$ff$<~~<000000llllllll0|x 00f8l8vv``0```0`00`f<x00000x xflxlf``````~8ll8ff|``xxff|lfxxx000000x0l88lx00x 0`x`````x`0 xx8l00x |v``|ffxx |vxx8l```v| `lvff0p000x x`flxlp00000xxxff|`v| vf`|x 0|004vx0ll8l| 0d00000000v8lP(xx(xx xx(v v(| (||(|xx8D@@@f<~~ff|``00000x |v p000x xx v2L2L8 DD8DDDz@||||||l(| 8DD8llL|<@0@< 1.1 WARN "Version \1 or later of 'memory1.asm' is required." ENDC ELSE ldh a,[rSTAT] and STATF_BUSY jr nz,@-4 )KEYPAD_ASMc:\A\GB\include\memory1.asm\2",2,1) 3[s2 䣏,a ld a,__s1 ld [\1+1],a PURGE __s1,__s2 [E ; LD16r Addr,p 䣏 ld a,[\2]D [\ IF \1 > 1.2 WARN "Version \1 or later of 'keypad.asm' is required." ENDC c:\A\GB\include\keypad.asm\keypad.asm6E,$0E,$EC,$CC,$DD,$DC,$99,$9F,$BB,$B9,$33,$3E 䣏> 8 pop hl ENDA$d16aꏂc:\A\GB\include\keypad.asm[it immediate VALH䣏 at ADDR. ld16ir: MACRO ld a,(\2) & $ff ld [\1],a D) x돂c:\A\GB\include\keypad.asm ENDM ;* ld16irr ADDR,VALUE - 8 bytes, 44 cycles ;* Store 16-bit immediate VALUE to memory at ADDR. ld16irrF- 裏H쏂c:\A\GB\include\keypad.asm2) & $ff IF 1.5 > 1L5 )SLAVE_CODEh a,[rSTAT] and STATF_BUSY jr nz,@-4 ;䣏DDR2 - 10 bytes, 68 cycles ;* ld16 ADDR1,RP2 - 10 bytes, 68 cycles ;* ld16 ADDR1,ADDR2 - 14 bytes, 92 cycles ;* Br hl)MASTER_CODE-bit contents of RP2 (bc,de, or hl) or ADDR2. ld16: MACRO __p1 EQUS STRLWR("\1") __p2 EQUS STRLWR("\2") IF (STRCMP("{__p1}","bc")==0) || (STRCMP("{__p1}","de")==0) || (STRCMP("{__p1}","hl")==0) ; LD16 rp,? __d1 B,1,1)SLAVE_INITUB("\1",2,1) IF (STRCMP("{__p2}","bc")==0) || (STRCMP("{__p2}","de")==0) || (STRCMP("{__p2}","hl")==0) ; LD16 rp,rp __s1 EQUS STRSUB("\2",1,1) __s push hl ld b,32 or a jr z,.wait ld b,0 .wait: ldh a,[$41] and 2 jr nz,.wait ld a,b ld [de],a pop hl pop de pop bc ret AddrList: dw $9800+5+(32*10) dw $9800+5+(32*8) dw $9800+4+(32*9) dw $9800+6+(32*9) dw $9800+12+(32*13) dw $9800+9+(32*13) dw $9800+14+(32*9) dw $9800+17+(32*8) MoveSprite: ld a,[Counter] inc a and $7 ld [Counter],a ret nz ld a,[SpriteTab+1] inc a and $7f ld [SpriteTab+1],a ret WaitForVBlank: ld a,[VBlankDone] or a jr z,WaitForVBlank xor a ld [VBlankDone],a ret Initialize: call ScreenOff ld hl,VBlankFirst ld de,SpriteDMA ld bc,VBlankLast-VBlankFirst call mem_Copy ld hl,SpriteTab ld bc,4*40 xor a call mem_Set ld hl,$fe00 ld bc,4*40 xor a call mem_Set ld a,16+4 ld [SpriteTab+0],a ld a,8 ld [SpriteTab+1],a ld a,1 ld [SpriteTab+2],a ld a,0 ld [SpriteTab+3],a ld a,IEF_SERIAL + IEF_VBLANK ldh [rIE],a xor a ldh [rSCX],a ldh [rSCY],a ld a,$e4 ldh [rBGP],a ldh [rOBP0],a ldh [rOBP1],a ld hl,CharSet ld de,_VRAM ld bc,256*8 call mem_CopyMono ld hl,_SCRN0 ld bc,32*32 ld a,32 call mem_Set ret ScreenOn: ld a,LCDCF_ON|LCDCF_BG8000|LCDCF_BG9800|LCDCF_BGON|LCDCF_OBJ8|LCDCF_OBJON ldh [rLCDC],a ret ScreenOff: ldh a,[rLCDC] bit 7,a ret z ldh a,[rIE] push af res 0,a ldh [rIE],a .wait: ldh a,[rLY] cp 145 jr nz,.wait ldh a,[rLCDC] res 7,a ldh [rLCDC],a pop af ldh [rIE],a ret DisplayPressStart: ld hl,PressStart ld de,_SCRN0+4+(32*3) ld bc,11 call mem_Copy call DrawOutlines ret DrawOutlines: ld hl,Outlines ld de,_SCRN0+(32*7) ld bc,8*32 call mem_CopyVRAM ret DisplayGameBegin: ld hl,GameBegin ld de,_SCRN0 + 4 + (32*5) ld bc,10 call mem_CopyVRAM ret GameBegin: DB "Game Begin" PressStart: DB "Press Start" Outlines: DB " ",$c9,$cd,$bb," ",$c9,$cd,$bb," xxxxxxxxxxxx" DB " ",$c9,$bc,32,$c8,$bb," ",$c9,$cd,$bb,$ba,32,$ba," xxxxxxxxxxxx" DB " ",$ba," ",$ba," ",$ba,32,$ba,$c8,$cd,$bc," xxxxxxxxxxxx" DB " ",$c8,$bb,32,$c9,$bc," ",$c8,$cd,$bc," xxxxxxxxxxxx" DB " ",$c8,$cd,$bc," xxxxxxxxxxxx" DB " ",$c9,$cd,$bb,$c9,$cd,$bb," xxx((|| (STRCMP("{__p2}","de")==0) || (STB=0) i push af ld a,\2 ld [\1],a pop af __d2,__ c0参( QbdGE h(d  IF \1 > 1.1 WARN "Version \1 or later of 'memory1.asm' is required." ENDC p2}","b `f2}","de" ldh a,[rSTAT] and STATF_BUSY jr nz,@-4 pMemory1 Code )_VRAM_INCB IF \1 > 1.8 WARN "Version \1 or later of 'hardware.inc' is required." ENDC )rev_Check_hardware_inctdb( ld bc,8*32 call mem_CopyVRAM ret ; *** Display 'Game Begin' message *** DisplayGameBegin: ld hl,GameBegin ld de,_SCRN0 + 4 + (32*5) ld bc,10 call mem_CopyVRAM ; Display 'Game Begin' msg ret GameBegin: DB "Game Begin" PressStart: DB "Press Start" ; *** Virtual buttons map *** Outlines: DB " ",$c9,$cd,$bb," ",$c9,$cd,$bb," xxxxxxxxxxxx" DB " ",$c9,$bc,32,$c8,$bb," ",$c9,$cd,$bb,$ba,32,$ba," xxxxxxxxxxxx" DB " ",$ba," ",$ba," ",$ba,32,$ba,$c8,$cd,$bc," xxxxxxxxxxxx" DB " ",$c8,$bb,32,$c9,$bc," ",$c8,$cd,$bc," xxxxxxxxxxxx" DB " ",$c8,$cd,$bc," xxxxxxxxxxxx" DB " ",$c9,$cd,$bb,$c9,$cd,$bb," xxxxxxxxxxxx" DB