fixed workbench compatibility issues

This commit is contained in:
alpine9000 2016-05-30 20:19:00 +10:00
parent 10422e9a50
commit d7f32042f0
12 changed files with 110 additions and 50 deletions

View File

@ -22,7 +22,6 @@ IMAGES=foreground.png \
panel.png \
pickups.png \
mpanel.png \
mpanelOrig.png \
sprite_pig-0.png \
sprite_pig-1.png \
sprite_pig-2.png \
@ -127,10 +126,6 @@ out/countdown.bin: assets/countdown.png
out/mpanel.bin: assets/mpanel.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/mpanel --use-palette=assets/mpanel.pal
out/mpanelOrig.bin: out/mpanelOrig.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/mpanelOrig --use-palette=assets/mpanel.pal
out/sprite_pig-%.bin: out/sprite_pig-%.png
$(IMAGECON) --input $< $(IMAGECON_ARGS) --colors 4 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-palette --output-png --output-copperlist --output out/sprite_pig-$* --palette-offset 16 --use-palette=assets/pig.pal
@ -301,6 +296,8 @@ bin/BlockySkies: $(ALL_OBJS)
vlink -hunkattr DATA=2 -hunkattr CODE=2 -hunkattr .text=2 -hunkattr .code=2 -hunkattr .data=2 -hunkattr .noload=2 -hunkattr .bss=2 $(ALL_OBJS) -o $@
cp $@ ~/A1200
cp $@ ~/A4000
cp assets/BlockySkies.info ~/A1200
cp assets/BlockySkies.info ~/A4000
ls -lh bin/BlockySkies
-mkdir BlockySkies
cp assets/BlockySkiesDrawer.info BlockySkies.info

View File

@ -113,6 +113,7 @@ DetectDownBeeCollisions:
ble .skip
bsr DeleteItemSprite
add.l #3*4,a7 ; dirty hack - unwind the call stack
jmp BigBang
.skip:
rts
@ -159,6 +160,7 @@ DetectUpBeeCollisions:
ble .skip
bsr DeleteItemSprite
add.l #3*4,a7 ; dirty hack - unwind the call stack
jmp BigBang
.skip:
rts

View File

@ -1,21 +1,4 @@
BOB_X equ 4
BOB_Y equ 8
BOB_DX equ 12
BOB_SOURCE_ADDRESS equ 16
BOB_MASK_ADDRESS equ 20
BOB_SAVE_BUFFER_ADDRESS equ 24
BOB_LAST_DEST_ADDRESS equ 32
BOB_BLIT_SIZE equ 40
BOB_BLIT_HEIGHT equ 32
BOB_BLIT_WIDTH_WORDS equ 3
BOB_BLIT_WIDTH_BYTES equ BOB_BLIT_WIDTH_WORDS*2
BOB_MODULO equ BACKGROUND_TILEMAP_WIDTH_BYTES-BOB_BLIT_WIDTH_BYTES
BOB_SHIFT_CONVERT equ 4
BOB_SAVE_SIZE equ BOB_BLIT_WIDTH_BYTES*SCREEN_BIT_DEPTH*BOB_BLIT_HEIGHT
BOB_IDLE_X equ (-31<<BOB_SHIFT_CONVERT)
BOB_BALLOON_DX equ 2<<BOB_SHIFT_CONVERT
BOB_CLOUD_DX equ 12
;; BLITTER_OBJECT
;; index,startX,y,dx,mapLine,blitHeight

View File

@ -125,4 +125,26 @@ COUNTDOWN_BITMAP_WIDTH equ 80
COUNTDOWN_BLIT_WIDTH_BYTES equ 2
COUNTDOWN_BLIT_WIDTH_WORDS equ 1
LIVES_PLAYER_BONUS equ 5000
LIVES_PLAYER_BONUS equ 5000
BOB_X equ 4
BOB_Y equ 8
BOB_DX equ 12
BOB_SOURCE_ADDRESS equ 16
BOB_MASK_ADDRESS equ 20
BOB_SAVE_BUFFER_ADDRESS equ 24
BOB_LAST_DEST_ADDRESS equ 32
BOB_BLIT_SIZE equ 40
BOB_BLIT_HEIGHT equ 32
BOB_BLIT_WIDTH_WORDS equ 3
BOB_BLIT_WIDTH_BYTES equ BOB_BLIT_WIDTH_WORDS*2
BOB_MODULO equ BACKGROUND_TILEMAP_WIDTH_BYTES-BOB_BLIT_WIDTH_BYTES
BOB_SHIFT_CONVERT equ 4
BOB_SAVE_SIZE equ BOB_BLIT_WIDTH_BYTES*SCREEN_BIT_DEPTH*BOB_BLIT_HEIGHT
BOB_IDLE_X equ (-31<<BOB_SHIFT_CONVERT)
BOB_BALLOON_DX equ 2<<BOB_SHIFT_CONVERT
BOB_CLOUD_DX equ 12
BOB_MAX_BOBS equ 4
BOB_TOTAL_SAVE equ BOB_SAVE_SIZE*BOB_MAX_BOBS*2

