-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgs_warning.inc
More file actions
61 lines (61 loc) · 1.54 KB
/
gs_warning.inc
File metadata and controls
61 lines (61 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
; gs_warning.inc
; This file includes code to prepare and run a warning screen that displays
; if the user boots Astroswab on a 60 Hz system (NTSC). Astroswab can indeed
; run on a 60 Hz system, but the gameplay and music is coded/made with 50 Hz
; in mind.
; -----------------------------------------------------------------------------
prepare_warning:
; -----------------------------------------------------------------------------
di
call disable_display_and_sound
;
ld hl,warning_screen_arrange_vdp_parameters
call arrange_vdp
;
SELECT_BANK WARNING_BANK
ld a,(warning_batch_print_table_end-warning_batch_print_table)/SIZE_OF_BATCH_PRINT_ITEM
ld ix,warning_batch_print_table
call batch_print
;
; Turn on screen and frame interrupts.
ld a,DISPLAY_1_FRAME_1_SIZE_0
ld b,1
call set_register
ei
;
; When all is set, change the game state.
ld a,GS_RUN_WARNING
ld (game_state),a
jp main_loop
;
; -----------------------------------------------------------------------------
run_warning:
; -----------------------------------------------------------------------------
;
call await_frame_interrupt
;
call load_sat
;
; End of (unsafe) VDP-updating...
;
call get_input_ports
call begin_sprites
;
call get_random_number
;
; Press buttons 1 and 2 to proceed to title screen.
call is_button_1_pressed
jp nc,+
call is_button_2_pressed
jp nc,+
ld a,GS_PREPARE_TITLESCREEN
call transition_to_gamestate
+:
;
call PSGSFXFrame
call PSGFrame
;
ld hl,frame_counter
inc (hl)
;
jp main_loop