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

jdredd/jdreddb stuck on red screen at boot #1208

Open
StormedBubbles opened this issue Nov 29, 2021 · 26 comments
Open

jdredd/jdreddb stuck on red screen at boot #1208

StormedBubbles opened this issue Nov 29, 2021 · 26 comments

Comments

@StormedBubbles
Copy link

Hello,

On Raspberry Pi 4 running RetroPie, jdredd/jdreddb (the Judge Dredd lightgun game) launches to a red screen and stays there indefinitely. For reference on how it should load, the version in the .160 romset does open in lr-mame2015.

@ghost
Copy link

ghost commented Nov 29, 2021

ist is a chd game ? can you post a debug log as well if possible. The reason for this is the bios is handled as a nodump which isint good in any way do you have acpsx.zip?

edit this game has protection thats not emulated unless arcadez or anyone updates it will be a no go. the used to be an information screen that came up when this happened but it was removed for some reason.

@StormedBubbles
Copy link
Author

StormedBubbles commented Nov 29, 2021

Thank you for your response and the clarification. Yes, this game requires a CHD. I don't have the acpsx.zip file. Would that be needed if/when this were to work someday? I generated a verbose log on my pi and did see that warning about protection:

[libretro WARN] [MAME 2003+] 

game does not work, unimplemented protection

Should I change the title to better reflect the issue?

EDIT: formatting

@StormedBubbles
Copy link
Author

@arcadez2003 @mahoneyt944 Is support for this game's protection something that could be added / something that would interest either of you?

@mahoneyt944
Copy link
Collaborator

The driver that supports these is a long way from working so very doubtful. Though we do support a prototype version in another driver, rom "jdreddp", which is playable.

@StormedBubbles
Copy link
Author

Ah, I see. Thanks. The unfortunate thing is that jdreddp is a different game. It's a fighting/beat-em-up game kind of like Pit-Fighter, while jdredd/jdreddb is a lightgun game.

@mahoneyt944
Copy link
Collaborator

Ah ok. Yeah probably a no go here.

@mahoneyt944
Copy link
Collaborator

@grant2258 I was looking through the code and found this. Is there more protection outside of this?

