Dio's Jag Emu for the Mac

Inane baanter or words of wisdom - you decide...
Post Reply
User avatar
gravy
Sheepie Whore
Sheepie Whore
Posts: 19572
Joined: Wed May 01, 2002 1:28 pm 0
Location: The Other Place

Post by gravy »

Dio wrote:Naah. T2K only runs one DSP program and it's basically the same thing six times, so it was easy to convert it to a screen-and-a-half of C code. So it's a by-hand-static-rec rather than a dynarec.

In some ways I was very surprised how much faster it wasn't, in fact. I expected it to be well over 10x faster but even to get the 8x gain I had to put a special back-door access to the DSP's sram. The memory subsystem is the thing that's really killing it it seems, if I put in another backdoor for the sample reads it would be faster still but I couldn't be bothered to check the memory type of everything :).

Much better than a kick in the teeth though - particularly for slow systems, since the cycles required for the sound is a constant no matter how much it throttles.
Ah nice one :D Yeah that'd give the cycles needed back. How do you check for it being the T2k ROM?
User avatar
Firefox
Sheepie Whore
Sheepie Whore
Posts: 11412
Joined: Fri Apr 26, 2002 6:15 pm 0
Location: Sheffield

Post by Firefox »

gravy wrote:
Firefox wrote:
gravy wrote:That would make the emu run at full tilt on a PPC but be a bit of work.
Is there not a PowerPC equivalent of Starscream/Cyclone? I was reading this article this afternoon which explains why PowerPCs are the mutt's nuts for emulating 68000s, mainly because you can keep all the emulated 68000 registers in real PowerPC registers and still have plenty left over.
Prolly but the musashi core doesn't ever use that much time up. ISTR it was around 9% on a G4 so double the speed is only going to get me 4.5% back
Yeah, fair enough. Don't mind me, I've just got a bee in my bonnet about 68000 emulation today. :)
"I am a very considerate person. If I want to go out all night on my miniature golf course and shoot lizards, well, no reason to keep the neighbours awake..."
User avatar
Dio
Sheepie Whore
Sheepie Whore
Posts: 18887
Joined: Mon May 31, 2004 1:08 pm 0
Location: Newcastle UK

Post by Dio »

gravy wrote:Ah nice one :D Yeah that'd give the cycles needed back. How do you check for it being the T2k ROM?
A really shit hash function :D.

Nicest bit is you can toggle it on and off and it sounds just the same. I was quite pleased with that. (Well, you can now it's stopped sounding like the theme tune was being gargled by a Vogon, which, as I predicted from the start, was a signed/unsigned mismatch but took an hour to bloody find the offending instruction last night).
User avatar
gravy
Sheepie Whore
Sheepie Whore
Posts: 19572
Joined: Wed May 01, 2002 1:28 pm 0
Location: The Other Place

Post by gravy »

Dio wrote:
gravy wrote:Ah nice one :D Yeah that'd give the cycles needed back. How do you check for it being the T2k ROM?
A really shit hash function :D.

Nicest bit is you can toggle it on and off and it sounds just the same. I was quite pleased with that. (Well, you can now it's stopped sounding like the theme tune was being gargled by a Vogon, which, as I predicted from the start, was a signed/unsigned mismatch but took an hour to bloody find the offending instruction last night).
Lovely :D Okay where can I get the source? I sent a mail to the mailing list :)
User avatar
Firefox
Sheepie Whore
Sheepie Whore
Posts: 11412
Joined: Fri Apr 26, 2002 6:15 pm 0
Location: Sheffield

Post by Firefox »

gravy wrote:I sent a mail to the mailing list :)
Please can I be on the mailing list? Awww, go on mister! Please! :)
"I am a very considerate person. If I want to go out all night on my miniature golf course and shoot lizards, well, no reason to keep the neighbours awake..."
User avatar
Dio
Sheepie Whore
Sheepie Whore
Posts: 18887
Joined: Mon May 31, 2004 1:08 pm 0
Location: Newcastle UK

Post by Dio »

Tomorrow when I go fire up the work PC that has my email on it :).
User avatar
gravy
Sheepie Whore
Sheepie Whore
Posts: 19572
Joined: Wed May 01, 2002 1:28 pm 0
Location: The Other Place

Post by gravy »

Firefox wrote:
gravy wrote:I sent a mail to the mailing list :)
Please can I be on the mailing list? Awww, go on mister! Please! :)
I thought you were on it? PM me your email addy :)
User avatar
gravy
Sheepie Whore
Sheepie Whore
Posts: 19572
Joined: Wed May 01, 2002 1:28 pm 0
Location: The Other Place

Post by gravy »

Okay I just updated from Dio's source. It took around an hour, a bit longer than expected as I'd changed more in his source and not sent the changes back than I should have.

Bad gravy.

Anyway, new version here. I tried it on a 1ghz G4 and it fecking flew like the wind.

If some of you G4 chaps could give it a more thorough bashing I'd be much obliged.

Dload it here:

http://www.blockcopycoders.com/temp/dio ... -09-04.dmg

EDIT

I was lying, the test was on 1.33ghz G4. Lovely and smooth tho :)
User avatar
tufty
Sheepie Whore
Sheepie Whore
Posts: 12524
Joined: Fri Jan 07, 2005 4:52 pm 0
Location: French Alps

Post by tufty »

gravy wrote:Okay I just updated from Dio's source. It took around an hour, a bit longer than expected as I'd changed more in his source and not sent the changes back than I should have.

