Mercurial > repos > blastem
diff menu.s68 @ 961:750995b587a0
Save State menu option is now fully functional. Load state sort of works, but is mostly broken.
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 17 Apr 2016 23:50:41 -0700 |
parents | 0abfecaaf5c8 |
children | e2d7067ea2d8 |
line wrap: on
line diff
--- a/menu.s68 Sun Apr 17 20:31:22 2016 -0700 +++ b/menu.s68 Sun Apr 17 23:50:41 2016 -0700 @@ -192,6 +192,7 @@ last_mbuttons rs.b 1 num_menu rs.b 1 num_slots rs.b 1 +port_off rs.b 1 int_6: @@ -353,6 +354,8 @@ add.w d0, d0 tst.b num_menu.w bne .select_menu_button + tst.b num_slots.w + bne .select_save_slot lea page_index.w, a2 move.l (0, a2, d0.w), a2 tst.b (-1, a2) @@ -368,6 +371,16 @@ move.l (0, a2, d0.w), a2 addq #6, a7 jmp (a2) +.select_save_slot: + lea menu_port, a3 + moveq #0, d0 + move.b port_off.w, d0 + add.w d0, a3 + move.b selected.w, d0 + move.l d0, (a3) + addq #6, a7 + jmp show_pause_menu + enter_dir: lea menu_port+4, a3 move.l a2, (a3) @@ -977,12 +990,14 @@ rts save_state: + move.b #(5*4), port_off.w bsr show_save_slots .wait stop #$2500 bra .wait load_state: + move.b #(6*4), port_off.w bsr show_save_slots .wait stop #$2500