/*************************************
*
* Judge Dredd protection
*
*************************************/
static const UINT8 jdredd_prot_values_10740[] =
{
0x14,0x2A,0x15,0x0A,0x25,0x32,0x39,0x1C,
0x2E,0x37,0x3B,0x1D,0x2E,0x37,0x1B,0x0D,
0x26,0x33,0x39,0x3C,0x1E,0x2F,0x37,0x3B,
0x3D,0x3E,0x3F,0x1F,0x2F,0x17,0x0B,0x25,
0x32,0x19,0x0C,0x26,0x33,0x19,0x2C,0x16,
0x2B,0x15,0x0A,0x05,0x22,0x00
};
static const UINT8 jdredd_prot_values_13240[] =
{
0x28
};
static const UINT8 jdredd_prot_values_76540[] =
{
0x04,0x08
};
static const UINT8 jdredd_prot_values_77760[] =
{
0x14,0x2A,0x14,0x2A,0x35,0x2A,0x35,0x1A,
0x35,0x1A,0x2D,0x1A,0x2D,0x36,0x2D,0x36,
0x1B,0x36,0x1B,0x36,0x2C,0x36,0x2C,0x18,
0x2C,0x18,0x31,0x18,0x31,0x22,0x31,0x22,
0x04,0x22,0x04,0x08,0x04,0x08,0x10,0x08,
0x10,0x20,0x10,0x20,0x00,0x20,0x00,0x00,
0x00,0x00,0x01,0x00,0x01,0x02,0x01,0x02,
0x05,0x02,0x05,0x0B,0x05,0x0B,0x16,0x0B,
0x16,0x2C,0x16,0x2C,0x18,0x2C,0x18,0x31,
0x18,0x31,0x22,0x31,0x22,0x04,0x22,0x04,
0x08,0x04,0x08,0x10,0x08,0x10,0x20,0x10,
0x20,0x00,0x00
};
static const UINT8 jdredd_prot_values_80020[] =
{
0x3A,0x1D,0x2E,0x37,0x00,0x00,0x2C,0x1C,
0x39,0x33,0x00,0x00,0x00,0x00,0x00,0x00
};
static const UINT8 *jdredd_prot_table;
static UINT8 jdredd_prot_index;
static UINT8 jdredd_prot_max;
static WRITE16_HANDLER( jdredd_prot_w )
{
/*logerror("%08X:jdredd_prot_w(%04X,%04X)\n", activecpu_get_previouspc(), offset*16, data);*/
switch (offset)
{
case TOWORD(0x10740):
jdredd_prot_index = 0;
jdredd_prot_table = jdredd_prot_values_10740;
jdredd_prot_max = sizeof(jdredd_prot_values_10740);
/*logerror("-- reset prot table 10740\n");*/
break;
case TOWORD(0x13240):
jdredd_prot_index = 0;
jdredd_prot_table = jdredd_prot_values_13240;
jdredd_prot_max = sizeof(jdredd_prot_values_13240);
/*logerror("-- reset prot table 13240\n");*/
break;
case TOWORD(0x76540):
jdredd_prot_index = 0;
jdredd_prot_table = jdredd_prot_values_76540;
jdredd_prot_max = sizeof(jdredd_prot_values_76540);
/*logerror("-- reset prot table 76540\n");*/
break;
case TOWORD(0x77760):
jdredd_prot_index = 0;
jdredd_prot_table = jdredd_prot_values_77760;
jdredd_prot_max = sizeof(jdredd_prot_values_77760);
/*logerror("-- reset prot table 77760\n");*/
break;
case TOWORD(0x80020):
jdredd_prot_index = 0;
jdredd_prot_table = jdredd_prot_values_80020;
jdredd_prot_max = sizeof(jdredd_prot_values_80020);
/*logerror("-- reset prot table 80020\n");*/
break;
}
}
static READ16_HANDLER( jdredd_prot_r )
{
data16_t result = 0xffff;
if (jdredd_prot_table && jdredd_prot_index < jdredd_prot_max)
result = jdredd_prot_table[jdredd_prot_index++] << 9;
/*logerror("%08X:jdredd_prot_r(%04X) = %04X\n", activecpu_get_previouspc(), offset*16, result);*/
return result;
}
#if ENABLE_ALL_JDREDD_LEVELS
static data16_t *jdredd_hack;
static READ16_HANDLER( jdredd_hack_r )
{
if (activecpu_get_pc() == 0xFFBA7EB0)
{
fprintf(stderr, "jdredd_hack_r\n");
return 0;
}
return jdredd_hack[offset];
}
#endif

@ghost
Copy link

ghost commented Dec 15, 2021

havent even looked at this game to be honest not sure about it all

@mahoneyt944
Copy link
Collaborator

I'm wondering if it just wasn't hooked in fully. Or maybe it's incomplete.

@ghost
Copy link

ghost commented Dec 15, 2021

I dont have any chds for this core at all look up the driver history on it night give you some pointers

@mahoneyt944
Copy link
Collaborator

Looks like this is setup for the prototype version so might not be it

DRIVER_INIT( jdreddp )
{
/* common init */
init_tunit_generic(SOUND_ADPCM_LARGE);
/* looks like the watchdog needs to be disabled */
install_mem_write16_handler(0, TOBYTE(0x01d81060), TOBYTE(0x01d8107f), MWA16_NOP);
/* protection */
install_mem_read16_handler (0, TOBYTE(0x1b00000), TOBYTE(0x1bfffff), jdredd_prot_r);
install_mem_write16_handler(0, TOBYTE(0x1b00000), TOBYTE(0x1bfffff), jdredd_prot_w);
/* sound chip protection (hidden RAM) */
install_mem_write_handler(1, 0xfbcf, 0xfbf9, MWA_RAM);
/* make sure that unmapped memory returns $ffff (necessary to work around bug) */
memory_set_unmap_value(0xffffffff);
#if ENABLE_ALL_JDREDD_LEVELS
/* how about the final levels? */
jdredd_hack = install_mem_read16_handler(0, TOBYTE(0xFFBA7FF0), TOBYTE(0xFFBA7FFf), jdredd_hack_r);
#endif
/* no obvious speedups */
}

@ghost
Copy link

ghost commented Dec 15, 2021

do you have the acpsx.zip because rom managers wont ask for it and mame will happily skip it if you have a link to the chd ill have a look

@mahoneyt944
Copy link
Collaborator

mahoneyt944 commented Dec 15, 2021

The chd is on archive.org, there's a big change over in .80 which gets built up through 120s.

Our driver is very premature. It would be possible to update our driver to take these new changes..... though I haven't looked to see if these changes also require additional changes.

I may take a stab at it this weekend.

