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
|
||||
|
||||
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
|
||||
@@ -40,8 +40,13 @@ 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
|
||||
|
||||
@@ -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/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