gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/libc/targets/mos6502/mode.s
1 .include "global.s"
2
3 .title "screen modes"
4 .module Modes
5
6 .area GBDKOVR (PAG, OVR)
7 temp_word: .ds 2
8
9 ;; BANKED: checked
10 .area _HOME
11
12 _mode::
13 .set_mode::
14 sta .mode
15 ;; AND to get rid of the extra flags
16 and #0x03
17 asl ; Multiply mode by 4
18 asl
19 clc
20 adc #<.MODE_TABLE
21 sta temp_word
22 lda #0
23 adc #>.MODE_TABLE
24 sta temp_word+1
25 jmp [*temp_word] ; Jump to initialization routine
26
27 _get_mode::
28 lda .mode
29 rts
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.