diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6b0ad9c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +Build +rom.sym \ No newline at end of file diff --git a/Code/data.asm b/Code/data.asm index 56d3917..441f6da 100644 --- a/Code/data.asm +++ b/Code/data.asm @@ -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 \ No newline at end of file +BackgroundTiles: +INCBIN "BackgroundTiles.bin" +BackgroundTilesEnd: ds 0 + +EXPORT SpriteTiles, SpriteTilesEnd +SECTION "Graphics", ROM0 +SpriteTiles: +INCBIN "SpriteTiles.bin" +SpriteTilesEnd: ds 0 \ No newline at end of file diff --git a/Code/main.asm b/Code/main.asm index 189efac..4f38de2 100644 --- a/Code/main.asm +++ b/Code/main.asm @@ -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 diff --git a/Code/render.asm b/Code/render.asm index ed150a3..790972b 100644 --- a/Code/render.asm +++ b/Code/render.asm @@ -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 diff --git a/Graphics/Tiles.bin b/Graphics/BackgroundTiles.bin similarity index 94% rename from Graphics/Tiles.bin rename to Graphics/BackgroundTiles.bin index c3e9a0b..4c0e175 100644 Binary files a/Graphics/Tiles.bin and b/Graphics/BackgroundTiles.bin differ diff --git a/Graphics/BackgroundTiles.gbr b/Graphics/BackgroundTiles.gbr new file mode 100644 index 0000000..4a8c2e5 Binary files /dev/null and b/Graphics/BackgroundTiles.gbr differ diff --git a/Graphics/SpriteTiles.bin b/Graphics/SpriteTiles.bin new file mode 100644 index 0000000..43d4178 Binary files /dev/null and b/Graphics/SpriteTiles.bin differ diff --git a/Graphics/SpriteTiles.gbr b/Graphics/SpriteTiles.gbr new file mode 100644 index 0000000..fe6258a Binary files /dev/null and b/Graphics/SpriteTiles.gbr differ diff --git a/Graphics/font.chr b/Graphics/font.chr deleted file mode 100644 index 23390f6..0000000 Binary files a/Graphics/font.chr and /dev/null differ diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..f965f40 --- /dev/null +++ b/build.bat @@ -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 \ No newline at end of file diff --git a/rom.gb b/rom.gb new file mode 100644 index 0000000..40b908d Binary files /dev/null and b/rom.gb differ