Compare commits
10 Commits
16ef5f192f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| d96588ec2d | |||
| b223361e54 | |||
| 9c0346bc61 | |||
| bab32fa68d | |||
| 0a2eef8336 | |||
| fde5c95442 | |||
| a2c8c40aaf | |||
| 78432f66d9 | |||
| 0cff33d046 | |||
| 5d68584179 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,2 @@
|
|||||||
Build
|
Build
|
||||||
rom.sym
|
*.sym
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
INCLUDE "hardware.inc"
|
INCLUDE "hardware.inc"
|
||||||
|
|
||||||
|
BUFFER_SIZE = SCRN_X_B * SCRN_Y_B
|
||||||
|
|
||||||
; automata buffers with 4 cells per byte
|
; automata buffers with 4 cells per byte
|
||||||
; 2x2 bytes per cell, bit ordering:
|
; 2x2 bytes per cell, bit ordering:
|
||||||
; ___ ___
|
; ___ ___
|
||||||
@@ -9,11 +11,11 @@ INCLUDE "hardware.inc"
|
|||||||
; bits 4, 5, 6 and 7 are not used
|
; bits 4, 5, 6 and 7 are not used
|
||||||
EXPORT Buffer0
|
EXPORT Buffer0
|
||||||
SECTION "Automata buffer 0", WRAM0, ALIGN[9]
|
SECTION "Automata buffer 0", WRAM0, ALIGN[9]
|
||||||
Buffer0: ds 20 * 18
|
Buffer0: ds BUFFER_SIZE
|
||||||
|
|
||||||
EXPORT Buffer1
|
EXPORT Buffer1
|
||||||
SECTION "Automata buffer 1", WRAM0, ALIGN[9]
|
SECTION "Automata buffer 1", WRAM0, ALIGN[9]
|
||||||
Buffer1: ds 20 * 18
|
Buffer1: ds BUFFER_SIZE
|
||||||
|
|
||||||
EXPORT New, Old, Progress
|
EXPORT New, Old, Progress
|
||||||
SECTION "Automata data", HRAM
|
SECTION "Automata data", HRAM
|
||||||
@@ -156,19 +158,19 @@ SECTION "Update Automata", ROM0
|
|||||||
UpdateAutomata:
|
UpdateAutomata:
|
||||||
.topleft
|
.topleft
|
||||||
; handle top left corner
|
; handle top left corner
|
||||||
ConwayGroup 1, 21, 20, 39, 19, 359, 340, 341
|
ConwayGroup 1, (SCRN_X_B + 1), SCRN_X_B, (2 * SCRN_X_B - 1), (SCRN_X_B - 1), (BUFFER_SIZE - 1), (BUFFER_SIZE - SCRN_X_B), (BUFFER_SIZE - SCRN_X_B + 1)
|
||||||
|
|
||||||
; advance to next cell in top row
|
; advance to next cell in top row
|
||||||
ld hl, Progress
|
ld hl, Progress
|
||||||
inc [hl]
|
inc [hl]
|
||||||
|
|
||||||
; handle all cells in top row except corners
|
; handle all cells in top row except corners
|
||||||
ld a, 18
|
ld a, (SCRN_X_B - 2)
|
||||||
.top
|
.top
|
||||||
ld [XLoop], a
|
ld [XLoop], a
|
||||||
|
|
||||||
; handle top row cell
|
; handle top row cell
|
||||||
ConwayGroup 1, 21, 20, 19, -1, 339, 340, 341
|
ConwayGroup 1, (SCRN_X_B + 1), SCRN_X_B, (SCRN_X_B - 1), -1, (BUFFER_SIZE - SCRN_X_B - 1), (BUFFER_SIZE - SCRN_X_B), (BUFFER_SIZE - SCRN_X_B + 1)
|
||||||
|
|
||||||
; advance to next cell in top row
|
; advance to next cell in top row
|
||||||
ld hl, Progress
|
ld hl, Progress
|
||||||
@@ -181,18 +183,18 @@ UpdateAutomata:
|
|||||||
|
|
||||||
; handle top right corner
|
; handle top right corner
|
||||||
.topright
|
.topright
|
||||||
ConwayGroup -19, 1, 20, 19, -1, 339, 340, 321
|
ConwayGroup (-SCRN_X_B + 1), 1, SCRN_X_B, (SCRN_X_B - 1), -1, (BUFFER_SIZE - SCRN_X_B - 1), (BUFFER_SIZE - SCRN_X_B), (BUFFER_SIZE - 2 * SCRN_X_B + 1)
|
||||||
|
|
||||||
; advance pointers to next row
|
; advance pointers to next row
|
||||||
ld hl, Progress
|
ld hl, Progress
|
||||||
inc [hl]
|
inc [hl]
|
||||||
|
|
||||||
ld a, 16
|
ld a, (SCRN_Y_B - 2)
|
||||||
.leftcolumn
|
.leftcolumn
|
||||||
ld [YLoop], a
|
ld [YLoop], a
|
||||||
|
|
||||||
; handle first element in row
|
; handle first element in row
|
||||||
ConwayGroup 1, 21, 20, 39, 19, -1, -20, -19
|
ConwayGroup 1, (SCRN_X_B + 1), SCRN_X_B, (2 * SCRN_X_B - 1), (SCRN_X_B - 1), -1, (-SCRN_X_B), (-SCRN_X_B + 1)
|
||||||
|
|
||||||
; advance to next cell
|
; advance to next cell
|
||||||
ld hl, Progress
|
ld hl, Progress
|
||||||
@@ -203,7 +205,7 @@ UpdateAutomata:
|
|||||||
ld [XLoop], a
|
ld [XLoop], a
|
||||||
|
|
||||||
; handle element inside row
|
; handle element inside row
|
||||||
ConwayGroup 1, 21, 20, 19, -1, -21, -20, -19
|
ConwayGroup 1, (SCRN_X_B + 1), SCRN_X_B, (SCRN_X_B - 1), -1, (-SCRN_X_B - 1), (-SCRN_X_B), (-SCRN_X_B + 1)
|
||||||
|
|
||||||
; advance to next cell
|
; advance to next cell
|
||||||
ld hl, Progress
|
ld hl, Progress
|
||||||
@@ -222,7 +224,7 @@ UpdateAutomata:
|
|||||||
|
|
||||||
; handle last element in row
|
; handle last element in row
|
||||||
.rightcolumn
|
.rightcolumn
|
||||||
ConwayGroup -19, 1, 20, 19, -1, -21, -20, -39
|
ConwayGroup (-SCRN_X_B + 1), 1, SCRN_X_B, (SCRN_X_B - 1), -1, (-SCRN_X_B - 1), -SCRN_X_B, (-2 * SCRN_X_B + 1)
|
||||||
|
|
||||||
; advance to next row
|
; advance to next row
|
||||||
ld hl, Progress
|
ld hl, Progress
|
||||||
@@ -235,19 +237,19 @@ UpdateAutomata:
|
|||||||
|
|
||||||
; handle bottom left element
|
; handle bottom left element
|
||||||
.bottomleft
|
.bottomleft
|
||||||
ConwayGroup 1, -339, -340, -321, 19, -1, -20, -19
|
ConwayGroup 1, (-BUFFER_SIZE + SCRN_X_B + 1), (-BUFFER_SIZE + SCRN_X_B), (-BUFFER_SIZE + 2 * SCRN_X_B - 1), (SCRN_X_B - 1), -1, (-SCRN_X_B), (-SCRN_X_B + 1)
|
||||||
|
|
||||||
; advance to next cell in bottom row
|
; advance to next cell in bottom row
|
||||||
ld hl, Progress
|
ld hl, Progress
|
||||||
inc [hl]
|
inc [hl]
|
||||||
|
|
||||||
; handle all cells in bottom row except corners
|
; handle all cells in bottom row except corners
|
||||||
ld a, 18
|
ld a, SCRN_X_B - 2
|
||||||
.bottom
|
.bottom
|
||||||
ld [XLoop], a
|
ld [XLoop], a
|
||||||
|
|
||||||
; handle top row cell
|
; handle top row cell
|
||||||
ConwayGroup 1, -339, -340, -341, -1, -21, -20, -19
|
ConwayGroup 1, (-BUFFER_SIZE + SCRN_X_B + 1), (-BUFFER_SIZE + SCRN_X_B), (-BUFFER_SIZE + SCRN_X_B - 1), -1, (-SCRN_X_B - 1), (-SCRN_X_B), (-SCRN_X_B + 1)
|
||||||
|
|
||||||
; advance to next cell in top row
|
; advance to next cell in top row
|
||||||
ld hl, Progress
|
ld hl, Progress
|
||||||
@@ -260,7 +262,7 @@ UpdateAutomata:
|
|||||||
|
|
||||||
; handle last element
|
; handle last element
|
||||||
.bottomright
|
.bottomright
|
||||||
ConwayGroup -19, -359, -340, -341, -1, -21, -20, -39
|
ConwayGroup (-SCRN_X_B + 1), (-BUFFER_SIZE + 1), (-BUFFER_SIZE + SCRN_X_B), (-BUFFER_SIZE + SCRN_X_B - 1), -1, (-SCRN_X_B - 1), (-SCRN_X_B), (-2 * SCRN_X_B + 1)
|
||||||
|
|
||||||
; move buffer address back to beginning
|
; move buffer address back to beginning
|
||||||
ld hl, Old
|
ld hl, Old
|
||||||
@@ -306,4 +308,4 @@ InitAutomata:
|
|||||||
ldh [Rendered], a
|
ldh [Rendered], a
|
||||||
ldh [Video], a
|
ldh [Video], a
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ BitsSet:
|
|||||||
EXPORT DefaultMap
|
EXPORT DefaultMap
|
||||||
SECTION "Default Map", ROM0, ALIGN[8]
|
SECTION "Default Map", ROM0, ALIGN[8]
|
||||||
DefaultMap:
|
DefaultMap:
|
||||||
; 32x18 map matching the startup nintendo logo
|
; 32x18 game of life map matching the startup nintendo logo
|
||||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
@@ -43,14 +43,13 @@ DefaultMap:
|
|||||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
|
||||||
EXPORT BackgroundTiles, BackgroundTilesEnd
|
|
||||||
SECTION "Graphics", ROM0
|
SECTION "Graphics", ROM0
|
||||||
|
EXPORT BackgroundTiles, BackgroundTilesEnd
|
||||||
BackgroundTiles:
|
BackgroundTiles:
|
||||||
INCBIN "BackgroundTiles.bin"
|
INCBIN "BackgroundTiles.bin"
|
||||||
BackgroundTilesEnd: ds 0
|
BackgroundTilesEnd: ds 0
|
||||||
|
|
||||||
EXPORT SpriteTiles, SpriteTilesEnd
|
EXPORT SpriteTiles, SpriteTilesEnd
|
||||||
SECTION "Graphics", ROM0
|
|
||||||
SpriteTiles:
|
SpriteTiles:
|
||||||
INCBIN "SpriteTiles.bin"
|
INCBIN "SpriteTiles.bin"
|
||||||
SpriteTilesEnd: ds 0
|
SpriteTilesEnd: ds 0
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ SpriteDelay: ds 1
|
|||||||
EXPORT InitEdit
|
EXPORT InitEdit
|
||||||
SECTION "Init edit", ROM0
|
SECTION "Init edit", ROM0
|
||||||
InitEdit:
|
InitEdit:
|
||||||
ld a, 20
|
ld a, SCRN_X_B
|
||||||
ldh [SelectX], a
|
ldh [SelectX], a
|
||||||
ld a, 18
|
ld a, SCRN_Y_B
|
||||||
ldh [SelectY], a
|
ldh [SelectY], a
|
||||||
xor a
|
xor a
|
||||||
ldh [Down], a
|
ldh [Down], a
|
||||||
@@ -210,7 +210,7 @@ ToggleCell:
|
|||||||
ldh a, [Video + 1]
|
ldh a, [Video + 1]
|
||||||
xor a, %100
|
xor a, %100
|
||||||
ld h, a
|
ld h, a
|
||||||
MoveToCell 32
|
MoveToCell SCRN_VX_B
|
||||||
|
|
||||||
; toggle bit
|
; toggle bit
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@@ -222,7 +222,7 @@ ToggleCell:
|
|||||||
ld l, a
|
ld l, a
|
||||||
ldh a, [Old]
|
ldh a, [Old]
|
||||||
ld h, a
|
ld h, a
|
||||||
MoveToCell 20
|
MoveToCell SCRN_X_B
|
||||||
|
|
||||||
; toggle bit
|
; toggle bit
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@@ -271,7 +271,7 @@ Clear:
|
|||||||
ld [Rendered + 1], a
|
ld [Rendered + 1], a
|
||||||
|
|
||||||
; clear old buffer
|
; clear old buffer
|
||||||
ld bc, 20 * 18
|
ld bc, SCRN_X_B * SCRN_Y_B
|
||||||
ld d, 0
|
ld d, 0
|
||||||
call MemorySet
|
call MemorySet
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
; If all of these are already defined, don't do it again.
|
; If all of these are already defined, don't do it again.
|
||||||
|
|
||||||
IF !DEF(HARDWARE_INC)
|
IF !DEF(HARDWARE_INC)
|
||||||
HARDWARE_INC SET 1
|
HARDWARE_INC = 1
|
||||||
|
|
||||||
rev_Check_hardware_inc : MACRO
|
rev_Check_hardware_inc : MACRO
|
||||||
;NOTE: REVISION NUMBER CHANGES MUST BE ADDED
|
;NOTE: REVISION NUMBER CHANGES MUST BE ADDED
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ Intro:
|
|||||||
jr z, .setBGPalette
|
jr z, .setBGPalette
|
||||||
|
|
||||||
; fade bg palette
|
; fade bg palette
|
||||||
ld b, 8
|
FADE_DELAY = 8 ; frames
|
||||||
|
ld b, FADE_DELAY
|
||||||
.fadeDelay0
|
.fadeDelay0
|
||||||
HaltAndClearInterrupts
|
HaltAndClearInterrupts
|
||||||
dec b
|
dec b
|
||||||
@@ -53,7 +54,7 @@ Intro:
|
|||||||
ld a, %11111100
|
ld a, %11111100
|
||||||
ldh [rBGP], a
|
ldh [rBGP], a
|
||||||
|
|
||||||
ld b, 8
|
ld b, FADE_DELAY
|
||||||
.fadeDelay1
|
.fadeDelay1
|
||||||
HaltAndClearInterrupts
|
HaltAndClearInterrupts
|
||||||
dec b
|
dec b
|
||||||
@@ -62,7 +63,7 @@ Intro:
|
|||||||
ld a, %11111000
|
ld a, %11111000
|
||||||
ldh [rBGP], a
|
ldh [rBGP], a
|
||||||
|
|
||||||
ld b, 8
|
ld b, FADE_DELAY
|
||||||
.fadeDelay2
|
.fadeDelay2
|
||||||
HaltAndClearInterrupts
|
HaltAndClearInterrupts
|
||||||
dec b
|
dec b
|
||||||
@@ -127,7 +128,7 @@ Intro:
|
|||||||
ld a, LCDCF_ON | LCDCF_BGON | LCDCF_BG9800
|
ld a, LCDCF_ON | LCDCF_BGON | LCDCF_BG9800
|
||||||
ldh [rLCDC], a
|
ldh [rLCDC], a
|
||||||
|
|
||||||
; sound
|
; sweep sound while transforming nintendo logo into game of life of it
|
||||||
ld a, $77
|
ld a, $77
|
||||||
ldh [rNR10], a ; sweep
|
ldh [rNR10], a ; sweep
|
||||||
ld a, (%00 << 6) + 0
|
ld a, (%00 << 6) + 0
|
||||||
@@ -146,22 +147,23 @@ FREQUENCY = 146
|
|||||||
ld b, 20
|
ld b, 20
|
||||||
.loopX
|
.loopX
|
||||||
ld c, 2
|
ld c, 2
|
||||||
|
; 3 frame delay
|
||||||
HaltAndClearInterrupts
|
HaltAndClearInterrupts
|
||||||
HaltAndClearInterrupts
|
HaltAndClearInterrupts
|
||||||
HaltAndClearInterrupts
|
HaltAndClearInterrupts
|
||||||
.loopY
|
.loopY
|
||||||
; copy 8 tiles (that's how many there is before L and E overflow)
|
; copy 8 tiles from (that's how many there is before L and E overflow)
|
||||||
REPT 8
|
REPT 8
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld a, l
|
ld a, l
|
||||||
add a, $20
|
add a, SCRN_VX_B
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, e
|
ld a, e
|
||||||
add a, $20
|
add a, SCRN_VX_B
|
||||||
ld e, a
|
ld e, a
|
||||||
ENDR
|
ENDR
|
||||||
; L and E overflowed, we can increment H and L
|
; L and E overflowed, we can increment high byte of pointers (h and d)
|
||||||
inc h
|
inc h
|
||||||
inc d
|
inc d
|
||||||
dec c
|
dec c
|
||||||
@@ -171,10 +173,10 @@ REPT 2
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld a, l
|
ld a, l
|
||||||
add a, $20
|
add a, SCRN_VX_B
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, e
|
ld a, e
|
||||||
add a, $20
|
add a, SCRN_VX_B
|
||||||
ld e, a
|
ld e, a
|
||||||
ENDR
|
ENDR
|
||||||
; back to beginning (high byte)
|
; back to beginning (high byte)
|
||||||
@@ -187,10 +189,10 @@ ENDR
|
|||||||
|
|
||||||
; back to beginning + next column (low byte)
|
; back to beginning + next column (low byte)
|
||||||
ld a, l
|
ld a, l
|
||||||
sub a, $3F
|
sub a, SCRN_VX_B * 2 - 1
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, e
|
ld a, e
|
||||||
sub a, $3F
|
sub a, SCRN_VX_B * 2 - 1
|
||||||
ld e, a
|
ld e, a
|
||||||
|
|
||||||
dec b
|
dec b
|
||||||
|
|||||||
@@ -75,9 +75,9 @@ ENDR
|
|||||||
; copy default map into 20x18 automata buffer
|
; copy default map into 20x18 automata buffer
|
||||||
ld hl, DefaultMap
|
ld hl, DefaultMap
|
||||||
ld de, Buffer0
|
ld de, Buffer0
|
||||||
ld c, 18
|
ld c, SCRN_Y_B
|
||||||
.loopY
|
.loopY
|
||||||
ld b, 20
|
ld b, SCRN_X_B
|
||||||
|
|
||||||
.loopX
|
.loopX
|
||||||
ld a, [hl+]
|
ld a, [hl+]
|
||||||
@@ -90,7 +90,7 @@ ENDR
|
|||||||
jr z, .next
|
jr z, .next
|
||||||
|
|
||||||
ld a, l
|
ld a, l
|
||||||
add a, 32 - 20
|
add a, SCRN_VX_B - SCRN_X_B
|
||||||
ld l, a
|
ld l, a
|
||||||
jr nc, .loopY
|
jr nc, .loopY
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ LCDStatInterruptHandler:
|
|||||||
|
|
||||||
; go to next line
|
; go to next line
|
||||||
ld a, e
|
ld a, e
|
||||||
add a, 32 - 20
|
add a, SCRN_VX_B - SCRN_X_B
|
||||||
ld e, a
|
ld e, a
|
||||||
jr nc, .nocarry
|
jr nc, .nocarry
|
||||||
inc d
|
inc d
|
||||||
@@ -82,7 +82,7 @@ LCDStatInterruptHandler:
|
|||||||
jr z, .finish
|
jr z, .finish
|
||||||
|
|
||||||
; reset tile counter
|
; reset tile counter
|
||||||
ld c, 20
|
ld c, SCRN_X_B
|
||||||
|
|
||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ LCDStatInterruptHandler:
|
|||||||
EXPORT InitRender
|
EXPORT InitRender
|
||||||
SECTION "Init render", ROM0
|
SECTION "Init render", ROM0
|
||||||
InitRender:
|
InitRender:
|
||||||
ld a, $9C
|
ld a, HIGH(_SCRN1)
|
||||||
ldh [Video + 1], a
|
ldh [Video + 1], a
|
||||||
xor a
|
xor a
|
||||||
ldh [Video], a
|
ldh [Video], a
|
||||||
@@ -136,9 +136,9 @@ StartRender:
|
|||||||
ld [Rendered + 1], a
|
ld [Rendered + 1], a
|
||||||
|
|
||||||
; start rendering
|
; start rendering
|
||||||
ld a, 20
|
ld a, SCRN_X_B
|
||||||
ldh [TilesLeft], a
|
ldh [TilesLeft], a
|
||||||
ld a, 18
|
ld a, SCRN_Y_B
|
||||||
ldh [LinesLeft], a
|
ldh [LinesLeft], a
|
||||||
|
|
||||||
; enable v-blank and lcd stat interrupt for h-blank
|
; enable v-blank and lcd stat interrupt for h-blank
|
||||||
|
|||||||
Binary file not shown.
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
BSD 3-Clause License
|
BSD 3-Clause License
|
||||||
|
|
||||||
Copyright (c) 2018, MsK`
|
Copyright (c) 2018, Daniel Borges (MsK`)
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|||||||
24
Makefile
Normal file
24
Makefile
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
TITLE = "Game of Life"
|
||||||
|
INCLUDE = -i Graphics -i Code
|
||||||
|
|
||||||
|
NAME = $(notdir $(CURDIR))
|
||||||
|
FILES = $(wildcard Code/*.asm)
|
||||||
|
OBJECTS = $(patsubst Code/%.asm,Build/%.o,$(FILES))
|
||||||
|
|
||||||
|
.PHONY: clean mrproper
|
||||||
|
|
||||||
|
Build/%.o: Code/%.asm
|
||||||
|
@echo Assembling $<
|
||||||
|
@rgbasm $(INCLUDE) -o $@ $<
|
||||||
|
|
||||||
|
$(NAME).gb: $(OBJECTS)
|
||||||
|
@echo Linking...
|
||||||
|
@rgblink -n $(NAME).sym -w -t -o $(NAME).gb -d $(OBJECTS)
|
||||||
|
@rgbfix -t $(TITLE) -v -p 0 $(NAME).gb
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm -f $(OBJECTS)
|
||||||
|
@rm -f $(NAME).sym
|
||||||
|
|
||||||
|
mrproper: clean
|
||||||
|
@rm -f $(NAME).gb
|
||||||
10
build.bat
10
build.bat
@@ -1,10 +0,0 @@
|
|||||||
..\..\Assembler\rgbasm %* -i Graphics\ -i Code\ -o Build\main.o Code\main.asm
|
|
||||||
..\..\Assembler\rgbasm %* -i Graphics\ -i Code\ -o Build\data.o Code\data.asm
|
|
||||||
..\..\Assembler\rgbasm %* -i Graphics\ -i Code\ -o Build\automata.o Code\automata.asm
|
|
||||||
..\..\Assembler\rgbasm %* -i Graphics\ -i Code\ -o Build\render.o Code\render.asm
|
|
||||||
..\..\Assembler\rgbasm %* -i Graphics\ -i Code\ -o Build\utils.o Code\utils.asm
|
|
||||||
..\..\Assembler\rgbasm %* -i Graphics\ -i Code\ -o Build\intro.o Code\intro.asm
|
|
||||||
..\..\Assembler\rgbasm %* -i Graphics\ -i Code\ -o Build\edit.o Code\edit.asm
|
|
||||||
..\..\Assembler\rgbasm %* -i Graphics\ -i Code\ -o Build\joypad.o Code\joypad.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 Build/intro.o Build/edit.o Build/joypad.o
|
|
||||||
..\..\Assembler\rgbfix -t "Game of Life" -v -p 0 rom.gb
|
|
||||||
Reference in New Issue
Block a user