zn.c

@ghost
Copy link

ghost commented Dec 15, 2021

Problem is I don't want to dl 32 gigs for 1 children frustrating that is

@mahoneyt944
Copy link
Collaborator

You can download them individually

@ghost
Copy link

ghost commented Dec 15, 2021

cheers

@mahoneyt944
Copy link
Collaborator

mahoneyt944 commented Dec 15, 2021

My plan is to port to .80 first then back port all the nodumps found through 120s. And see how that goes. Here's a quick slap in on 80:
https://github.com/libretro/mame2003-plus-libretro/compare/Zn

Need to separate the zn_map though and look into the changes to the init banking plus other missing stuff.

@ghost
Copy link

ghost commented Dec 15, 2021

i have mame084 ported to libretro here in case arcadez ever wanted to use it s his xbox and libretro porting would be less work alas its unused but you can test on this core use the wip branch, Will save you some time before porting it over if you choose too

https://github.com/grant2258/ame084/commits/wip

I can confrim teh game does boot in mame084

@mahoneyt944
Copy link
Collaborator

mahoneyt944 commented Dec 15, 2021

That's odd, 84 says it boots without guns, which I assume is a input hook up or nvram calibration. If we can't get it to boot in 84 I might as well stop now because 80 hits hard with changes and it only spirals from there.
https://github.com/grant2258/ame084/blob/53144949ac6f75afa84350045fb6bfcbfe4879a8/src/drivers/zn.c#L103

@ghost
Copy link

ghost commented Dec 15, 2021

I posted above it does boot on 084 really is slow even on a ryzen 3 laptop though

@mahoneyt944
Copy link
Collaborator

Oh my bad. Yeah I imagine it's very taxing

@mahoneyt944
Copy link
Collaborator

Well looking into it, I think it's going to be more work than I want to take on. Looks like this update digs it's roots in.

@arcadez2003
Copy link
Collaborator

i have mame084 ported to libretro here in case arcadez ever wanted to use it s his xbox and libretro porting would be less work alas its unused but you can test on this core use the wip branch, Will save you some time before porting it over if you choose too

https://github.com/grant2258/ame084/commits/wip

I can confrim teh game does boot in mame084

With all due respect bigman as i've no doubt said many times before i dont have the dev setup to compile
libretro cores that's my fault for being too lazy to learn right enough, so i've doubled my workload more or less
as i need to backport twice once to 72 then across here.

In life there is always a penalty for being lazy you buy grated cheese they steal 50g off ya you buy mashed
potatoes you always get far less vs a full bag it always works out cheaper to do it yourself,

However in my defense i think it right to point out i never asked ya to create that core :)

@arcadez2003
Copy link
Collaborator

Oh my bad. Yeah I imagine it's very taxing

Even using the 78 core which is as well all know faster by default the games wont perform all that much better
but it's dependent on the device and what power it has under the hood.

@StormedBubbles
Copy link
Author

Hi, all.

Thanks so much for looking further into this. While I am unable to offer help in the way of coding, I can convey my experiences with this game in the various cores that I have tried within RetroPie on a Raspberry Pi 4B. All of this is with the proper ROM, CHD, and BIOS versions placed in the appropriate places. I figured I'd drop this here in case anyone else reads through this discussion while searching about this game. In short, lr-mame2015 plays this game the best on a Raspberry Pi 4B, as of this post.

advmame (.106)

  • Pros: game launches; appears to run at full speed; emulator supports multiple mice
  • Cons: no sound; cutscenes completely missing; general stability issues with this core on Raspberry Pi 4B

lr-mame2010 (.139)

  • Pros: game launches
  • Cons: only runs at about 67% speed; core lacks full lightgun support

lr-mame2015 (???)

  • Pros: game launches; runs at full speed
  • Cons: core lacks full lightgun support

lr-mame2016 (.174)

  • Game not recognized. I get dropped back to my EmulationStation front end.

lr-mame (.235)

  • Game not recognized. I get dropped into the MAME UI with a "missing files" error

Finally, in a funny "Charlie Brown trying to kick the ball" turn of events, the PlayStation version has compatibility issues (freezing, crashing) on lr-pcsx-rearmed, the only core I have come across with full lightgun support that launches the game.

@ghost
Copy link

ghost commented Dec 15, 2021

@arcadez2003 didnt say you asked me to do wasnt that big of a job in all honesty mame is very portable as is. Like you I dont really use RA unless im coding something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants