separated background and sprite tiles, check only lines left in wait for render routine, added build files, rom, git ignore
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
Build
|
||||||
|
rom.sym
|
||||||
@@ -43,8 +43,14 @@ DefaultMap:
|
|||||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
|
||||||
EXPORT Tiles, TilesEnd
|
EXPORT BackgroundTiles, BackgroundTilesEnd
|
||||||
SECTION "Graphics", ROM0
|
SECTION "Graphics", ROM0
|
||||||
Tiles:
|
BackgroundTiles:
|
||||||
INCBIN "Tiles.bin"
|
INCBIN "BackgroundTiles.bin"
|
||||||
TilesEnd: ds 0
|
BackgroundTilesEnd: ds 0
|
||||||
|
|
||||||
|
EXPORT SpriteTiles, SpriteTilesEnd
|
||||||
|
SECTION "Graphics", ROM0
|
||||||
|
SpriteTiles:
|
||||||
|
INCBIN "SpriteTiles.bin"
|
||||||
|
SpriteTilesEnd: ds 0
|
||||||
@@ -40,10 +40,15 @@ Start:
|
|||||||
; 16: sprite selection tile
|
; 16: sprite selection tile
|
||||||
; 17: empty tile
|
; 17: empty tile
|
||||||
ld hl, _VRAM_BG_TILES
|
ld hl, _VRAM_BG_TILES
|
||||||
ld de, Tiles
|
ld de, BackgroundTiles
|
||||||
ld bc, TilesEnd - Tiles
|
ld bc, BackgroundTilesEnd - BackgroundTiles
|
||||||
call MemoryCopy
|
call MemoryCopy
|
||||||
|
|
||||||
|
ld hl, _VRAM
|
||||||
|
ld de, SpriteTiles
|
||||||
|
ld bc, SpriteTilesEnd - SpriteTiles
|
||||||
|
call MemoryCopy
|
||||||
|
|
||||||
; clear OAM
|
; clear OAM
|
||||||
ld hl, _OAMRAM
|
ld hl, _OAMRAM
|
||||||
ld d, 0
|
ld d, 0
|
||||||
|
|||||||
@@ -136,9 +136,7 @@ EXPORT WaitRender
|
|||||||
SECTION "WaitRender", ROM0
|
SECTION "WaitRender", ROM0
|
||||||
WaitRender:
|
WaitRender:
|
||||||
ldh a, [LinesLeft]
|
ldh a, [LinesLeft]
|
||||||
ld b, a
|
or a
|
||||||
ldh a, [TilesLeft]
|
|
||||||
or a, b
|
|
||||||
ret z
|
ret z
|
||||||
halt
|
halt
|
||||||
jr WaitRender
|
jr WaitRender
|
||||||
|
|||||||
Binary file not shown.
BIN
Graphics/BackgroundTiles.gbr
Normal file
BIN
Graphics/BackgroundTiles.gbr
Normal file
Binary file not shown.
BIN
Graphics/SpriteTiles.bin
Normal file
BIN
Graphics/SpriteTiles.bin
Normal file
Binary file not shown.
BIN
Graphics/SpriteTiles.gbr
Normal file
BIN
Graphics/SpriteTiles.gbr
Normal file
Binary file not shown.
Binary file not shown.
7
build.bat
Normal file
7
build.bat
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
..\..\Assembler\rgbasm -i ..\..\Include\ -i Graphics\ -i Code\ -o Build\main.o Code\main.asm
|
||||||
|
..\..\Assembler\rgbasm -i ..\..\Include\ -i Graphics\ -i Code\ -o Build\data.o Code\data.asm
|
||||||
|
..\..\Assembler\rgbasm -i ..\..\Include\ -i Graphics\ -i Code\ -o Build\automata.o Code\automata.asm
|
||||||
|
..\..\Assembler\rgbasm -i ..\..\Include\ -i Graphics\ -i Code\ -o Build\render.o Code\render.asm
|
||||||
|
..\..\Assembler\rgbasm -i ..\..\Include\ -i Graphics\ -i Code\ -o Build\utils.o Code\utils.asm
|
||||||
|
..\..\Assembler\rgblink -n rom.sym -w -t -o rom.gb -d Build/main.o Build/data.o Build/automata.o Build/render.o Build/utils.o
|
||||||
|
..\..\Assembler\rgbfix -t "Game of Life" -v -p 0 rom.gb
|
||||||
Reference in New Issue
Block a user