Skip to content

Commit

Permalink
printf
Browse files Browse the repository at this point in the history
  • Loading branch information
KrahJohlito committed Sep 19, 2024
1 parent b11c091 commit a0023ce
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 6 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ FRONTEND_OBJS = pad.o xparam.o fntsys.o renderman.o menusys.o OSDHistory.o syste
appsupport.o gui.o guigame.o textures.o opl.o atlas.o nbns.o httpclient.o gsm.o cheatman.o sound.o ps2cnf.o

IOP_OBJS = iomanx.o filexio.o ps2fs.o usbd.o bdmevent.o \
bdm.o bdmfs_fatfs.o usbmass_bd.o iLinkman.o IEEE1394_bd.o mx4sio_bd.o \
bdm.o bdmfs_fatfs.o usbmass_bd.o usbmass_bd_single.o iLinkman.o IEEE1394_bd.o mx4sio_bd.o \
ps2atad.o hdpro_atad.o poweroff.o ps2hdd.o xhdd.o genvmc.o lwnbdsvr.o \
ps2dev9.o smsutils.o ps2ip.o smap.o isofs.o nbns-iop.o \
sio2man.o padman.o mcman.o mcserv.o \
Expand Down Expand Up @@ -520,6 +520,9 @@ ifeq ($(DEBUG),1)
$(EE_ASM_DIR)usbmass_bd.c: $(PS2SDK)/iop/irx/usbmass_bd.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx

$(EE_ASM_DIR)usbmass_bd_single.c: modules/usbmass_bd_single.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx

$(EE_ASM_DIR)IEEE1394_bd.c: $(PS2SDK)/iop/irx/IEEE1394_bd.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx

Expand All @@ -530,6 +533,9 @@ else
$(EE_ASM_DIR)usbmass_bd.c: $(PS2SDK)/iop/irx/usbmass_bd_mini.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx

$(EE_ASM_DIR)usbmass_bd_single.c: modules/usbmass_bd_mini_single.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx

$(EE_ASM_DIR)IEEE1394_bd.c: $(PS2SDK)/iop/irx/IEEE1394_bd_mini.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx

Expand Down
2 changes: 2 additions & 0 deletions include/extern_irx.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ IMPORT_BIN2C(usbd_irx);

IMPORT_BIN2C(usbmass_bd_irx);

IMPORT_BIN2C(usbmass_bd_single_irx);

IMPORT_BIN2C(usb_pademu_irx);

IMPORT_BIN2C(xhdd_irx);
Expand Down
6 changes: 6 additions & 0 deletions modules/iopcore/cdvdman/device-bdm.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ void bdm_readSector(unsigned int lba, unsigned short int nsectors, unsigned char
{
DPRINTF("%s\n", __func__);

if (g_bd == NULL)
return;

WaitSema(bdm_io_sema);
g_bd->read(g_bd, lba, buffer, nsectors);
SignalSema(bdm_io_sema);
Expand All @@ -143,6 +146,9 @@ void bdm_writeSector(unsigned int lba, unsigned short int nsectors, const unsign
{
DPRINTF("%s\n", __func__);

if (g_bd == NULL)
return;

WaitSema(bdm_io_sema);
g_bd->write(g_bd, lba, buffer, nsectors);
SignalSema(bdm_io_sema);
Expand Down
2 changes: 2 additions & 0 deletions modules/iopcore/cdvdman/ioops.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ static int cdrom_read(iop_file_t *f, void *buf, int size)
unsigned int offset, nsectors, nbytes;
int rpos;

DPRINTF("unit=%d, name=%s!!!!!!\n", f->unit, f->device->name);

WaitSema(cdrom_io_sema);
WaitEventFlag(cdvdman_stat.intr_ef, 1, WEF_AND, NULL);

Expand Down
Binary file added modules/usbmass_bd_mini_single.irx
Binary file not shown.
Binary file added modules/usbmass_bd_single.irx
Binary file not shown.
6 changes: 3 additions & 3 deletions src/bdmsupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ static int bdmGetIconId(item_list_t *itemList)
static void bdmCleanUp(item_list_t *itemList, int exception)
{
if (itemList->enabled) {
LOG("BDMSUPPORT CleanUp\n");
printf("BDMSUPPORT CleanUp %d\n", itemList->mode);

bdm_device_data_t *pDeviceData = (bdm_device_data_t *)itemList->priv;
free(pDeviceData->bdmGames);
Expand All @@ -588,7 +588,7 @@ static void bdmShutdown(item_list_t *itemList)
{
char path[16];

LOG("BDMSUPPORT Shutdown\n");
printf("BDMSUPPORT Shutdown %d\n", itemList->mode);

// Format the device path.
// Getting the device number is only relevant per module ie usb0 and mx40 will result in both being massDeviceIndex = 0 or mass0, use mode to determine instead.
Expand All @@ -599,7 +599,7 @@ static void bdmShutdown(item_list_t *itemList)
fileXioDevctl(path, USBMASS_DEVCTL_STOP_ALL, NULL, 0, NULL, 0);

if (itemList->enabled) {
LOG("BDMSUPPORT Shutdown free data\n");
printf("BDMSUPPORT Shutdown free data %d\n", itemList->mode);

// Free device data.
free(pDeviceData->bdmGames);
Expand Down
1 change: 1 addition & 0 deletions src/opl.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ void initSupport(item_list_t *itemList, int mode, int force_reinit)
if (((force_reinit) && (mod->support->enabled)) || (startMode == START_MODE_AUTO && !mod->support->enabled)) {
mod->support->itemInit(mod->support);
moduleUpdateMenuInternal(mod, 0, 0);
printf("initSupport %d\n", mode);

ioPutRequest(IO_MENU_UPDATE_DEFFERED, &list_support[mode].support->mode); // can't use mode as the variable will die at end of execution
}
Expand Down
6 changes: 4 additions & 2 deletions src/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,10 @@ static unsigned int sendIrxKernelRAM(const char *startup, const char *mode_str,
irxptr_tab[modcount++].ptr = (void *)&usbd_irx;
}
if (modules & CORE_IRX_USB) {
irxptr_tab[modcount].info = size_usbmass_bd_irx | SET_OPL_MOD_ID(OPL_MODULE_ID_USBMASSBD);
irxptr_tab[modcount++].ptr = (void *)&usbmass_bd_irx;
//irxptr_tab[modcount].info = size_usbmass_bd_irx | SET_OPL_MOD_ID(OPL_MODULE_ID_USBMASSBD);
//irxptr_tab[modcount++].ptr = (void *)&usbmass_bd_irx;
irxptr_tab[modcount].info = size_usbmass_bd_single_irx | SET_OPL_MOD_ID(OPL_MODULE_ID_USBMASSBD);
irxptr_tab[modcount++].ptr = (void *)&usbmass_bd_single_irx;
}
if (modules & CORE_IRX_ILINK) {
irxptr_tab[modcount].info = size_iLinkman_irx | SET_OPL_MOD_ID(OPL_MODULE_ID_ILINK);
Expand Down

0 comments on commit a0023ce

Please sign in to comment.