[Patch] Core Emulation

Technical discussion for those interested in Supermodel development and Model 3 reverse engineering. Prospective contributors welcome.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

[Patch] Core Emulation

Postby HarryTuttle » Sat Mar 11, 2017 4:08 pm

Another bunch of miscellaneous patches.

<ConsoleDebugger.cpp>
- Fixed typo: "loststate"->"loadstate"

<Model3.cpp>
- Modified statusCycles for "fvipers2": faster speed in attract sequence plus fix missing/garbled textures
- Modified statusCycles for "swtrilgya": game runs at proper speed
- Added/modified game patches:
1) "scud" - unlocked the debug test menu (from info found in this forum)
2) "swtrilgy" - (from MAME) fix inaccessible test menu, from there you can disable "lever feedback" check and pass boot test
3) "eca" - (from MAME) fix to pass the "cabinet network error"
- Removed following game patches that do not seem to impact game stability (I may restore them just in case):
1) "scudp", "lemans24", "lostwsga", "vs298", "harley", "harleyb"

<Main.cpp>
- Added high-resolution timer in place of SDL_GetTicks() to properly throttle at 60 fps (or whatever frame rate you specify in the source).
Attachments
diff.zip
(2.48 KiB) Downloaded 285 times
Last edited by HarryTuttle on Sun Mar 12, 2017 5:54 am, edited 1 time in total.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Core Emulation

Postby Ian » Sun Mar 12, 2017 4:42 am

I'll push the high precision clock timing later today
i was going to code that myself, but just never got that far :)
Accuracy using the c++ chrono methods might vary a lot between platforms .. but can't be any worse than the SDL timer ;p
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Core Emulation

Postby HarryTuttle » Sun Mar 12, 2017 5:53 am

Ian wrote:Accuracy using the c++ chrono methods might vary a lot between platforms .. but can't be any worse than the SDL timer ;p


Yeah, I gathered some info from here http://stackoverflow.com/questions/13263277/difference-between-stdsystem-clock-and-stdsteady-clock about the "chrono" class and "steady_clock" seems to be the preferred choice.

I've tried "system_clock" but is not so precise.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Core Emulation

Postby Jiterdomer » Sun Mar 12, 2017 11:35 pm

Does it also fix in Harley where it doesn't let you do the Hidden Region Test code?
Feel the heartbeat of my machine through this tight seat. I feel every motion of my machine
Image
User avatar
Jiterdomer
 
Posts: 627
Joined: Mon Sep 26, 2011 6:37 pm
Location: Los Angeles, California

Re: [Patch] Core Emulation

Postby HarryTuttle » Mon Mar 13, 2017 5:00 am

Jiterdomer wrote:Does it also fix in Harley where it doesn't let you do the Hidden Region Test code?


I missed this... :o Can you explain better please?

Do you mean the country selection screen ? Because it works for me.

Edit:

From the region code Supermodel doc:
Code: Select all
HARLEY DAVIDSON LA RIDERS (Model 3 Step 2)
Go into the test mode, select game assignments up, up, down, down, view, music, view, music.


Where up/down is the gear shifter
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Core Emulation

Postby Ian » Tue Mar 14, 2017 1:56 pm

Been trying out this

<Main.cpp>
- Added high-resolution timer in place of SDL_GetTicks() to properly throttle at 60 fps (or whatever frame rate you specify in the source).


Unfortunately accuracy seems bad (at least under windows) :( I don't know what std::chrono uses internally
Attachments
time2.jpg
time2.jpg (190.48 KiB) Viewed 8233 times
time1.jpg
time1.jpg (174.21 KiB) Viewed 8233 times
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Core Emulation

Postby HarryTuttle » Tue Mar 14, 2017 2:07 pm

Wow 156.7 fps...

I forgot to say that in "supermodel.ini" i disabled VSync, and left only Throttle.

Vsync was never a good choice, at least for me, because my PC is not enough powerful to sustain 60fps constantly in every game, and even if it was sometime, it always stuttered. However if put a game in pause (alt+p) it's stuck to 60fps.

Have you tried substituting the clock (http://en.cppreference.com/w/cpp/chrono)?
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Core Emulation

Postby Ian » Tue Mar 14, 2017 2:12 pm

Skylake is a beast :p 157 is fairly unplayable lol
No I haven't, I'll give it a spin.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Core Emulation

Postby Ian » Tue Mar 14, 2017 2:57 pm

Well
I replaced it with high_resolution_clock .. and it was the same >_<
It turns out it's just an alias for system clock
Apparently they fixed this in vs2015 ..

https://web.archive.org/web/20141212192 ... ls/719443/
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Core Emulation

Postby HarryTuttle » Tue Mar 14, 2017 3:03 pm

I see... I don't use VS, I use MINGW in MSYS2 environment. I took for granted that should have worked with every compiler.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Next

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest

cron