Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OPL TEST ISO]: add variant for 8mb IOP machines #1309

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/OPLTestISO.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ jobs:
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git fetch --prune --unshallow

- name: make ISO (8mb IOP RAM support)
run: |
cd labs/opltestiso/
make clean iso SUPPORT_8MB_IOP_RAM=1 ISO=TEST_OPL.00.OPLtester_v0.5_IOPRAM_8mb.iso

- name: make ISO
run: |
cd labs/opltestiso/
make iso
make clean iso

- name: Upload release artifact ISO
uses: actions/upload-artifact@v3
Expand Down
15 changes: 11 additions & 4 deletions labs/opltestiso/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
ISO=TEST_OPL.00.OPLtester_v0.5.iso
ISO ?= TEST_OPL.00.OPLtester_v0.5.iso

SUPPORT_8MB_IOP_RAM ?= 0

ifeq ($(SUPPORT_8MB_IOP_RAM), 1)
$(info -- building test iso with support for 8mb IOP RAM machines)
IOPFLAGS += "IOP_MEM_SIZE=8"
endif

all:
$(MAKE) -C iop/freeram all
$(MAKE) -C iop/freeram all $(IOPFLAGS)
$(MAKE) -C ee all

clean:
$(MAKE) -C iop/freeram clean
$(MAKE) -C iop/freeram clean $(IOPFLAGS)
$(MAKE) -C ee clean
rm -f *.iso
rm -f $(ISO)
rm -f iso/*.BIN
rm -f iso/TEST_OPL.00

Expand Down
6 changes: 5 additions & 1 deletion labs/opltestiso/iop/freeram/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
IOP_BIN = freeram.irx
IOP_BIN = freeram.irx
IOP_OBJS = main.o imports.o

IOP_CFLAGS += -Wall -Werror

ifeq ($(IOP_MEM_SIZE), 8)
IOP_CFLAGS += -DIOP_MEM_8MB
endif

all: $(IOP_BIN)

clean:
Expand Down
11 changes: 9 additions & 2 deletions labs/opltestiso/iop/freeram/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
#include <sysmem.h>

#define MODNAME "freeram"
IRX_ID(MODNAME, 1, 1);

#ifdef IOP_MEM_8MB // DESR, DTL-T and namco system 256
#define MIDDLE_OF_RAM (4 * 1024 * 1024)
IRX_ID(MODNAME, 1, 8);
#else
#define MIDDLE_OF_RAM (1 * 1024 * 1024)
IRX_ID(MODNAME, 1, 2);
#endif

/*
* In order to test the amount of free IOP RAM available, this module should be
Expand All @@ -14,7 +21,7 @@ IRX_ID(MODNAME, 1, 1);

int _start()
{
vu32 *pfreeram = (vu32 *)(1 * 1024 * 1024);
vu32 *pfreeram = (vu32 *)MIDDLE_OF_RAM;
*pfreeram = QueryTotalFreeMemSize();
return MODULE_NO_RESIDENT_END;
}
Loading