From 053e95cd78bfbbadc75385ccf1175d9abb54af1d Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 7 Mar 2022 08:53:14 -0500 Subject: [PATCH] lemm: work on intro --- games/lemm/Makefile | 17 +- games/lemm/graphics/Makefile | 8 +- games/lemm/graphics/level1_preview.png | Bin 0 -> 1051 bytes games/lemm/graphics/level5_preview.png | Bin 0 -> 1827 bytes games/lemm/graphics/sprites.png | Bin 0 -> 6997 bytes games/lemm/hello.bas | 2 +- games/lemm/intro_level1.s | 38 +++ games/lemm/lemm.s | 340 +++++++++++++++++++++++++ 8 files changed, 401 insertions(+), 4 deletions(-) create mode 100644 games/lemm/graphics/level1_preview.png create mode 100644 games/lemm/graphics/level5_preview.png create mode 100644 games/lemm/graphics/sprites.png create mode 100644 games/lemm/intro_level1.s create mode 100644 games/lemm/lemm.s diff --git a/games/lemm/Makefile b/games/lemm/Makefile index bb07b723..ef9e3d46 100644 --- a/games/lemm/Makefile +++ b/games/lemm/Makefile @@ -10,9 +10,10 @@ EMPTY_DISK = ../../empty_disk/empty.dsk all: lemm.dsk -lemm.dsk: HELLO LEMM_TEST +lemm.dsk: HELLO LEMM LEMM_TEST cp $(EMPTY_DISK) lemm.dsk $(DOS33) -y lemm.dsk SAVE A HELLO + $(DOS33) -y lemm.dsk BSAVE -a 0x6000 LEMM $(DOS33) -y lemm.dsk BSAVE -a 0x4000 LEMM_TEST @@ -33,11 +34,23 @@ lemm_test.o: lemm_test.s zp.inc hardware.inc \ #### +LEMM: lemm.o + ld65 -o LEMM lemm.o -C ../../linker_scripts/apple2_6000.inc + +lemm.o: lemm.s zp.inc hardware.inc \ + graphics/graphics_test.inc \ + intro_level1.s \ + interrupt_handler.s + ca65 -o lemm.o lemm.s -l lemm.lst + + +#### + graphics/graphics_test.inc: cd graphics && make #### clean: - rm -f *~ *.o *.lst HELLO LEMM + rm -f *~ *.o *.lst HELLO LEMM LEMM_TEST diff --git a/games/lemm/graphics/Makefile b/games/lemm/graphics/Makefile index 16d27ece..47bb40a3 100644 --- a/games/lemm/graphics/Makefile +++ b/games/lemm/graphics/Makefile @@ -4,7 +4,7 @@ PNG2HGR = ../../../utils/hgr-utils/png2hgr LZSA = ~/research/lzsa/lzsa/lzsa B2D = ../../../utils/bmp2dhr/b2d -all: graphics_test.inc +all: graphics_test.inc graphics_level1.inc ### @@ -16,6 +16,12 @@ graphics_test.inc: \ echo "level2_lzsa: .incbin \"level2.lzsa\"" >> graphics_test.inc echo "level2_actual_lzsa: .incbin \"level2_actual.lzsa\"" >> graphics_test.inc + +graphics_level1.inc: \ + level1.lzsa + echo "level1_lzsa: .incbin \"level1.lzsa\"" > graphics_level1.inc + + ### level1.lzsa: level1.hgr diff --git a/games/lemm/graphics/level1_preview.png b/games/lemm/graphics/level1_preview.png new file mode 100644 index 0000000000000000000000000000000000000000..d55cbf20bc74870027fb69bfc35192cc19e4ceff GIT binary patch literal 1051 zcmeAS@N?(olHy`uVBq!ia0y~yV3Yu|53n!;N!?wEoX2Z*%#2fJ#Dvajy2NLk@0=He=|mCJR7Kvrv*tWVr8c3-JUBI51`w?24q zKI!Vgqmkk4;f?}-7z;~^f=VU|z4zwQP1^IJLjL*P;)?fn4lAb5Oe^hSo|QLyrAy42 zl<=eL!dVO&>RJRQ%uGGw86>ptYpMU;kaEL$Pw#(E|GL7mn~`y1#WcxfzIz;P_GU`Y z`QE9#Mq~An=SPy&Vki8V_`2(O{v2*SZX4sIWx=112qta3aLh}3^P-i4{(|nIzRPPA zA8$NW*}XYz-KJ-@Ke-QE)~3#Uy`^p90i|gQjx9}EUK)qpddlXCaBEui|NhY)v)@Ip zHAdB-NM`{P@21!6|C{e`-uh{>a9ofDU&%g;bH_O@Y~?n|>ib;##-dkP;RjF5OWpdV zd}nGV#bsw+R9;Xny<J|*(>rWQ$tKax`EdnFX2@BW|Cr+)ln zW!C*jx8F}K?!2qJGezy_e=qUsrX#_5>x{+bSRTnS&wjKbB>h-(w(X&qHBVPdUfw$A zMBT*o%lt2Ho8dV%W2SnRV0g0W($$?CZ;SuFIz##7lI+gUSFYY+4_O(QKD91%dFrec zOG~AgFK^xBv3}O!m4{}|%MCl`QF`u$E8ohpW5Tz;9rjuqnqu1@Z_RTf%~h&gYYyk` zg!5aTHJM58E}du`eDu<0zs(s_V$;0z)+OEI7M+{9Zq=!S;^S=$_x%1m+ELXNSas%v)B3fs#j`$#l)pMv=C<(6?h`v| zQhwfD%bM;NxtsgO^6yMLBj0ZlznN>^arW7r*wmGr`(o0vN>a+Zw Sm)-L~>OEckT-G@yGywn;U(r(l literal 0 HcmV?d00001 diff --git a/games/lemm/graphics/level5_preview.png b/games/lemm/graphics/level5_preview.png new file mode 100644 index 0000000000000000000000000000000000000000..2f479c5eca6150de830d6dd5bbf3b4134c2b3204 GIT binary patch literal 1827 zcmbW1`8OMg9>tT!JVk=2Qi5~^q|RZASk zP?RW232F?jWnL|LjG(B{hm2jHzu}#8@AuyG`Sp9w&2)COhKRyM0RR95V`Jq4006I? z_g*2;`PJzpV$K1bVrl7&v9weQj|}st1d{;(O-2&K%%y#6ZuJ#C?-Z72Vdmy5ADwa0jD=;FsVF~h*z-K0(9 z$Cs22z=U<3^a~owq-8< z79SN<#@hqhOg1oY_4X<2-LKe;E{~0EALlQWt)9>T2mHtwP~d>t`Cp`*?Xjryg#Q6t zHaz?O{rjIDKzPX+quf&NoQj0o;G+P5EB5E60?SzzO6O3Rig7>*uY&$1dsRaR0&hM? za#WN%)iNw3gd9o*SVoeGR5D2^mO_1?WQ}of#-)hM0sul=7%L<;ZkCVt$eq&zt2Jp1 zU;al37{@ppJ^g*ceaY^1FnbN8sn(-n55Dda~Xi?v|3JP|jM~oj*J7+K=Bo7;QXG9b^otdTpdc zE<#@N?1sJfs1*ttA>Wg{6azwj_t{2nUgviz-aX}_E0SBxZpH9x?|6#1-kF?CiIIBC z<^c?C!~OZWbNZg}Xa!BD)33-i+hUrQG{S&SGd~a`5lQU^cK397S*@X z?ZX|oMa=bH8k-7}qRl}SLQIsS5v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B{{i&SNJRhu literal 0 HcmV?d00001 diff --git a/games/lemm/graphics/sprites.png b/games/lemm/graphics/sprites.png new file mode 100644 index 0000000000000000000000000000000000000000..5f4e13d549dca8e81ffe20b019de668b634b1899 GIT binary patch literal 6997 zcmeHMdo+~m_a92i#Gyo}j8TycgTc(WRc4a=H4&=0yfY>lV`i8k)Cnb`6e{;3x#xb# zr6dW-r6g2T%KdWOPsr~bbx+wXRY7&zuvXxo%enA-k-hq=h@G*p1t0SRu)FW zLefGI2t?TU5Y7ey;oAy6KU}*8yd&-tj3E%A%f5CFY#Rax#$b9-Xr}-e+lK+b04|LJ zfpELWZa6Ww>4@M~%0nIb`SkaxTxbcY2z30q&8`#`lWQ<~Gh`7c?r?F*B>w&s2Y=7_ zy4)$e@52ntb^ZSSh*no_k$)+;Um4 z&#|OMlET=m%o3ujaBcwJ`+zEcx`Lsek+^fuRARf%+5QL8?R_x4iD>9@s;taJtbU2f zfqM^Gk#a5SayjoS0?+HYGjvv ztJBcO#r&J9SKd|h_|H94IhdPzzgl}XziuF8#9`-RiW96zI=uJMrnyS&y>(fV>0@Qw z5B+6f{GHLtPUoF5Edy8aA&!<-ANP6Dd@V}I-Cn=PrH-nWpUk+MAg!1yI2S*oA>p&5 z=c7=|3u()DkM1Zb?|vTE>mS@(_5PTufLP0})+Xrj!_+`&BpMPd$)?;dSqeUfL-N(KNp3M~q@6h3gY~&R-aY=8cp*jBG^EMc^BKg3+ZxI(&UhE@s?)lj znv#*D5qflBE@~uPV?v~)y!B7}r|+gdjj}ii*ym3#MD>$xyR94i*Wj{B(-6f)Iss!5A^P8gut$gENT<6k0l&aO_xf%J&ajquh(}q@%NKI7WA3-ZCo`Y7Z}A8AU%Z<%Xs3^iG{4u#BH}Owj;a4-m zm7cF-KkDCmF)WuEIbCv2v)i$0RNF?{4|7L#XWE=~?O1{xKy{QVPxY7i;Mr7Q2;bM; zevbLa6@>`Po%4to{i(y9uV1TF-qXCo4oXL7J%86$BJ$yaFQc`~-h3n*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?<|C6K;3VG+Cm@~R`y?wg3@N}y8#aD9I-sK3T(|6#Hy8W@Z^ z5u=SjYNON>la=Bih+Nn{HwZt(ef;eD1)1Miz2)06-tjz52;J-{0Uq9;W%F0T!6Q4}%*T^J8DR6WH zjVX*yXYcNu=x!##_hKQKfrVl=(Vto=LzyE zC&I$cmaV*{=oFb2(_f^9+Pzq`OE8)aRNcBMl4EBVdeK3Ac6e7c@fh8Ju5qDAZdc=s zRkP_*7At}%Z?q`!ByAzSF81h43DbgucW^YFS`;E+`Yy8V{#C-`Gf@eIqLa@irZYFT zu!9=*UJt(5;Yct$IoiFR)EV@LgillGlXb7!Z+l7)G%~xiF3_ZV*MFocYT4|r+->IF zaAdbEqFLvqhS>{(WKe@qPr5|Ku3B-Yf#q1_?srMA3nYwm9vzxClhI}r`xG@)%1b?w zvGpKSIsqRW`_)1tp7{+LS4Z7;lG@$)nR6|^f>||;sTCW^!== literal 0 HcmV?d00001 diff --git a/games/lemm/hello.bas b/games/lemm/hello.bas index a8cf5748..208c6fa6 100644 --- a/games/lemm/hello.bas +++ b/games/lemm/hello.bas @@ -12,4 +12,4 @@ 110 PRINT " A \/\/\/ SOFTWARE PRODUCTION" 115 PRINT 120 PRINT " HTTP://WWW.DEATER.NET/WEAVE/VMWPROD" -130 PRINT CHR$(4)"BRUN LEMM_TEST" +130 PRINT CHR$(4)"BRUN LEMM" diff --git a/games/lemm/intro_level1.s b/games/lemm/intro_level1.s new file mode 100644 index 00000000..d87f5eea --- /dev/null +++ b/games/lemm/intro_level1.s @@ -0,0 +1,38 @@ + +intro_level1: + + lda #level1_intro_text + sta OUTH + + ldx #8 +text_loop: + + jsr move_and_print + + dex + bne text_loop + + jsr wait_until_keypress + + rts + +level1_intro_text: +.byte 0, 8,"LEVEL 1",0 +.byte 15, 8,"JUST DIG!",0 +.byte 9,13,"NUMBER OF LEMMINGS 10",0 +.byte 12,15,"10% TO BE SAVED",0 +.byte 12,17,"RELEASE RATE 50",0 +.byte 13,19,"TIME 5 MINUTES",0 +.byte 15,21,"RATING FUN",0 +.byte 8,23,"PRESS RETURN TO CONINUE",0 + +.byte 0, 8,"LEVEL 5",0 +.byte 15, 8,"YOU NEED BASHERS THIS TIME",0 +.byte 9,13,"NUMBER OF LEMMINGS 50",0 +.byte 12,15,"10% TO BE SAVED",0 +.byte 12,17,"RELEASE RATE 50",0 +.byte 13,19,"TIME 5 MINUTES",0 +.byte 15,21,"RATING FUN",0 +.byte 8,23,"PRESS RETURN TO CONINUE",0 diff --git a/games/lemm/lemm.s b/games/lemm/lemm.s new file mode 100644 index 00000000..8163512f --- /dev/null +++ b/games/lemm/lemm.s @@ -0,0 +1,340 @@ +; Lemm Proof of Concept + +; by deater (Vince Weaver) + +; Zero Page + .include "zp.inc" + .include "hardware.inc" + +lemm_test_start: + + lda #0 + sta DRAW_PAGE + + ;==================== + ; detect model + ;==================== + + jsr detect_appleii_model + + ;=================== + ; machine workarounds + ;=================== + ; mostly IIgs + ;=================== + ; thanks to 4am who provided this code from Total Replay + + lda ROM_MACHINEID + cmp #$06 + bne not_a_iigs + sec + jsr $FE1F ; check for IIgs + bcs not_a_iigs + + ; gr/text page2 handling broken on early IIgs models + ; this enables the workaround + + jsr ROM_TEXT2COPY ; set alternate display mode on IIgs + cli ; enable VBL interrupts + + ; also set background color to black instead of blue + lda NEWVIDEO + and #%00011111 ; bit 7 = 0 -> IIgs Apple II-compat video modes + ; bit 6 = 0 -> IIgs 128K memory map same as IIe + ; bit 5 = 0 -> IIgs DHGR is color, not mono + ; bits 0-4 unchanged + sta NEWVIDEO + lda #$F0 + sta TBCOLOR ; white text on black background + lda #$00 + sta CLOCKCTL ; black border + sta CLOCKCTL ; set twice for VidHD + +not_a_iigs: + + ;=================== + ; print config + ;=================== + + lda #config_string + sta OUTH + + jsr move_and_print + + ; print detected model + + lda APPLEII_MODEL + ora #$80 + sta $7d0+8 ; 23,8 + + ; if GS print the extra S + cmp #'G'|$80 + bne not_gs + lda #'S'|$80 + sta $7d0+9 + +not_gs: + + ;========================================= + ; detect if we have a language card (64k) + ; and load sound into it if possible + ;=================================== + + lda #0 + sta SOUND_STATUS ; clear out, sound enabled + + ;=========================================== + ; skip checks if open-apple being held down + + lda $C061 + and #$80 ; only bit 7 is affected + bne skip_all_checks ; rest is floating bus + + + jsr detect_language_card + bcs no_language_card + +yes_language_card: + ; update status + lda #'6'|$80 + sta $7d0+11 ; 23,11 + lda #'4'|$80 + sta $7d0+12 ; 23,12 + + ; update sound status + lda SOUND_STATUS + ora #SOUND_IN_LC + sta SOUND_STATUS + + jmp done_language_card + +no_language_card: + +done_language_card: + + ;=================================== + ; Detect Mockingboard + ;=================================== + +PT3_ENABLE_APPLE_IIC = 1 + + ; detect mockingboard + jsr mockingboard_detect + + bcc mockingboard_notfound + +mockingboard_found: + ; print detected location + + lda #'S'+$80 ; change NO to slot + sta $7d0+30 + + lda MB_ADDR_H ; $C4 = 4, want $B4 1100 -> 1011 + and #$87 + ora #$30 + + sta $7d0+31 ; 23,31 + + ; NOTE: in this game we need both language card && mockingboard + ; to enable mockingboard music + + lda SOUND_STATUS + and #SOUND_IN_LC + beq dont_enable_mc + + lda SOUND_STATUS + ora #SOUND_MOCKINGBOARD + sta SOUND_STATUS + +dont_enable_mc: + +mockingboard_notfound: + +skip_all_checks: + + + ;================================== + ; load music into the language card + ; into $D000 set 2 + ;================================== + + ; switch in language card + ; read/write RAM, $d000 bank 2 + + lda $C083 + lda $C083 + + ; actually load it + + lda #0 + sta CURRENT_CHUNK + sta DONE_PLAYING + + jsr load_song_chunk + + lda #1 + sta LOOP + + jsr mockingboard_patch ; patch to work in slots other than 4? + + ;======================= + ; Set up 50Hz interrupt + ;======================== + + jsr mockingboard_init + jsr mockingboard_setup_interrupt + + +zurg: + ;============================ + ; Init the Mockingboard + ;============================ + + jsr reset_ay_both + jsr clear_ay_both + + ;======================= + ; wait for keypress + ;======================= + + jsr wait_until_keypress + + ;======================= + ; show title screen + ;======================= + + jsr intro_level1 + + ;======================= + ; Load Graphics + ;======================= + + bit SET_GR + bit PAGE0 + bit HIRES + bit FULLGR + + lda #level1_lzsa + sta getsrc_smc+2 ; LZSA_SRC_HI + + lda #$20 + + jsr decompress_lzsa2_fast + + lda #level1_lzsa + sta getsrc_smc+2 ; LZSA_SRC_HI + + lda #$40 + + jsr decompress_lzsa2_fast + + + + ;======================= + ; Play "Let's Go" + ;======================= + + + ;======================= + ; start music + ;======================= + + cli + + + ;=================== + ; Main Loop + ;=================== +main_loop: + + + jmp main_loop + + + + + ;======================== + ; load song chunk + ; CURRENT_CHUNK is which one + +load_song_chunk: + ldx CURRENT_CHUNK + lda music_parts_l,X + sta getsrc_smc+1 ; LZSA_SRC_LO + lda music_parts_h,X + sta getsrc_smc+2 ; LZSA_SRC_HI + bne load_song_chunk_good + + ; wrapped + lda #$00 + sta CURRENT_CHUNK + beq load_song_chunk ; try again + +load_song_chunk_good: + lda #$d0 + sta BASE_FRAME_H + + jsr decompress_lzsa2_fast + + lda #0 + sta BASE_FRAME_L + + rts + + ;========================== + ; includes + ;========================== + +; .include "gr_pageflip.s" +; .include "gr_copy.s" +; .include "wait_a_bit.s" + .include "gr_offsets.s" + .include "decompress_fast_v2.s" + + .include "wait_keypress.s" + +; .include "print_help.s" +; .include "gr_fast_clear.s" + .include "text_print.s" + +; .include "init_vars.s" +; .include "graphics_title/title_graphics.inc" + .include "lc_detect.s" + + .include "intro_level1.s" + + ; pt3 player + +;.include "pt3_lib_mockingboard.inc" +.include "pt3_lib_detect_model.s" +.include "pt3_lib_mockingboard_detect.s" +.include "pt3_lib_mockingboard_setup.s" +.include "interrupt_handler.s" +.include "pt3_lib_mockingboard_patch.s" + + +config_string: +; 0123456789012345678901234567890123456789 +.byte 0,23,"APPLE II?, 48K, MOCKINGBOARD: NO, SSI: N",0 +; MOCKINGBOARD: NONE + +new_title: +.include "graphics/graphics_level1.inc" + +music_parts_h: + .byte >lemm5_part1_lzsa,>lemm5_part2_lzsa,>lemm5_part3_lzsa,$00 +music_parts_l: + .byte