.arm
.include "gba.inc"
.text
.global main
main:
@ Pour utiliser les interruptions, il faut faire quelques choses:
@ 1. Les activer (REG_IME bit 0)
@ 2. Choisir/activer un (ou plus) types d'interruptions dans REG_IE
@ 3. Charger l'adresse de notre interruption dans REG_INTADDR
@ 4. (Possiblement) dire au LCD que nous voulons qu'il provoque une interruption
@ 5. Armer le bit correspondant � notre interruption dans REG_IF pour dire que l'interruption est finie
@ (cette partie va dans le code de notre interruption)
ldr r1, =REG_IE @ Quel interruptions voulons nous g�rer ?
mov r2, #INT_VBLANK @ Les interruptions pendant VBLANK (apr�s finir afficher l'�cran)
str r2, [r1] @
adr r1, interrupt @ Charger une addresse +/-4k
ldr r2, =REG_INTADDR
str r1, [r2] @ Maintenant l'adresse de notre interruption est charg�e
ldr r1, =REG_DISPSTAT @ Display Status, il faut dire au LCD que nous voulons que VBlank
ldr r2, [r1] @ d�clenche une interruption
orr r2, r2, #STAT_VBLANK_IRQ
str r2, [r1]
ldr r1, =REG_IME @ Interrupt Master Enable
mov r2, #INT_ENABLE @ =1
str r2, [r1] @ Activer interruptions
@ Pr�parer le fond
mov r0, #REG_DISPCNT @ Display Control Register
mov r1, #BG2_ENABLE
orr r1, #MODE_1 @ Mode 1 avec BG2
str r1,[r0]
ldr r0, =REG_BG2CNT @ BG2 Control Register
ldr r1, =ROTBG_SIZE_512x512|BG_COLOR_256|(28<<SCREEN_SHIFT)|(0<<CHAR_SHIFT)
@ Screen Base Block Number :
@ O� commence le tilemap, ici 0x6000000 + 28*0x800
@ Char Base Block Number :
@ O� commence le tiledata, ici 0x6000000 + 0*0x4000
str r1, [r0] @ Charger l'information dans le registre de BG2
@ Charger les sprites dans le CHAR BLOCK
ldr r1, =sprites
ldr r0, =REG_DMA3SAD @ Adresse de source
str r1, [r0], #4 @ Charger l'addresse et avancer 4 octets
@ Maintenant r0 = REG_DMA3DAD
mov r1, #CHAR_BLOCK_0 @ = 0x6000000 (align�, donc on peut utiliser mov)
str r1, [r0], #4 @ Charger l'addresse de destination
@ Maintenant r0 = REG_DMA3CNT (counter)
mov r1, #DMA_ENABLE @ Faire le DMA, valeurs par d�faut : halfword et s'ex�cuter imm�diatement
orr r1, r1, #(32*32)*32/4 @ = un sprite 32x32, mais on l'affiche quatre octets � la fois
str r1, [r0] @ Faire le DMA
@ Peut-�tre l'on /\ peut y ajouter #-8 ?
@ Charger les tuiles dans le SCREEN BLOCK
ldr r1, =map
ldr r0, =REG_DMA3SAD @ Adresse de source
str r1, [r0], #4 @ Charger l'addresse et avancer 4 octets
@ Maintenant r0 = REG_DMA3DAD
ldr r1, =SCREEN_BLOCK_28
str r1, [r0], #4 @ Charger l'addresse de destination
@ Maintenant r0 = REG_DMA3CNT (counter)
mov r1, #DMA_32NOW @ Faire le DMA avec des words (32 bits)
orr r1, r1, #16*32*4 @ Combien d'octets � copier
str r1, [r0] @ Faire le DMA
@ Charger la palette dans VPAL
ldr r1, =palette
ldr r0, =REG_DMA3SAD @ Adresse de source
str r1, [r0], #4 @ Charger l'addresse et avancer 4 octets
@ Maintenant r0 = REG_DMA3DAD
mov r1, #VPAL @ = 0x05000000 (align�)
str r1, [r0], #4 @ Charger l'addresse de destination
@ Maintenant r0 = REG_DMA3CNT (counter)
mov r1, #DMA_32NOW @ Faire le DMA avec des words (32 bits)
orr r1, r1, #128 @ 256 couleurs, chaqu'un occupe 2 octets, transf�rer avec des words (4 octets)
str r1, [r0] @ Faire le DMA
dontQuit:
bl getKey
@ Quelle touche a-t-on pouss�e ?
ldr r0, =x
ldr r1, =y
tst r4, #KEY_UP
bleq keyUp
tst r4, #KEY_DOWN
bleq keyDown
tst r4, #KEY_RIGHT
bleq keyRight
tst r4, #KEY_LEFT
bleq keyLeft
mov r0,#0x200
delayLoop:
subs r0,r0,#1
bne delayLoop
b dontQuit
keyUp:
ldr r2, [r1] @ Charger octet (Y) � [r1] dans r2
subs r2, r2, #1 @ Y-1
bxcc lr @ Si Y-1 arme le drapeau C, quitter
str r2, [r1] @ Sauver nouvelle coordonn�e
bx lr @ Quitter la routine
keyDown:
ldr r2, [r1] @ Y
add r2, r2, #1 @ Y+1
cmp r2, #160
bxcs lr
str r2, [r1] @ Sauver nouvelle coordonn�e
bx lr @ Quitter la routine
keyRight:
ldrb r2, [r0] @ X
add r2, r2, #1 @ X+1
cmp r2, #240
bxcs lr
strb r2, [r0] @ Sauver nouvelle coordonn�e
bx lr @ Quitter la routine
keyLeft:
ldrb r2, [r0] @ X
subs r2, r2, #1 @ X-1
bxcc lr
strb r2, [r0] @ Sauver nouvelle coordonn�e
bx lr @ Quitter la routine
getKey:
mov r3, #KEYS_HIGH @ MSB
orr r3, r3, #KEYS_LOW @ Ajouter LSB de l'adresse
mov r2, #0x300
orr r2, #0xFF @ r2 = $3FF
getKeyLoop:
ldr r4, [r3] @ Lire les touches pouss�es
teq r4, r2 @ Si nous n'avons pas appuy� sur une touche
beq getKeyLoop @ ... r�p�ter
bx lr @ Quitter la routine
interrupt:
ldr r0, =REG_DISPSTAT
ldr r0, [r0] @ Valeur du Display Status Register (pour savoir si on a activer les interruptions HBLANK/VBLANK/VCOUNTER,
@ si un VBLANK/HBLANK est actif, etc.)
ands r0, r0, #STAT_VBLANK
beq quitInterrupt @ Si l'interruption n'est pas un VBLANK, quitter
ldr r0, =x
ldr r1, =y
ldr r0,[r0] @ Charger X
ldr r1,[r1] @ Charger Y
mov r0,r0,LSL #8 @ Premier 8 bits de REG_BG2X = fraction
mov r1,r1,LSL #8
ldr r3,=REG_BG2X
str r0,[r3], #4 @ X
str r1,[r3] @ Y REG_BG2Y
quitInterrupt:
ldr r1, =REG_IF @ Il faut dire que l'interruption est finie
mov r2, #INT_VBLANK @
str r2,[r1] @
bx lr
.ltorg
sprites:
.incbin "Chili.bin"
palette:
.incbin "Chili.pal"
map:
.byte 0x0,0x1,0x2,0x3, 0x0,0x1,0x2,0x3, 0x0,0x1,0x2,0x3, 0x0,0x1,0x2,0x3,0x0,0x1,0x2,0x3,0x0,0x1,0x2,0x3,0x0,0x1,0x2,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