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

Namco system 246/256 support #6

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
31 changes: 31 additions & 0 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,26 @@ jobs:
LICENSE_OFL.txt
*.ttf

- name: Compile ARCADE version
continue-on-error: true
run: |
make clean
make COH=1 DEBUG=1 EE_SIO=1 DISABLE_ILINK_DUMPING=1 DSNET_HOST_SUPPORT=1

- name: Upload ARCADE artifacts
if: ${{ success() }}
continue-on-error: true
uses: actions/upload-artifact@v3
with:
name: ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}-ARCADE
path: |
PS2Ident_np.elf
PS2Ident.db
README.md
changelog.txt
LICENSE_OFL.txt
*.ttf

# 'path' will create artifact with all *.elf in working directory
# you can change this

Expand Down Expand Up @@ -159,6 +179,16 @@ jobs:
run: |
7z a ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}-PS2TOOL.7z PS2Ident-PS2TOOL/*

- name: Download PS2Ident for ARCADE artifact
uses: actions/download-artifact@v3
with:
name: ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}-ARCADE
path: PS2Ident-ARCADE

- name: Prepare PS2Ident for ARCADE archive
run: |
7z a ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}-ARCADE.7z PS2Ident-ARCADE/*

- name: Download ps2idbms artifact
uses: actions/download-artifact@v3
with:
Expand All @@ -180,6 +210,7 @@ jobs:
files: |
${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}.7z
${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}-PS2TOOL.7z
${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}-ARCADE.7z
PS2IDBMS.exe
ROMIMG.exe

Expand Down
27 changes: 20 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ DSNET_HOST_SUPPORT = 0
DEBUG = 0
DISABLE_ILINK_DUMPING = 0

EE_BIN = PS2Ident_np.elf
EE_PACKED_BIN = PS2Ident.elf
BASENAME = PS2Ident

EE_BIN = $(BASENAME)_np.elf
EE_PACKED_BIN = $(BASENAME).elf

#IOP modules
EE_IOP_OBJS = SIO2MAN_irx.o MCMAN_irx.o MCSERV_irx.o PADMAN_irx.o POWEROFF_irx.o PS2DEV9_irx.o USBD_irx.o USBHDFSD_irx.o USBHDFSDFSV_irx.o SYSMAN_irx.o IOPRP_img.o
Expand All @@ -22,15 +24,26 @@ EE_CFLAGS += -D_EE -O2 -mgpopt $(EE_GPVAL)
EE_TEMP_FILES = SIO2MAN_irx.c MCMAN_irx.c MCSERV_irx.c PADMAN_irx.c POWEROFF_irx.c PS2DEV9_irx.c USBD_irx.c USBHDFSD_irx.c USBHDFSDFSV_irx.c SYSMAN_irx.c buttons.c devices.c background_img.c IOPRP_img.c

ifeq ($(DSNET_HOST_SUPPORT),1)
EE_CFLAGS += -DDSNET_HOST_SUPPORT
EE_CFLAGS += -DDSNET_HOST_SUPPORT
endif

ifeq ($(DEBUG),1)
IOP_CFLAGS += -DDEBUG
IOP_CFLAGS += -DDEBUG
EE_CFLAGS += -DDEBUG
endif

ifeq ($(EE_SIO),1)
EE_CFLAGS += -DEE_SIO
endif

ifeq ($(DISABLE_ILINK_DUMPING),1)
IOP_CFLAGS += -DDISABLE_ILINK_DUMPING
IOP_CFLAGS += -DDISABLE_ILINK_DUMPING
endif

ifneq (x$(COH),x)
IOPRP_SOURCE = irx/ioprp_coh.img
else
IOPRP_SOURCE = irx/ioprp.img
endif

%.o : %.c
Expand Down Expand Up @@ -97,7 +110,7 @@ buttons.c:
devices.c:
bin2c resources/devices.png devices.c devices

IOPRP_img.c:
bin2c irx/ioprp.img IOPRP_img.c IOPRP_img
IOPRP_img.c: $(IOPRP_SOURCE)
bin2c $< IOPRP_img.c IOPRP_img

include $(PS2SDK)/samples/Makefile.pref
1 change: 1 addition & 0 deletions OSDInit.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ static int GetConsoleRegion(void)
case 'J':
ConsoleRegion = CONSOLE_REGION_JAPAN;
}
if (romver[4] == 'T' && romver[5] == 'Z') ConsoleRegion = CONSOLE_REGION_JAPAN;

result = ConsoleRegion;
}
Expand Down
2 changes: 2 additions & 0 deletions UI.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,8 @@ int InitializeUI(int BufferFont)
result = 0;
if ((language = configGetLanguage()) >= NUM_SUPPORTED_LANGUAGES)
language = LANGUAGE_ENGLISH;

language = LANGUAGE_ENGLISH;
memset(LangStringWrapTable, 0, sizeof(LangStringWrapTable));

DEBUG_PRINTF("InitializeUI: language is: %u\n", language);
Expand Down
2 changes: 1 addition & 1 deletion dvdplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ int DVDPlayerInit(void)
ROMDVDPlayer.region = 'J';
//I guess, this would be another possibility for such a case, but not used in practice:
// ROMDVDPlayer.region = -2;

if (ConsoleROMVER[5] == 'Z' && ConsoleROMVER[4] == 'T') ROMDVDPlayer.region = 'J'; //namco arcade also lacks this
return 0;
}

Expand Down
Binary file added irx/ioprp_coh.img
Binary file not shown.
35 changes: 25 additions & 10 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,18 @@ struct SystemInitParams

static void SystemInitThread(struct SystemInitParams *SystemInitParams)
{
int id, ret;
GetRomName(SystemInitParams->SystemInformation->mainboard.romver);

SifExecModuleBuffer(MCSERV_irx, size_MCSERV_irx, 0, NULL, NULL);
SifExecModuleBuffer(PADMAN_irx, size_PADMAN_irx, 0, NULL, NULL);
id = SifExecModuleBuffer(MCSERV_irx, size_MCSERV_irx, 0, NULL, &ret);
DEBUG_PRINTF("MCSERV id:%d ret:%d\n", id, ret);
id = SifExecModuleBuffer(PADMAN_irx, size_PADMAN_irx, 0, NULL, &ret);
DEBUG_PRINTF("PADMAN id:%d ret:%d\n", id, ret);

SifExecModuleBuffer(POWEROFF_irx, size_POWEROFF_irx, 0, NULL, NULL);
SifExecModuleBuffer(PS2DEV9_irx, size_PS2DEV9_irx, 0, NULL, NULL);
id = SifExecModuleBuffer(POWEROFF_irx, size_POWEROFF_irx, 0, NULL, &ret);
DEBUG_PRINTF("POWEROFF id:%d ret:%d\n", id, ret);
id = SifExecModuleBuffer(PS2DEV9_irx, size_PS2DEV9_irx, 0, NULL, &ret);
DEBUG_PRINTF("DEV9 id:%d ret:%d\n", id, ret);

SifLoadModule("rom0:ADDDRV", 0, NULL);
SifLoadModule("rom0:ADDROM2", 0, NULL);
Expand All @@ -114,7 +119,8 @@ static void SystemInitThread(struct SystemInitParams *SystemInitParams)
LoadEROMDRV();

/* Must be loaded last, after all devices have been initialized. */
SifExecModuleBuffer(SYSMAN_irx, size_SYSMAN_irx, 0, NULL, NULL);
id = SifExecModuleBuffer(SYSMAN_irx, size_SYSMAN_irx, 0, NULL, &ret);
DEBUG_PRINTF("SYSMAN id:%d ret:%d\n", id, ret);

