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:
2019-01-03 23:43:16 +01:00
parent 2ade6c993c
commit 51d5e15eae
11 changed files with 28 additions and 10 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
Build
rom.sym

View File

@@ -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
EXPORT Tiles, TilesEnd
EXPORT BackgroundTiles, BackgroundTilesEnd
SECTION "Graphics", ROM0
Tiles:
INCBIN "Tiles.bin"
TilesEnd: ds 0
BackgroundTiles:
INCBIN "BackgroundTiles.bin"
BackgroundTilesEnd: ds 0
EXPORT SpriteTiles, SpriteTilesEnd
SECTION "Graphics", ROM0
SpriteTiles:
INCBIN "SpriteTiles.bin"
SpriteTilesEnd: ds 0

View File

@@ -40,10 +40,15 @@ Start:
; 16: sprite selection tile
; 17: empty tile
ld hl, _VRAM_BG_TILES
ld de, Tiles
ld bc, TilesEnd - Tiles
ld de, BackgroundTiles
ld bc, BackgroundTilesEnd - BackgroundTiles
call MemoryCopy
ld hl, _VRAM
ld de, SpriteTiles
ld bc, SpriteTilesEnd - SpriteTiles
call MemoryCopy
; clear OAM
ld hl, _OAMRAM
ld d, 0

View File

@@ -136,9 +136,7 @@ EXPORT WaitRender
SECTION "WaitRender", ROM0
WaitRender:
ldh a, [LinesLeft]
ld b, a
ldh a, [TilesLeft]
or a, b
or a
ret z
halt
jr WaitRender

Binary file not shown.

BIN
Graphics/SpriteTiles.bin Normal file

Binary file not shown.

BIN
Graphics/SpriteTiles.gbr Normal file

Binary file not shown.

Binary file not shown.

7
build.bat Normal file
View 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

BIN
rom.gb Normal file

Binary file not shown.