View File

@ -11,6 +11,7 @@
xdef pathwayRenderPending
xdef pathwayPlayerTileAddress
xdef pathwayLastSafeTileAddress
xdef pathwayFadeCount
xdef pathwayClearPending
xdef pathwayMapPtr
@ -20,6 +21,7 @@
xdef foregroundScrollX
xdef foregroundBitplanes1
xdef foregroundPlayerTileAddress
xdef foregroundLastSafeTileAddress
xdef foregroundMapPtr
xdef foregroundTilemap
xdef foregroundScrollPixels
@ -163,7 +165,7 @@ SetupBoardLoop:
jsr SwitchBuffers
move.l foregroundScrollX,d0
move.w #1,moving
bsr Update
bsr Update
jsr RenderNextForegroundFrame
jsr PrepareItemSpriteData
@ -263,6 +265,13 @@ PostCheckPlayerMiss:
bra GameLoop
QuitGame:
jsr WaitVerticalBlank
jsr PlayNextSound
IntsOff
jsr WaitVerticalBlank
movem.l d0-a6,-(sp)
jsr P61_End
movem.l (sp)+,d0-a6
rts
Update:
@ -331,20 +340,23 @@ InitialiseNewGame:
GameOver:
jsr RegisterHighScore
sub.l #4,nextLevelInstaller
lea gameOverMessage,a1
jsr Message
jsr WaitForJoystick
jsr RestorePanel
jsr RegisterHighScore
jmp ShowHighScore
TutorialOver:
jsr RestorePanel
add.l #8,sp ; dirty hack - unwind the call stack
move.l #levelInstallers,nextLevelInstaller
move.l #"0001",levelCounter
lea tutorialOverMessage,a1
jsr Message
jsr WaitForJoystick
jsr RestorePanel
bra MainMenu
InstallNextLevel:
@ -370,11 +382,9 @@ LevelComplete:
jsr SelectNextPlayerSprite
move.l levelCompleteMessage,a1
jsr Message
bsr InstallNextLevel
jsr WaitForJoystick
jsr RestorePanel
jsr ResetItems
bra Reset
@ -872,7 +882,7 @@ BlitCountdown:
;; palette
Level 91,"STAY ON THE PATHWAYS!",100,2*2,12,10,"WELL DONE!",A,21,0
Level 92,"COLLECT COINS!",100,2*2,12,10,"NEXT COLLECT AN ARROW...",A,21,0
Level 93,"PRESS FIRE TO ACTIVATEE THE ARROW",100,2*2,12,10,"WHOOHOO",A,21,0
Level 93,"PRESS FIRE TO ACTIVATE THE ARROW",100,2*2,12,10,"WHOOHOO",A,21,0
Level 94,"WATCH OUT FOR BEES!",100,2*2,12,10,"LOL - BEES",A,21,0
Level 95,"REMEMBER THE PATHWAYS BEFORE THEY FADE!",75,2*2,12,10,"CLOCKS WILL STOP THE BOARD MOVING",A,21,0
Level 96,"PRESS FIRE TO ACTIVATE THE CLOCK",200,2*2,12,10,"EYES WILL UNHIDE THE BOARD",A,21,0
@ -1019,13 +1029,13 @@ nextLevelInstaller:
tutorialLevelInstallers:
dc.l InstallLevel91
endTutorialLevelInstaller:
dc.l InstallLevel92
dc.l InstallLevel93
dc.l InstallLevel94
dc.l InstallLevel95
dc.l InstallLevel96
dc.l InstallLevel97
endTutorialLevelInstaller:
dc.l 0
panelFade:
include "out/panelFade.s"
@ -1084,6 +1094,10 @@ pathwayRenderPending:
dc.w 0
pathwayPlayerTileAddress:
dc.l 0
pathwayLastSafeTileAddress:
dc.l 0
foregroundLastSafeTileAddress:
dc.l 0
pathwayClearPending:
dc.w 0
foregroundScrollX:

View File

@ -22,7 +22,7 @@ ShowHighScore:
lea CUSTOM,a6
jsr ReloadSplashScreen
bsr HighlighScore
bsr HighlightScore
lea splash,a0
add.l #(150*40*5)+((320-96)/16),a0
@ -144,7 +144,7 @@ AddHighScore:
.skip:
rts
HighlighScore:
HighlightScore:
lea firstTopColor,a0
lea highScores,a1
move.l __score,d0

View File

