Mercurial > repos > blastem
view menu.s68 @ 789:41e83b38bdc8
Initial work on silly Genesis based menu
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 25 Jul 2015 02:25:44 -0700 |
parents | |
children | e8b14d5a5b5a |
line wrap: on
line source
dc.l $0, start dc.l empty_handler dc.l empty_handler ;$10 dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.l empty_handler ;$20 dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.l empty_handler ;$30 dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.l empty_handler ;$40 dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.l empty_handler ;$50 dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.l empty_handler ;$60 dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.l empty_handler ;$70 dc.l int_4 dc.l empty_handler dc.l int_6 dc.l empty_handler ;$80 dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.l empty_handler ;$90 dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.l empty_handler ;$A0 dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.l empty_handler ;$B0 dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.l empty_handler ;$C0 dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.l empty_handler ;$D0 dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.l empty_handler ;$E0 dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.l empty_handler ;$F0 dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.l empty_handler dc.b "SEGA" empty_handler: int_6: rte int_4: rte rsset $FFFF8000 x_pos rs.w 1 base_cmd rs.l 1 start: lea $C00000, a0 lea $C00004, a1 move.w #$8104, (a1) ;Mode 5, everything turned off move.w #$8004, (a1) move.w #$8220, (a1) ;Scroll a table $8000 move.w #$8405, (a1) ;Scroll b table $A000 move.w #$8560, (a1) ;SAT table $C000 move.w #$8700, (a1) ;backdrop color 0 move.w #$8B00, (a1) ;full screen scroll move.w #$8C87, (a1) ;40 cell mode, double-res interlace move.w #$8D00, (a1) ;hscroll table at 0 move.w #$8F02, (a1) ;autoinc 2 move.w #$9001, (a1) ;64x32 scroll size move.l #$C0000000, (a1) move.w #$000, (a0) move.w #$EEE, (a0) ;init scroll table move.l #$40000000, (a1) move.w #0, (a0) move.w #4, (a0) ;load tiles move.l #$48000000, (a1) lea font(pc), a2 move.w #((fontend-font)/4 - 1), d0 tloop: move.l (a2)+, (a0) dbra d0, tloop ;clear name table move.l #$40000002, (a1) moveq #32, d0 move.w #(64*64-1), d1 ploop: move.w d0, (a0) dbra d1, ploop move.l #$40000002, d3, move.l d3, (a1) move.l d3, base_cmd.w lea Message(pc), a6 moveq #0, d0 bsr print_string move.w #$8144, (a1) ;enable display move #$2300, sr wait_forever bra wait_forever Message: dc.b "Journey From Darkness - Strider Returns (U) [c][!].bin", $A dc.b "Toejam & Earl in Panic on Funkotron (U) [!].bin", $A dc.b "Fire Shark (U) [c][!].bin", $A dc.b "Sonic and Knuckles (W) [!].bin", 0 align 1 ;Prints a null terminated string ;a6 - pointer to string ;a0 - VDP data port ;d0 - base tile attribute ; ;Clobbers: d1.w, d2.w, d3.l print_string: lea widths(pc), a5 move.w x_pos.w, d2 move.l base_cmd.w, d3 .loop moveq #0, d1 move.b (a6)+, d1 beq .end cmp.b #$A, d1 beq .newline tst.b (-32, a5, d1.w) beq .narrow add.w d0, d1 move.w d1, (a0) addq #2, d2 bra .loop .narrow add.w d0, d1 move.w d1, (a0) addq #1, d2 move.l d2, d1 ;add.w d1, d1 and.w #$FFFE, d1 swap d1 eor.l #$20000000, d3 or.l d3, d1 move.l d1, (a1) bra .loop .newline moveq #0, d2 and.l #$DFFFFFFF, d3 add.l #$00800000, d3 move.l d3, (a1) bra .loop .end move.w d2, x_pos.w move.l d3, base_cmd.w rts align 1 font: incbin font_interlace_variable.tiles fontend widths: dc.b 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1 dc.b 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0 dc.b 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1 dc.b 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 dc.b 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1