; ***************************************************************************
; * ZX Spectrum Next hardware defines                                       *
; ***************************************************************************

; Sinclair hardware
ula_port                                equ     $fe

; DivMMC hardware
div_memctl                              equ     $e3

; Multiface 3 hardware
mf3_inport                              equ     $3f
mf3_outport                             equ     $bf
mf3_last7ffd                            equ     $7f3f
mf3_last1ffd                            equ     $1f3f
mf3_hideport                            equ     mf3_inport

; Timex modes
timex_port                              equ     $ff
timex_mode_hires                        equ     %110
timex_mode_hicolour                     equ     %010

; Config registers
next_reg_select                         equ     $243b
next_reg_access                         equ     $253b

next_reg_PERIPHERAL2                    equ     $06
next_reg_PERIPHERAL2_DIVMMC_MASK        equ     %11101111

next_reg_SPRITES                        equ     21
next_reg_SPRITES_ON                     equ     %00000001
next_reg_SPRITES_BORDER                 equ     %00000010
next_reg_SPRITES_SLU                    equ     %00011100
next_reg_SPRITES_LORES                  equ     %10000000

; Max 28MHz.
turbo_mask                              equ     3
turbo_max                               equ     3

nxr_corever                             equ     $01
nxr_reset                               equ     $02
nxr_timings                             equ     $03
nxr_peripheral1                         equ     $05
nxr_peripheral2                         equ     $06
nxr_turbo                               equ     $07
nxr_peripheral3                         equ     $08
nxr_peripheral4                         equ     $09
nxr_coresubminor                        equ     $0e
nxr_l2page                              equ     $12
nxr_l2shadow                            equ     $13
nxr_transparency                        equ     $14
nxr_sprites                             equ     $15
nxr_layer2x                             equ     $16
nxr_layer2y                             equ     $17
nxr_clip_l2                             equ     $18
nxr_clip_sprite                         equ     $19
nxr_clip_ula                            equ     $1a
nxr_clip_tilemap                        equ     $1b
nxr_clip_index                          equ     $1c
nxr_lineint_control                     equ     $22
nxr_tilemapx_msb                        equ     $2f
nxr_tilemapx_lsb                        equ     $30
nxr_tilemapy                            equ     $31
nxr_ulax                                equ     $32
nxr_ulay                                equ     $33
nxr_sprite_num                          equ     $34
nxr_palette_index                       equ     $40
nxr_palette_value8                      equ     $41
nxr_palette_format                      equ     $42
nxr_palette_control                     equ     $43
nxr_palette_value9                      equ     $44
nxr_transp_fallback                     equ     $4a
nxr_transp_sprites                      equ     $4b
nxr_transp_tilemap                      equ     $4c
nxr_mmu0                                equ     $50
nxr_mmu1                                equ     $51
nxr_mmu2                                equ     $52
nxr_mmu3                                equ     $53
nxr_mmu4                                equ     $54
nxr_mmu5                                equ     $55
nxr_mmu6                                equ     $56
nxr_mmu7                                equ     $57
nxr_cudata                              equ     $60
nxr_cuctrl_lo                           equ     $61
nxr_cuctrl_hi                           equ     $62
nxr_ula_ctrl                            equ     $68
nxr_tilemap_ctrl                        equ     $6b
nxr_tilemap_attr                        equ     $6c
nxr_tilemap_base                        equ     $6e
nxr_tiledefs_base                       equ     $6f

transparency_default                    equ     $e3

; Sprite ports
nxp_sprite      equ     $303b
nxp_spr_pal     equ     $53
nxp_spr_attr    equ     $57
nxp_spr_data    equ     $5b

; Layer2 ports
nxp_layer2      equ     $123b
nxv_l2_write    equ     $01
nxv_l2_visible  equ     $02
nxv_l2_back     equ     $08
nxv_l2_vram0    equ     $00
nxv_l2_vram1    equ     $40
nxv_l2_vram2    equ     $80
nxv_l2_vrammask equ     $c0

NUM_SPRITES     equ     64