@ -6,6 +6,7 @@ InstallLevel\1:
move.l #level\1PathwayMap,startPathwayMapPtr
move.l #level\1ForegroundMap,foregroundMapPtr
move.l #level\1PathwayMap,pathwayMapPtr
move.l #level\1PathwayMap+8,pathwayLastSafeTileAddress
move.l #palette\8_playAreaPalette,playAreaPalette
move.l #palette\8_playareaFade,playareaFade
move.l #palette\8_flagsFade,flagsFade
@ -33,7 +34,7 @@ level\1ForegroundMapEnd:
dc.w $FFFF
dc.w $FFFF
dc.w $FFFF
dc.w $FFFF
dc.w $FFFF
level\1PathwayMap:
include "out/level\1_pathway-map.s"
level\1ItemsMap:

View File

@ -1,3 +1,10 @@
IntsOff: macro
move #$7fff,INTENA(a6) ; disable all interrupts
endm
IntsOn: macro
move.w #(INTF_SETCLR|INTF_VERTB|INTF_INTEN),INTENA(a6)
endm
PlaySound: macro
if SFX=1
jsr Play\1Sound

View File

@ -4,8 +4,8 @@
xdef ClearPathway
RenderPathway:
move.l pathwayPlayerTileAddress,d5
andi.w #$fff0,d5 ; point the address to the last tile of the previous column
move.l pathwayLastSafeTileAddress,d5
;; add.l #2,d5
move.l d5,a4
moveq #0,d5
@ -31,7 +31,7 @@ RenderPathway:
beq .dontBlit
lea foregroundTilemap,a1
add.w d0,a1 ; source tile
adda.w d0,a1 ; source tile
move.l a3,a0 ; move.l foregroundOffscreen,a0
adda.w d3,a0
@ -67,8 +67,7 @@ RenderPathway:
ClearPathway:
sub.w #1,pathwayClearPending
move.l foregroundPlayerTileAddress,d7
andi.w #$fff0,d7 ; address of the last tile in the previous column
move.l foregroundLastSafeTileAddress,d7
moveq #0,d5 ; x index
lea foregroundTilemap,a3

View File

@ -3,6 +3,34 @@
xdef InitialiseMessagePanel
xdef ShowMessagePanel
xdef HideMessagePanel
xdef SavePanel
xdef RestorePanel
SavePanel:
movem.l d0-a6,-(sp)
move.w #(32*4)<<6|(8),d0
lea mpanel,a0
move.l #splash+BOB_TOTAL_SAVE,a2
add.l #(40*4*8),a0
jsr SimpleBlit
WaitBlitter
move.w #1,panelSaved
movem.l (sp)+,d0-a6
rts
RestorePanel:
cmp.w #0,panelSaved
beq .skip
movem.l d0-a6,-(sp)
move.w #(32*4)<<6|(8),d0
move.l #splash+BOB_TOTAL_SAVE,a0
lea mpanel,a2
add.l #(40*4*8),a2
jsr SimpleBlit
WaitBlitter
movem.l (sp)+,d0-a6
.skip:
rts
Message:
;; a0 - bitplane
@ -18,13 +46,8 @@ Message:
bra .loop
.lengthComplete:
bsr SavePanel
move.w d0,d1
move.w #(32*4)<<6|(8),d0
lea mpanelOrig,a0
lea mpanel,a2
add.l #(40*4*8),a2
jsr SimpleBlit
lea mpanel,a0
move.w d1,d0
move.w #11,d1
@ -43,6 +66,7 @@ HideMessagePanel:
jsr WaitVerticalBlank
lea copperList,a0
move.l a0,COP1LC(a6)
bsr RestorePanel
rts
InitialiseMessagePanel:
@ -51,7 +75,7 @@ InitialiseMessagePanel:
jsr PokePanelBitplanePointers
rts
panelSaved:
dc.w 0
mpanel:
incbin "out/mpanel.bin"
mpanelOrig:
incbin "out/mpanelOrig.bin"
incbin "out/mpanel.bin"

View File

@ -2,7 +2,9 @@
xdef StartMusic
p61Inited:
dc.w 0
StartMusic:
.wait: ; In case there is currently fade in progress
jsr WaitVerticalBlank
@ -28,9 +30,15 @@ StartMusic:
move.w d0,currentModule
movem.l d0-a6,-(sp)
move.w d0,-(sp)
cmp.w #0,p61Inited
beq .skipEnd
movem.l d0-a6,-(sp)
IntsOff
jsr P61_End
move.w (sp)+,d0
IntsOn
movem.l (sp)+,d0-a6
move.w #0,p61Inited
.skipEnd:
lea module,a0
lea modules,a1
lsl.w #3,d0
@ -44,6 +52,7 @@ StartMusic:
moveq #0,d0
move.w #64,P61_Master
jsr P61_Init
move.w #1,p61Inited
movem.l (sp)+,d0-a6
.skip:
rts

View File

@ -397,6 +397,8 @@ CheckPlayerMiss:
bra .dontClearPathway
.clearPathway:
move.w #2,pathwayClearPending
move.l a2,pathwayLastSafeTileAddress
move.l a3,foregroundLastSafeTileAddress
move.l playerXColumn,playerXColumnLastSafe