diff --git a/028.bs/Makefile b/028.bs/Makefile
index 7d7e27b..d1438a4 100644
--- a/028.bs/Makefile
+++ b/028.bs/Makefile
@@ -8,8 +8,6 @@ USERSTACK_ADDRESS=7fffc
BASE_ADDRESS=4000
# note: this must be high enough not to conflict with MFMbufE
-NUM_COLORS=8
-
BOOTBLOCK_ASM=alpine_bootblock.s
OBJS=out/init.o out/utils.o out/image.o out/blit.o out/joystick.o out/player.o out/items.o out/blitmtext.o out/blittext.o out/music.o out/P6112-Play.o out/splash.o out/background.o
@@ -52,7 +50,7 @@ IMAGES=foreground.png \
IMAGEDATA=$(addprefix out/, $(IMAGES:.png=.bin))
-VASM_EXTRA_ARGS=-DNUM_COLORS=$(NUM_COLORS)
+VASM_EXTRA_ARGS=
#SYMBOL_INFO=-M
LINKER_OPTIONS=-T link.script.x
@@ -60,10 +58,10 @@ LINKER_OPTIONS=-T link.script.x
include ../shared/base.mk
#out/%.bin: out/%.sized.png
-# $(IMAGECON) --input $< $(IMAGECON_ARGS) --quantize --colors $(NUM_COLORS) --output-bitplanes --output-palette-asm --output-grey-palette --output-palette $(DITHER) --output out/$*
+# $(IMAGECON) --input $< $(IMAGECON_ARGS) --quantize --colors 8 --output-bitplanes --output-palette-asm --output-grey-palette --output-palette $(DITHER) --output out/$*
out/foreground.bin: assets/assets.png
- $(IMAGECON) --use-palette=assets/foreground.pal --input $< $(IMAGECON_ARGS) --colors $(NUM_COLORS) --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-grey-palette --output-palette --output-png --output-copperlist --output out/foreground
+ $(IMAGECON) --use-palette=assets/foreground.pal --input $< $(IMAGECON_ARGS) --colors 8 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-grey-palette --output-palette --output-png --output-copperlist --output out/foreground
sed -i '' "1s/.*/ dc.w COLOR00,\$$$(BACKGROUND_COLOR)/" out/foreground-copper-list.s
sed -i '' "1s/.*/ dc.w \$$$(BACKGROUND_COLOR)/" out/foreground-palette-table.s
sed -i '' "1s/.*/ dc.w \$$$(BACKGROUND_GREY_COLOR)/" out/foreground-grey-table.s
@@ -72,7 +70,7 @@ out/foreground.bin: assets/assets.png
sed -i '' "3s/.*/ dc.w COLOR02,\$$bbb/" out/foreground-grey-copper.s
out/background.bin: assets/assets.png
- $(IMAGECON) --use-palette=assets/background.pal --input $< $(IMAGECON_ARGS) --colors $(NUM_COLORS) --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-grey-palette --output-palette --output-png --output-copperlist --output out/background --palette-offset 8
+ $(IMAGECON) --use-palette=assets/background.pal --input $< $(IMAGECON_ARGS) --colors 8 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-grey-palette --output-palette --output-png --output-copperlist --output out/background --palette-offset 8
out/panel.bin: assets/panel.png
$(IMAGECON) --input $< $(IMAGECON_ARGS) --colors 16 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-palette --output-png --output-copperlist --output-grey-palette --output out/panel --use-palette=assets/panel.pal
@@ -132,19 +130,18 @@ out/tileFade.s: assets/tileFadeFrom.pal assets/tileFadeTo.pal ../tools/fade/out/
out/foreground-map.s: foreground.tmx
../tools/mapgen/out/mapgen --depth=3 --input=foreground.tmx
- mv foreground-map.s out
- rm items-map.s
- mv items-indexes.s out
- rm foreground-indexes.s
- mv pathway-map.s out
- mv pathway-indexes.s out
+ @mv foreground-map.s out
+ @rm items-map.s
+ @mv items-indexes.s out
+ @rm foreground-indexes.s
+ @mv pathway-map.s out
+ @mv pathway-indexes.s out
out/background-map.s: background.tmx
../tools/mapgen/out/mapgen --depth=3 --input=background.tmx
- mv background-map.s out
- rm background-indexes.s
+ @mv background-map.s out
+ @rm background-indexes.s
+
+out/main.o: $(IMAGEDATA) out/background-map.s out/foreground-map.s Makefile link.script.x out/playarea_fade.s out/flags_fade.s out/panelFade.s out/tileFade.s
-out/blit.o: constants.i macros.i
-out/main.o: out/background-map.s out/foreground-map.s $(IMAGEDATA) constants.i macros.i Makefile link.script.x assets/palette.pal out/playarea_fade.s out/flags_fade.s out/panelFade.s out/tileFade.s
-out/init.o: constants.i Makefile
\ No newline at end of file
diff --git a/028.bs/blitmtext.s b/028.bs/blitmtext.s
index e460127..aed8135 100644
--- a/028.bs/blitmtext.s
+++ b/028.bs/blitmtext.s
@@ -9,7 +9,6 @@ FONT_WIDTH equ 8
FONTMAP_WIDTH_BYTES equ 32
_SCREEN_BIT_DEPTH equ 4
_BITPLANE_WIDTH_BYTES equ 320/8
-MASKED_FONT equ 1
DrawMaskedText8:
;; a0 - bitplane
@@ -20,12 +19,8 @@ DrawMaskedText8:
WaitBlitter
;; blitter config that is shared for every character
- if MASKED_FONT==1
move.w #BC0F_SRCA|BC0F_SRCB|BC0F_SRCC|BC0F_DEST|BLIT_LF_MINTERM,d6 ; BLTCON0 value (masked version)
move.w #FONTMAP_WIDTH_BYTES-BLIT_WIDTH_BYTES,BLTAMOD(a6) ; A modulo (only used for masked version)
- else
- move.w #BC0F_SRCB|BC0F_SRCC|BC0F_DEST|BLIT_LF_MINTERM,d6 ; BLTCON0 value
- endif
move.w #FONTMAP_WIDTH_BYTES-BLIT_WIDTH_BYTES,BLTBMOD(a6) ; B modulo
move.w #_BITPLANE_WIDTH_BYTES-BLIT_WIDTH_BYTES,BLTCMOD(a6) ; C modulo
move.w #_BITPLANE_WIDTH_BYTES-BLIT_WIDTH_BYTES,BLTDMOD(a6) ; D modulo
@@ -60,43 +55,18 @@ DrawChar8:
;; a5 - #font
;; d7 - #fontMask
- sub.w #' ',d2 ; index = char - '!'
- move.w d2,d5
-
+ sub.w #' ',d2 ; index = char - ' '
+ move.w d2,d5
lsr.w #5,d5 ; char / 32 = fontmap line
- andi.w #$1f,d2 ; char index in line (char index - start of line index)
-
+ andi.w #$1f,d2 ; char index in line (char index - start of line index)
add.l #1,d5 ; while we have a weird font image, ' ' starts on second line
move.l a5,a1 ; #font
-
- if 1
mulu.w d3,d5 ; d5 *= #FONTMAP_WIDTH_BYTES*_SCREEN_BIT_DEPTH*FONT_HEIGHT
- else
- move.w d5,d3
- lsl.w #7,d3 ; d5 *= FONTMAP_WIDTH_BYTES*_SCREEN_BIT_DEPTH
- move.w d3,d5
- add.l d3,d5
- add.l d3,d5
- add.l d3,d5
- add.l d3,d5
- add.l d3,d5
- add.l d3,d5
- add.l d3,d5
- add.l d3,d5
- add.l d3,d5
- endif
-
- if MASKED_FONT==1
move.l d7,a2 ; #fontMask
add.w d5,a2 ; add y offset in lines to fontMask address
- endif
-
add.w d5,a1 ; add y offset in lines to font address
-
add.w d2,a1 ; add offset into font
- if MASKED_FONT==1
add.l d2,a2 ; add offset into mask
- endif
.blitChar8:
;; kills a4,d2,d4,d5
@@ -125,31 +95,21 @@ DrawChar8:
.evenChar:
move.w #$FF00,BLTAFWM(a6) ; select the first character in the word
.continue:
-
;; this shift will give us the bits to shift (bits 0-3) in bits (12-15) of d5
swap d5 ; d5 << 12
- lsr.l #4,d5 ;
-
+ lsr.l #4,d5 ;
move.w d5,BLTCON1(A6) ; set the shift bits 12-15, bits 00-11 cleared
-
- if MASKED_FONT==1
move.l a2,BLTAPTH(a6) ; mask bitplane
- endif
-
move.l a1,BLTBPTH(a6) ; source bitplane
or.w d6,d5 ; d5 = BLTCON0 value
move.w d5,BLTCON0(a6) ; set minterm, dma channel and shift
-
add.l d4,a4 ; dest += XPOS_BYTES
add.l d1,a4 ; dest += YPOS_BYTES
-
move.l a4,BLTCPTH(a6) ; background top left corner
move.l a4,BLTDPTH(a6) ; destination top left corner
move.w #(FONT_HEIGHT*_SCREEN_BIT_DEPTH)<<6|(BLIT_WIDTH_WORDS),BLTSIZE(a6) ;rectangle size, starts blit
rts
-font:
- incbin "out/font8x8.bin"
fontMask:
- incbin "out/font8x8-mask.bin"
+ incbin "out/font8x8-mask.bin"
\ No newline at end of file
diff --git a/028.bs/blittext.s b/028.bs/blittext.s
index 82e7704..8efaf66 100644
--- a/028.bs/blittext.s
+++ b/028.bs/blittext.s
@@ -1,6 +1,7 @@
include "includes.i"
xdef DrawText8
-
+ xdef font
+
BLIT_LF_MINTERM equ $ca ; cookie cut
BLIT_WIDTH_WORDS equ 2 ; blit 2 words to allow shifting
BLIT_WIDTH_BYTES equ 4
@@ -9,23 +10,17 @@ FONT_WIDTH equ 8
FONTMAP_WIDTH_BYTES equ 32
_SCREEN_BIT_DEPTH equ 4
_BITPLANE_WIDTH_BYTES equ 320/8
-MASKED_FONT equ 0
DrawText8:
;; a0 - bitplane
;; a1 - text
;; d0 - xpos
;; d1 - ypos
- movem.l d0-d7/a0-a4,-(sp)
+ movem.l d0-d6/a0-a4,-(sp)
WaitBlitter
;; blitter config that is shared for every character
- if MASKED_FONT==1
- move.w #BC0F_SRCA|BC0F_SRCB|BC0F_SRCC|BC0F_DEST|BLIT_LF_MINTERM,d6 ; BLTCON0 value (masked version)
- move.w #FONTMAP_WIDTH_BYTES-BLIT_WIDTH_BYTES,BLTAMOD(a6) ; A modulo (only used for masked version)
- else
move.w #BC0F_SRCB|BC0F_SRCC|BC0F_DEST|BLIT_LF_MINTERM,d6 ; BLTCON0 value
- endif
move.w #FONTMAP_WIDTH_BYTES-BLIT_WIDTH_BYTES,BLTBMOD(a6) ; B modulo
move.w #_BITPLANE_WIDTH_BYTES-BLIT_WIDTH_BYTES,BLTCMOD(a6) ; C modulo
move.w #_BITPLANE_WIDTH_BYTES-BLIT_WIDTH_BYTES,BLTDMOD(a6) ; D modulo
@@ -34,7 +29,6 @@ DrawText8:
move.w #$ffff,BLTADAT(a6) ; preload source mask so only BLTA?WM mask is used
move.l a1,a3 ; character pointer
move.l #font,a5 ; font pointer
- move.l #fontMask,d7 ; font mask pointer
move.w #FONTMAP_WIDTH_BYTES*_SCREEN_BIT_DEPTH*FONT_HEIGHT,d3 ; bytes per font line
.loop:
clr.l d2
@@ -46,7 +40,7 @@ DrawText8:
add.l #FONT_WIDTH,d0 ; increment the x position
bra .loop
.done:
- movem.l (sp)+,d0-d7/a0-a4
+ movem.l (sp)+,d0-d6/a0-a4
rts
DrawChar8:
@@ -58,45 +52,16 @@ DrawChar8:
;; d6 - bltcon0 value
;; a4* - bitplane
;; a5 - #font
- ;; d7 - #fontMask
- sub.w #' ',d2 ; index = char - '!'
- move.w d2,d5
-
+ sub.w #' ',d2 ; index = char - ' '
+ move.w d2,d5
lsr.w #5,d5 ; char / 32 = fontmap line
- andi.w #$1f,d2 ; char index in line (char index - start of line index)
-
+ andi.w #$1f,d2 ; char index in line (char index - start of line index)
add.l #1,d5 ; while we have a weird font image, ' ' starts on second line
move.l a5,a1 ; #font
-
- if 1
mulu.w d3,d5 ; d5 *= #FONTMAP_WIDTH_BYTES*_SCREEN_BIT_DEPTH*FONT_HEIGHT
- else
- move.w d5,d3
- lsl.w #7,d3 ; d5 *= FONTMAP_WIDTH_BYTES*_SCREEN_BIT_DEPTH
- move.w d3,d5
- add.l d3,d5
- add.l d3,d5
- add.l d3,d5
- add.l d3,d5
- add.l d3,d5
- add.l d3,d5
- add.l d3,d5
- add.l d3,d5
- add.l d3,d5
- endif
-
- if MASKED_FONT==1
- move.l d7,a2 ; #fontMask
- add.w d5,a2 ; add y offset in lines to fontMask address
- endif
-
add.w d5,a1 ; add y offset in lines to font address
-
add.w d2,a1 ; add offset into font
- if MASKED_FONT==1
- add.l d2,a2 ; add offset into mask
- endif
.blitChar8:
;; kills a4,d2,d4,d5
@@ -128,21 +93,13 @@ DrawChar8:
;; this shift will give us the bits to shift (bits 0-3) in bits (12-15) of d5
swap d5 ; d5 << 12
- lsr.l #4,d5 ;
-
+ lsr.l #4,d5 ;
move.w d5,BLTCON1(A6) ; set the shift bits 12-15, bits 00-11 cleared
-
- if MASKED_FONT==1
- move.l a2,BLTAPTH(a6) ; mask bitplane
- endif
-
move.l a1,BLTBPTH(a6) ; source bitplane
or.w d6,d5 ; d5 = BLTCON0 value
move.w d5,BLTCON0(a6) ; set minterm, dma channel and shift
-
add.l d4,a4 ; dest += XPOS_BYTES
add.l d1,a4 ; dest += YPOS_BYTES
-
move.l a4,BLTCPTH(a6) ; background top left corner
move.l a4,BLTDPTH(a6) ; destination top left corner
@@ -151,5 +108,4 @@ DrawChar8:
font:
incbin "out/font8x8.bin"
-fontMask:
- incbin "out/font8x8-mask.bin"
+
diff --git a/028.bs/foreground.tmx b/028.bs/foreground.tmx
index 7e47065..56f9d4e 100644
--- a/028.bs/foreground.tmx
+++ b/028.bs/foreground.tmx
@@ -13,7 +13,7 @@
- eJxjYBgFo2AUjIKhCc4D8Uck/kkgNmZkYNBlRKVHAe0AcjhLAvFjBggfBORHw34UjIJRMApGARYAAKjfBWM=
+ eJxjYBgFo2AUjIKhCc4D8Uck/kkgNmZkYNBlRKVHAW0BLJwlgfgxlD8KRsEoGAWjYBTgAgCgkwUP
diff --git a/028.bs/game1.s b/028.bs/game1.s
index 419c596..ec56d54 100644
--- a/028.bs/game1.s
+++ b/028.bs/game1.s
@@ -1,7 +1,6 @@
include "includes.i"
xdef BigBang
- xdef IncrementScore
xdef pathwayRenderPending
@@ -41,13 +40,10 @@ Entry:
lea Level3InterruptHandler,a3
move.l a3,LVL3_INT_VECTOR
-
+
jsr StartMusic
-
jsr ShowSplash
-
- ;; jsr InstallGreyPalette
-
+
;; d0 - fg bitplane pointer offset
;; d1 - bg bitplane pointer offset
move.l #0,d0
@@ -93,12 +89,11 @@ Reset:
jsr Message
jsr InstallGreyPalette
jsr HidePlayer
- bsr RenderScore
MainLoop:
MOVE.W #$0024,BPLCON2(a6)
move.l #0,frameCount
-
+
SetupBoardLoop:
add.l #1,frameCount
move.l frameCount,d6
@@ -118,14 +113,10 @@ SetupBoardLoop:
cmp.l #50,d6
ble .gotoGameLoop
jsr ProcessJoystick
- ;; cmp.l #FOREGROUND_PLAYAREA_WIDTH_WORDS+50,d6
- ;; bne .gotoGameLoop
btst.b #0,joystick
beq .gotoGameLoop
move.w #0,moving
move.l #FOREGROUND_SCROLL_PIXELS,foregroundScrollPixels
- ;; move.w #$ffff,mpanelWaitLinePtr
- ;; bsr ClearMPanel
bsr HideMessagePanel
FadeInLoop:
@@ -141,11 +132,26 @@ FadeInLoop:
bne .c1
jsr InitialisePlayer
jsr EnableItemSprites
+
+ lea frameCounterText,a0
+ bsr ResetCounter
+ lea verticalBlankCounterText,a0
+ bsr ResetCounter
+
bra GameLoop
.c1:
bra FadeInLoop
GameLoop:
+ lea frameCounterText,a0
+ bsr IncrementCounter
+ lea frameCounterText,a1
+ move.w #31,d0
+ jsr RenderCounter
+ lea verticalBlankCounterText,a1
+ move.w #101,d0
+ jsr RenderCounter
+
add.l #1,frameCount
move.l frameCount,d6
move.l #FOREGROUND_SCROLL_PIXELS,foregroundScrollPixels
@@ -193,7 +199,6 @@ Update:
beq .skipForegroundUpdates
;; ---- Foreground updates ----------------------------------------
.foregroundUpdates:
- jsr CalculateScore
move.l foregroundScrollX,d0
lsr.l #FOREGROUND_SCROLL_SHIFT_CONVERT,d0 ; convert to pixels
andi.l #$f,d0
@@ -228,7 +233,6 @@ ShowMessagePanel:
jsr WaitVerticalBlank
lea mpanelCopperList,a0
move.l a0,COP1LC(a6)
- ;; move.w COPJMP1(a6),d0
rts
@@ -236,7 +240,6 @@ HideMessagePanel:
jsr WaitVerticalBlank
lea copperList,a0
move.l a0,COP1LC(a6)
- ;; move.w COPJMP1(a6),d0
rts
HoriScrollPlayfield:
@@ -261,7 +264,6 @@ HoriScrollPlayfield:
lsl.w #4,d5
or.w d5,d0
move.w d0,copperListScrollPtr
- ;; move.w d0,copperListScrollPtr2
move.w d0,copperListScrollPtr_MP
move.w d0,copperListScrollPtr2_MP
rts
@@ -332,7 +334,6 @@ RenderNextForegroundFrame:
lsr.l #1,d0
and.b #$f0,d0
add.l d0,a2
- ;; move.l #FOREGROUND_PLAYAREA_HEIGHT_WORDS-1,d3 ; 8 tiles per column
move.l 0,d3
.loop:
move.l d3,d2
@@ -490,8 +491,6 @@ PostMissedTile:
BigBang:
- ;; move.w #(DMAF_SPRITE),DMACON(a6) ; turn sprites off for now
-
jsr ResetItems
move.w #0,moving
move.l #0,frameCount
@@ -505,7 +504,6 @@ BigBang:
jsr SwitchBuffers
jsr ProcessJoystick
jsr UpdatePlayerFallingAnimation
- ;; bsr Update
lea map,a2
move.l foregroundScrollX,d0
@@ -615,8 +613,10 @@ Level3InterruptHandler:
.verticalBlank:
move.w #INTF_VERTB,INTREQ(a6) ; clear interrupt bit
add.l #1,verticalBlankCount
+ lea verticalBlankCounterText,a0
+ bsr IncrementCounter
jsr SetupSpriteData
- ;; jsr P61_Music
+ jsr P61_Music
.checkCopper:
move.w INTREQR(a6),d0
and.w #INTF_COPER,d0
@@ -638,23 +638,21 @@ Message:
move.w #128,d0
move.w #11,d1
jsr DrawMaskedText8
- ;; move.w #MPANEL_COPPER_WAIT,mpanelWaitLinePtr
- ;; jsr EnableMPanel
bsr ShowMessagePanel
rts
-RenderScore:
+
+RenderCounter:
lea panel,a0
- lea scoreText,a1
- move.w #31,d0
move.w #20,d1
jsr DrawText8
rts
+
+ResetCounter:
+ move.l #"0000",(a0)
-IncrementScore:
- movem.l d0-a6,-(sp)
- lea scoreText,a0
+IncrementCounter:
add.l #3,a0
.loop:
sub.l d0,d0
@@ -668,8 +666,6 @@ IncrementScore:
bra .loop
.done
move.b d0,(a0)
- jsr RenderScore
- movem.l (sp)+,d0-a6
rts
message:
@@ -678,11 +674,18 @@ message:
align 4
-scoreText:
+frameCounterText:
dc.b "0000"
dc.b 0
align 4
+
+verticalBlankCounterText:
+ dc.b "0000"
+ dc.b 0
+
+ align 4
+
copperList:
panelCopperListBpl1Ptr:
@@ -1209,12 +1212,6 @@ deAnimIndexPattern:
dc.l 0
dc.l $ffffffff
- if 0
-greyPalette:
- include "out/foreground-grey-table.s"
- include "out/background-grey-table.s"
- endif
-
panelGreyPalette:
include "out/panel-grey-table.s"
diff --git a/028.bs/player.s b/028.bs/player.s
index feab677..aea9f37 100644
--- a/028.bs/player.s
+++ b/028.bs/player.s
@@ -11,7 +11,6 @@
xdef UpdatePlayerFallingAnimation
xdef InstallPlayerColorPalette
xdef SelectNextPlayerSprite
- xdef CalculateScore
xdef spriteLagX
xdef spriteY
@@ -21,7 +20,6 @@ PLAYER_SPRITE_DATA equ 4
PLAYER_SPRITE_FALLING_DATA equ 8
InitialisePlayer:
- move.w #0,playerMaxX
move.l playerSpriteConfig,a0
move.l PLAYER_SPRITE_DATA(a0),d0
add.l #6*PLAYER_SPRITE_VERTICAL_BYTES,d0
@@ -72,7 +70,6 @@ UpdatePlayer:
cmp.w #PLAYER_PAUSE_PIXELS,spriteR
ble .skipRight
add.w #PLAYER_MOVE_PIXELS,spriteX
- add.w #1,playerX
add.l #7*PLAYER_SPRITE_VERTICAL_BYTES,d0
move.l d0,currentSprite
@@ -124,7 +121,6 @@ UpdatePlayer:
cmp.w #PLAYER_PAUSE_PIXELS,spriteL
ble .skipLeft
sub.w #PLAYER_MOVE_PIXELS,spriteX
- sub.w #1,playerX
add.l #5*PLAYER_SPRITE_VERTICAL_BYTES,d0
move.l d0,currentSprite
.skipLeft
@@ -143,18 +139,6 @@ UpdatePlayer:
rts
-CalculateScore:
- move.w playerX,d0
- move.w playerMaxX,d1
- lsr.w #PLAYER_JUMP_SHIFT_CONVERT,d0
- cmp.w d1,d0
- ble .skip
- move.w d0,playerMaxX
- jsr IncrementScore
-.skip:
- rts
-
-
ProcessJoystick:
;; 812
;; 7 3
@@ -364,8 +348,4 @@ spriteY:
dc.w $e4
spriteYEnd:
dc.w $f5
-playerMaxX:
- dc.w 0
-playerX:
- dc.w 0
\ No newline at end of file
diff --git a/shared/base.mk b/shared/base.mk
index 47d738f..47ad010 100644
--- a/shared/base.mk
+++ b/shared/base.mk
@@ -114,15 +114,20 @@ out/bootblock.o: $(BOOTBLOCK_ASM) $(PROGRAM_BIN)
out/main.o: $(MODULE) $(EXTRA)
vasmm68k_mot $(VASM_ARGS) $(VASM_EXTRA_ARGS) $< -o $@ -I/usr/local/amiga/os-include
+ @vasmm68k_mot -depend=make $(VASM_ARGS) $(VASM_EXTRA_ARGS) $< -o $@ -I/usr/local/amiga/os-include > $*.d
out/%.o: %.s
vasmm68k_mot $(VASM_ARGS) $(VASM_EXTRA_ARGS) $< -o $@ -I/usr/local/amiga/os-include
+ @vasmm68k_mot -depend=make $(VASM_ARGS) $(VASM_EXTRA_ARGS) $< -o $@ -I/usr/local/amiga/os-include > out/$*.d
out/%.o: %.c
vc -O3 -c $< -o $@
-@vc -O3 -S $< -o out/$*.s > /dev/null 2> /dev/null
-@vc -O0 -S $< -o out/$*-noopt.s > /dev/null 2> /dev/null
+ALL_OBJS=out/main.o $(OBJS)
+ALL_DEPENDS=$(ALL_OBJS:.o=.d)
+
out/main.bin: out/main.o $(OBJS)
vlink $(LINKER_OPTIONS) -brawbin1 $< $(OBJS) -o $@
@vlink $(LINKER_OPTIONS) -brawbin1 $< $(OBJS) -M -o /tmp/main.bin | grep ", value " | cut -d " " -f3,7 | cut -d "," -f1 > ~/Projects/amiga/debugger.syms
@@ -133,3 +138,5 @@ out/shrunk.bin: $(SHRINKLER_EXE) out/main.bin
clean:
rm -rf out bin *~
+
+-include $(ALL_DEPENDS)
\ No newline at end of file