SysmanInit();

Expand Down Expand Up @@ -145,6 +151,7 @@ static void usb_callback(void *packet, void *common)

int main(int argc, char *argv[])
{
int id, ret;
static SifCmdHandlerData_t SifCmdbuffer;
static struct SystemInformation SystemInformation;
void *SysInitThreadStack;
Expand Down Expand Up @@ -195,15 +202,23 @@ int main(int argc, char *argv[])
sbv_patch_enable_lmb();
sbv_patch_fileio();

SifExecModuleBuffer(SIO2MAN_irx, size_SIO2MAN_irx, 0, NULL, NULL);
SifExecModuleBuffer(MCMAN_irx, size_MCMAN_irx, 0, NULL, NULL);
id = SifExecModuleBuffer(SIO2MAN_irx, size_SIO2MAN_irx, 0, NULL, &ret);
DEBUG_PRINTF("SIO2MAN id:%d ret:%d\n", id, ret);
id = SifExecModuleBuffer(MCMAN_irx, size_MCMAN_irx, 0, NULL, &ret);
DEBUG_PRINTF("MCMAN id:%d ret:%d\n", id, ret);

SifSetCmdBuffer(&SifCmdbuffer, 1);
SifAddCmdHandler(0, &usb_callback, NULL);

SifExecModuleBuffer(USBD_irx, size_USBD_irx, 0, NULL, NULL);
SifExecModuleBuffer(USBHDFSD_irx, size_USBHDFSD_irx, 0, NULL, NULL);
SifExecModuleBuffer(USBHDFSDFSV_irx, size_USBHDFSDFSV_irx, 0, NULL, NULL);
id = SifExecModuleBuffer(USBD_irx, size_USBD_irx, 0, NULL, &ret);
DEBUG_PRINTF("USBD id:%d ret:%d\n", id, ret);
id = SifExecModuleBuffer(USBHDFSD_irx, size_USBHDFSD_irx, 0, NULL, &ret);
DEBUG_PRINTF("USBHDFSD id:%d ret:%d\n", id, ret);
id = SifExecModuleBuffer(USBHDFSDFSV_irx, size_USBHDFSDFSV_irx, 0, NULL, &ret);
DEBUG_PRINTF("USBHDFSDFSV id:%d ret:%d\n", id, ret);

id = SifLoadStartModule("rom0:CDVDFSV", 0, NULL, &ret);
DEBUG_PRINTF("rom0:CDVDFSV id:%d ret:%d\n", id, ret);

sceCdInit(SCECdINoD);
cdInitAdd();
Expand Down
11 changes: 11 additions & 0 deletions main.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
//#define DEBUG 1
#ifdef DEBUG
#ifdef EE_SIO
#include <sio.h>
#define DEBUG_PRINTF(args...) sio_printf(args)
#else
#define DEBUG_PRINTF(args...) printf(args)
#endif

#else
#define DEBUG_PRINTF(args...)
#endif

#ifdef COH
#define PS2IDENT_VERSION "0.850 - COH"
#else
#define PS2IDENT_VERSION "0.850"
#endif

Loading