-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add sd card sample (that doesn't work in emulator)
- Loading branch information
1 parent
0ca9b5f
commit be06068
Showing
4 changed files
with
100 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
include ../Makefile.vars | ||
|
||
NAME = sd_card | ||
RESOURCES = kq5.png | ||
|
||
project.av: $(RESOURCES) | ||
rm -rf project.av ./output/ | ||
$(ALOEVERA) create project project.av | ||
$(ALOEVERA) -p project.av palette import kq5_pal kq5.png | ||
$(ALOEVERA) -p project.av imageset import kq5_screen 320 200 kq5.png | ||
$(ALOEVERA) -p project.av imageset format kq5_screen kq5_pal 8 | ||
$(ALOEVERA) -p project.av bitmap init kq5_bmp kq5_screen | ||
$(ALOEVERA) create sd_image kq5.img | ||
$(ALOEVERA) -p project.av asm -s kq5.img -f bin . select -a 0x0000 kq5_bmp KQ5.BIN | ||
$(ALOEVERA) -p project.av asm -f bin . select -a 0x0000 kq5_bmp KQ5.BIN | ||
$(ALOEVERA) -p project.av asm -s kq5.img -f bin . select -a 0x0000 kq5_pal KQ5PAL.BIN | ||
|
||
generate_resources: project.av | ||
|
||
SD_CARD = -sdcard kq5.img | ||
|
||
include ../common/Makefile |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
.include "../common/header.inc" | ||
.include "../common/macros.inc" | ||
|
||
.code | ||
jmp start | ||
.proc set_mode ;target layer 1 | ||
;set layer 1 mode to tiled Bitmap Mode 8bpp | ||
v_address_set $F2000, 1 | ||
lda #$E1 ;8bpp bitmap, on | ||
;lda #$81 ;tiled, 8bpp, on | ||
sta VERA_DATA0 | ||
lda #$0 ;TileW is 320 | ||
sta VERA_DATA0 | ||
;map base not used | ||
lda #$00 | ||
sta VERA_DATA0 | ||
lda #$00 | ||
sta VERA_DATA0 | ||
;set tileset (bmp data) address to $00000 | ||
lda #$00 | ||
sta VERA_DATA0 | ||
lda #$00 | ||
sta VERA_DATA0 | ||
lda #$00 | ||
sta VERA_DATA0 | ||
lda #$00 | ||
sta VERA_DATA0 ; palette offset 0 | ||
;set hscale, vscale | ||
v_address_set $F0001, 1 | ||
lda #$40 | ||
sta VERA_DATA0 | ||
lda #$40 | ||
sta VERA_DATA0 | ||
rts | ||
.endproc | ||
|
||
;.proc load_palette | ||
; v_address_set $F1000, 1 | ||
; set_const_16 $00, palette | ||
|
||
; TARGET = 512;loop until size reached | ||
|
||
; loop: | ||
; lda ($00),y | ||
; sta VERA_DATA0 | ||
; add_constant_16 $00, 1 | ||
; loop_till_eq_16 $00, (palette + TARGET), loop | ||
; rts | ||
;.endproc | ||
|
||
;.code | ||
;jmp start | ||
;.proc load_bitmap | ||
; v_address_set $00000, 1 | ||
; set_const_16 $00, bitmap | ||
; TARGET = 32000;loop until size reached | ||
; | ||
; loop: | ||
; lda ($00),y | ||
; sta VERA_DATA0 | ||
; add_constant_16 $00, 1 | ||
; loop_till_eq_16 $00, (bitmap + TARGET), loop | ||
; rts | ||
;.endproc | ||
|
||
start: | ||
;jsr set_mode | ||
; jsr load_palette | ||
; jsr load_bitmap | ||
;jsr clear_map | ||
;jsr load_tilemap | ||
;turn off layer 2 to see our handiwork | ||
; v_address_set $F3000, 0 | ||
; lda #$0 ;default, off | ||
; sta VERA_DATA0 | ||
rts |