Skip to content

Commit

Permalink
Add VERSION and REGION parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
hansbonini committed Jul 7, 2024
1 parent aa1d8eb commit 4e02740
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 49 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
- name: Prepare Build
run: |
mkdir build
echo "" > '${{github.workspace}}\build\Altered Beast (US).bin'
echo "" > '${{github.workspace}}\build\Altered Beast (US).txt'
echo "" > '${{github.workspace}}\build\Altered Beast (UE) (REV02) [!].bin'
echo "" > '${{github.workspace}}\build\Altered Beast (UE) (REV02) [!].txt'
- name: Create Screenshots directory
id: createscreenshotsdir
run: |
Expand All @@ -28,18 +28,18 @@ jobs:
run: |
$GHWORKSPACE="${{ github.workspace }}"
$GHWORKSPACE=$GHWORKSPACE.replace("\", "/")
make WORKSPACE="$GHWORKSPACE" NAME="Altered Beast" VERSION="US" ASM68K_SWITCHES="//m //p //k" build
make WORKSPACE="$GHWORKSPACE" NAME="Altered Beast" REGION="UE" VERSION=REV02 ASM68K_SWITCHES="//m //p //k" build
- name: Run Picodrive and record movie
run: |
Invoke-Expression '${{github.workspace}}\tools\RetroArch-Win64\retroarch.exe -L "${{github.workspace}}\tools\RetroArch-Win64\cores\picodrive_libretro.dll" --appendconfig="${{github.workspace}}\retroarch.cfg" --record="${{github.workspace}}\screenshots\picodrive.gif" --max-frames=2600 "${{github.workspace}}\build\Altered Beast (US).bin" --verbose' -ErrorAction SilentlyContinue
Invoke-Expression '${{github.workspace}}\tools\RetroArch-Win64\retroarch.exe -L "${{github.workspace}}\tools\RetroArch-Win64\cores\picodrive_libretro.dll" --appendconfig="${{github.workspace}}\retroarch.cfg" --record="${{github.workspace}}\screenshots\picodrive.gif" --max-frames=2600 "${{github.workspace}}\build\Altered Beast (UE) (REV02) [!].bin" --verbose' -ErrorAction SilentlyContinue
Start-Sleep -Seconds 20
- name: Run Genesis Plus Gx and record movie
run: |
Invoke-Expression '${{github.workspace}}\tools\RetroArch-Win64\retroarch.exe -L "${{github.workspace}}\tools\RetroArch-Win64\cores\genesis_plus_gx_libretro.dll" --appendconfig="${{github.workspace}}\retroarch.cfg" --record="${{github.workspace}}\screenshots\genesisplusgx.gif" --max-frames=2600 "${{github.workspace}}\build\Altered Beast (US).bin" --verbose' -ErrorAction SilentlyContinue
Invoke-Expression '${{github.workspace}}\tools\RetroArch-Win64\retroarch.exe -L "${{github.workspace}}\tools\RetroArch-Win64\cores\genesis_plus_gx_libretro.dll" --appendconfig="${{github.workspace}}\retroarch.cfg" --record="${{github.workspace}}\screenshots\genesisplusgx.gif" --max-frames=2600 "${{github.workspace}}\build\Altered Beast (UE) (REV02) [!].bin" --verbose' -ErrorAction SilentlyContinue
Start-Sleep -Seconds 20
- name: Run Blastem and record movie
run: |
Invoke-Expression '${{github.workspace}}\tools\RetroArch-Win64\retroarch.exe -L "${{github.workspace}}\tools\RetroArch-Win64\cores\blastem_libretro.dll" --appendconfig="${{github.workspace}}\retroarch.cfg" --record="${{github.workspace}}\screenshots\blastem.gif" --max-frames=2600 "${{github.workspace}}\build\Altered Beast (US).bin" --verbose' -ErrorAction SilentlyContinue
Invoke-Expression '${{github.workspace}}\tools\RetroArch-Win64\retroarch.exe -L "${{github.workspace}}\tools\RetroArch-Win64\cores\blastem_libretro.dll" --appendconfig="${{github.workspace}}\retroarch.cfg" --record="${{github.workspace}}\screenshots\blastem.gif" --max-frames=2600 "${{github.workspace}}\build\Altered Beast (UE) (REV02) [!].bin" --verbose' -ErrorAction SilentlyContinue
Start-Sleep -Seconds 20
- name: GIT Commit Build Records
if: github.event_name == 'push'
Expand Down
88 changes: 45 additions & 43 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Binaries
VERSION ?= US
REGION ?= UE
VERSION ?= REV02
NAME ?= Altered Beast
ROM_US ?= Altered Beast (USA, Europe).md
ROM_UE_REV02 ?= Altered Beast (USA, Europe).md
SHA1 ?= 38945360D824D2FB9535B4FD7F25B9AA9B32F019
WORKSPACE := .

Expand All @@ -21,55 +22,56 @@ SHA1CHECK := $(TOOLS_DIR)/checksum/sha1.go
all: extract build
build: assemble sha1
assemble:
$(ASM68K) $(ASM68K_SWITCHES) "$(NAME).asm","$(BUILD_DIR)/$(NAME) ($(VERSION)).bin",,"$(BUILD_DIR)/$(NAME) ($(VERSION)).txt"
$(ASM68K) $(ASM68K_SWITCHES) "$(NAME).asm","$(BUILD_DIR)/$(NAME) ($(REGION)) ($(VERSION)) [!].bin",,"$(BUILD_DIR)/$(NAME) ($(REGION)) ($(VERSION)) [!].txt"
sha1:
$(GO) $(SHA1CHECK) "$(BUILD_DIR)/$(NAME) ($(VERSION)).bin" $(SHA1)
$(GO) $(SHA1CHECK) "$(BUILD_DIR)/$(NAME) ($(REGION)) ($(VERSION)) [!].bin" $(SHA1)

extract: segard_decomp
segard_decomp:
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00024000.smd 0x00024000
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00024000.smd 0x00024000
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00024000.smd 0x00024000
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00027DDA.smd 0x00027DDA
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0002ACEA.smd 0x0002ACEA
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0002D1AA.smd 0x0002D1AA
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0002F1F4.smd 0x0002F1F4
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00030E70.smd 0x00030E70
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00033AAA.smd 0x00033AAA
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00040A1C.smd 0x00040A1C
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0004195C.smd 0x0004195C
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00043F22.smd 0x00043F22
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0004479E.smd 0x0004479E
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00044DA2.smd 0x00044DA2
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0004547A.smd 0x0004547A
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00045DAC.smd 0x00045DAC
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/000463DC.smd 0x000463DC
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/000470D8.smd 0x000470D8
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/000476C6.smd 0x000476C6
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00047F56.smd 0x00047F56
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00048452.smd 0x00048452
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00049020.smd 0x00049020
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0004A30E.smd 0x0004A30E
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0004AAEE.smd 0x0004AAEE
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0004B00A.smd 0x0004B00A
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0004B3A4.smd 0x0004B3A4
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0004D24E.smd 0x0004D24E
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0004D64E.smd 0x0004D64E
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00052A0A.smd 0x00052A0A
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00058562.smd 0x00058562
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00059A74.smd 0x00059A74
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00059EE8.smd 0x00059EE8
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00060B66.smd 0x00060B66
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/00060280.smd 0x00060280
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0007E370.smd 0x0007E370
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0007F4C6.smd 0x0007F4C6
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(VERSION))" $(GFX_DIR)/segard/0007F8B6.smd 0x0007F8B6
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00024000.smd 0x00024000
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00024000.smd 0x00024000
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00024000.smd 0x00024000
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00024000.smd 0x00024000
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00027DDA.smd 0x00027DDA
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0002ACEA.smd 0x0002ACEA
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0002D1AA.smd 0x0002D1AA
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0002F1F4.smd 0x0002F1F4
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00030E70.smd 0x00030E70
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00033AAA.smd 0x00033AAA
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00040A1C.smd 0x00040A1C
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0004195C.smd 0x0004195C
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00043F22.smd 0x00043F22
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0004479E.smd 0x0004479E
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00044DA2.smd 0x00044DA2
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0004547A.smd 0x0004547A
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00045DAC.smd 0x00045DAC
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/000463DC.smd 0x000463DC
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/000470D8.smd 0x000470D8
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/000476C6.smd 0x000476C6
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00047F56.smd 0x00047F56
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00048452.smd 0x00048452
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00049020.smd 0x00049020
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0004A30E.smd 0x0004A30E
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0004AAEE.smd 0x0004AAEE
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0004B00A.smd 0x0004B00A
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0004B3A4.smd 0x0004B3A4
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0004D24E.smd 0x0004D24E
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0004D64E.smd 0x0004D64E
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00052A0A.smd 0x00052A0A
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00058562.smd 0x00058562
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00059A74.smd 0x00059A74
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00059EE8.smd 0x00059EE8
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00060B66.smd 0x00060B66
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/00060280.smd 0x00060280
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0007E370.smd 0x0007E370
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0007F4C6.smd 0x0007F4C6
$(GO) $(SEGARD_DECOMP) "$(ROM_DIR)/$(ROM_$(REGION)_$(VERSION))" $(GFX_DIR)/segard/0007F8B6.smd 0x0007F8B6


test-gens:
$(TOOLS_DIR)\RetroArch-Win64\retroarch.exe --libretro=genesis_plus_gx_libretro.dll "$(BUILD_DIR)/$(NAME) ($(VERSION)).bin"
$(TOOLS_DIR)\RetroArch-Win64\retroarch.exe --libretro=genesis_plus_gx_libretro.dll "$(BUILD_DIR)/$(NAME) ($(REGION)) ($(VERSION)) [!].bin"

test-picodrive:
$(TOOLS_DIR)\RetroArch-Win64\retroarch.exe --libretro=picodrive_libretro.dll "$(BUILD_DIR)/$(NAME) ($(VERSION)).bin"
$(TOOLS_DIR)\RetroArch-Win64\retroarch.exe --libretro=picodrive_libretro.dll "$(BUILD_DIR)/$(NAME) ($(REGION)) ($(VERSION)) [!].bin"

.PHONY: all build extract test-gens

0 comments on commit 4e02740

Please sign in to comment.