Bad gravy.

Anyway, new version here. I tried it on a 1ghz G4 and it fecking flew like the wind.

If some of you G4 chaps could give it a more thorough bashing I'd be much obliged.

Dload it here:

http://www.blockcopycoders.com/temp/dio ... -09-04.dmg

EDIT

I was lying, the test was on 1.33ghz G4. Lovely and smooth tho :)
Pretty much lickety-split on a 1.42 Ghz mini

Simon
"massive retard™", "full of shit™", "tiny bitch™", "retarted™", "a bit of a one trick pony™", "petty™", "simple minded idealistic twat™", "miserable humourless fucker™"
User avatar
Atty
Baaaaaa!
Baaaaaa!
Posts: 2289
Joined: Thu Oct 03, 2002 10:11 am 0
Location: Currently sitting on my arse.

Post by Atty »

Just tried it on my 1.42Ghz G4 Mac mini (called Elwood P. Dowd), and after turning off aMule, things flew really nicely.

I've only tried 640x480 and 800x600 in windowed and full screen 32bit modes, but it seems to be running at full speed and all the music and sound effects seem to be playing properly and in sync (aside from a tiny bit of music stuttering when T2k first starts).

There's what looks to be some minor graphical glitches happening, with little gaps appearing between the threads of the web and the shaded innards, but they're pretty minor and not too noticable. The same thing seems to happen on the claw, too.

It's probably worth mentioning that on my machine the mouse cursor stays visible in Full screen mode, and that there's some sort of smoothing effect being applied that makes things look a bit fuzzy. Mind you, I am assuming that's deliberate. I remember the Jag version being quite smoothed anyway. I'm more used to the crisp, pixellated look of the PC port (of T2k, not the jag emulator).
Last edited by Atty on Mon Sep 04, 2006 5:57 pm 0, edited 1 time in total.
Straight Outta Trumpton.
User avatar
BleuLlama
Baa!
Baa!
Posts: 38
Joined: Mon Sep 12, 2005 6:55 pm 0
Location: Rochester, NY, USA
Contact:

Post by BleuLlama »

It's ace on my PowerBook G4 1.67 (OS X 10.4.7)

:D

You just made me *VERY* happy, and *DESTROYED* my productivity.

hehe.
User avatar
sack
Baaaaaaa!
Baaaaaaa!
Posts: 7077
Joined: Fri May 10, 2002 4:13 pm 0
XBL Gamertag: evilgopher
PSN: sixFiveOhTwo
Location: Rijswijk, The Netherlands
Contact:

Post by sack »

Runs just lovely here on a bog-standard eMac

Image


Smoother than the jag itself I'd say - makes the game a bit more frantic and intense... it actually improves it.

plus I'd forgotten how much I actually enjoy this game until now (that's actually my first real game since I was showboating for a bunch of gamedevs at screenplay the other year and my highest score so far)


for some reason you can hear what I assume to be the transitions between tracker patterns on the soundtrack though - but its not a major issue
User avatar
Dio
Sheepie Whore
Sheepie Whore
Posts: 18887
Joined: Mon May 31, 2004 1:08 pm 0
Location: Newcastle UK

Post by Dio »

Do you mean that the sample finishes, and then there's a gap you could get a bus through before the repeat kicks in?

There definitely is a tiny bit of that on the PC. It's a side-effect of the click-free playback; I've synced the DSP sound replay to the host's sound card rather than to the emulated Jag, which means that if the sound replay frequency isn't exactly the same as the one the Jag is expecting, there's a tiny gap, because the actual music management happens on Jaguar time.

If it's a bit larger than 'tiny', then a fix might be to adjust the freq of the sound replay down a little bit.
User avatar
Atty
Baaaaaa!
Baaaaaa!
Posts: 2289
Joined: Thu Oct 03, 2002 10:11 am 0
Location: Currently sitting on my arse.

Post by Atty »

Dio wrote:Do you mean that the sample finishes, and then there's a gap you could get a bus through before the repeat kicks in?

There definitely is a tiny bit of that on the PC. It's a side-effect of the click-free playback; I've synced the DSP sound replay to the host's sound card rather than to the emulated Jag, which means that if the sound replay frequency isn't exactly the same as the one the Jag is expecting, there's a tiny gap, because the actual music management happens on Jaguar time.

If it's a bit larger than 'tiny', then a fix might be to adjust the freq of the sound replay down a little bit.
I've just noticed that, too. I'm not totally sure, but the gaps certainally sound a lot longer than I remember them being.
Straight Outta Trumpton.
User avatar
sack
Baaaaaaa!
Baaaaaaa!
Posts: 7077
Joined: Fri May 10, 2002 4:13 pm 0
XBL Gamertag: evilgopher
PSN: sixFiveOhTwo
Location: Rijswijk, The Netherlands
Contact:

Post by sack »

Dio wrote:Do you mean that the sample finishes, and then there's a gap you could get a bus through before the repeat kicks in?

There definitely is a tiny bit of that on the PC. It's a side-effect of the click-free playback; I've synced the DSP sound replay to the host's sound card rather than to the emulated Jag, which means that if the sound replay frequency isn't exactly the same as the one the Jag is expecting, there's a tiny gap, because the actual music management happens on Jaguar time.

If it's a bit larger than 'tiny', then a fix might be to adjust the freq of the sound replay down a little bit.
it's only slight but i think its more the fact I know its there than anything else. it seems to resolve itself over time as well
Post Reply