Some shit software I was messing with on gb
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

107 lines
1.8 KiB

if !def(_hardware_inc_)
_hardware_inc_ equ 0
include "defines.inc"
; Memory map
rsreset
mmap_rom0 rb $4000
mmap_rom0_end rb 0
mmap_romx rb $4000
mmap_romx_end rb 0
mmap_vram rb $2000
mmap_vram_end rb 0
mmap_sram rb $2000
mmap_sram_end rb 0
mmap_wram0 rb $1000
mmap_wram0_end rb 0
mmap_wramx rb $1000
mmap_wramx_end rb 0
mmap_echo rb $1e00
mmap_echo_end rb 0
mmap_oam rb $a0
mmap_oam_end rb 0
mmap_nu rb $60
mmap_nu_end rb 0
mmap_io rb $80
mmap_io_end rb 0
mmap_hram rb $7f
mmap_hram_end rb 0
rsreset
r_joyp equ $ff00
bits r_joyp_data, 4
bits r_joyp_select, 2
r_joyp_select_dpad equ %10 << r_joyp_select_f
r_joyp_select_buttons equ %01 << r_joyp_select_f
r_sb equ $ff01
rsreset
r_sc equ $ff02
bits r_sc_clk_internal
bits r_sc_clk_fast
rsset _RS + 5
bits r_sc_start
rsreset
r_if equ $ff0f
r_ie equ $ffff
bits r_int_vblank
bits r_int_stat
bits r_int_timer
bits r_int_serial
bits r_int_joypad
rsreset
r_nr52 equ $ff26
bits r_nr52_ch1
bits r_nr52_ch2
bits r_nr52_ch3
bits r_nr52_ch4
rsset _RS + 3
bits r_nr52_on
rsreset
r_lcdc equ $ff40
bits r_lcdc_bg_on
bits r_lcdc_obj_on
bits r_lcdc_obj_big
bits r_lcdc_bg_map_high
bits r_lcdc_tiles_low
bits r_lcdc_window_on
bits r_lcdc_window_map_high
bits r_lcdc_on
rsreset
r_stat equ $ff41
bits r_stat_mode, 2
bits r_stat_lyc_match
bits r_stat_int_hblank
bits r_stat_int_vblank
bits r_stat_int_oam
bits r_stat_int_lyc
r_stat_mode_hblank equ 0 << r_stat_mode_f
r_stat_mode_vblank equ 1 << r_stat_mode_f
r_stat_mode_oam equ 2 << r_stat_mode_f
r_stat_mode_vram equ 3 << r_stat_mode_f
r_ly equ $ff44
r_ly_vblank equ 144
r_bgp equ $ff47
r_obp0 equ $ff48
r_obp1 equ $ff49
rsreset
r_bcps equ $ff68
bits r_bcps_offs, 3
bits r_bcps_pal, 3
rsset _RS + 1
bits r_bcps_inc
r_bcpd equ $ff69
r_svbk equ $ff70
endc