diff options
| author | Ian C <ianc@noddybox.co.uk> | 2016-05-06 16:00:24 +0000 |
|---|---|---|
| committer | Ian C <ianc@noddybox.co.uk> | 2016-05-06 16:00:24 +0000 |
| commit | 3b5ebdfe6a006f51682292c44415525e178f8a4c (patch) | |
| tree | 0325fe4e517a91dda7c69167ca3ad5a42e23a1b1 /main.asm | |
| parent | ce29c39910f16abcf0ba818fa708011eae4f6858 (diff) | |
Added barebones to build cartridge ROM
Diffstat (limited to 'main.asm')
| -rw-r--r-- | main.asm | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/main.asm b/main.asm new file mode 100644 index 0000000..6863d3d --- /dev/null +++ b/main.asm @@ -0,0 +1,39 @@ + processor 65c816 + + option output-file,"main.lib" + option output-format,lib + + option snes-irq,vbl,vbl_handler + option snes-irq,irq,irq_handler + + ; Initialise SNES + ; + org $8000 + bank 0 + + include init.asm + + ; Set the background color to green. + sep #$20 ; Set the A register to 8-bit. + lda #%10000000 ; Force VBlank by turning off the screen. + sta $2100 + lda #%11100000 ; Load the low byte of the green color. + sta $2122 + lda #%00000000 ; Load the high byte of the green color. + sta $2122 + lda #%00001111 ; End VBlank, setting brightness to 15 (100%). + sta $2100 + + ; Loop forever. +Forever: + jmp Forever + + +; IRQ vectors +; + +vbl_handler: + rti + +irq_handler: + rti |
