You are not logged in.
Lost Password?


Register To Post



 Bottom   Previous Topic   Next Topic

#121
Re: PVB Emulator & Fundraiser
Posted on: 3/15 19:18
Newbie
Joined 2018/5/14
4 Posts
Long Time User (1 Year)
Ah, it's alive!

I'm really liking the effort put into a clean well thought out design. Keeping it S.O.L.I.D. :)

I'm on spring break atm so I can actually dork around with it for fun.

Anyways, Good luck!
Top

#122
Re: PVB Emulator & Fundraiser
Posted on: 3/22 19:06
VUE(xpert)
Joined 2012/12/4
418 Posts
CoderLong Time User (6 Years)
Although the outward functionality appears to be relatively the same, reworking the application UI to accommodate linked pairs of emulation windows was a lot of intricate work. But it's done now!

Attached to this post is a new build: (See following post)

New Features
• The main application window has been redesigned
• The communication port is now implemented

Code Changes
• Unmapped reads in the 0x02000000-0x02FFFFFF range will now be zeroes
• The localization driver was updated to support substitutions
• A new class MainWindow was created for representing the application interface
• Multiple windows can now be instantiated and linked
• Global input commands are now implemented and are configurable
• The Config class and its new helper classes are in a new "config" package

Bug Fixes
• Writes to DPSTTS were forwarding to DPCTRL, which I don't think is correct
• Simultaneous Left/Right and Up/Down are disabled by default, correcting a crash in Wario Land
__________

To use the new communication feature:

• Create an additional emulator window with File → New Window
• Associate communication peers through Emulation → Link
• Use the emulator windows as you normally would

When only one emulator window exists, the Link sub-menu will not be available. When multiple windows exist, the Link sub-window will display a list of all current windows, allowing the user to select one to associate as a communication peer. If the window is already linked, a Disconnect option is also available in the Link sub-menu.

Communication Workshop has been attached to this post to help with testing.

I did a lot of experimentation with boosting performance when linking simulations, but the unfortunate fact of the matter is that the only way to keep linked instances synchronized is to process them one cycle at a time. I thought maybe checking if both simulations were in halt status I could boost performance by skipping to the next interrupt, but communications don't always raise interrupts, and there's no way to predict ahead of time when the software is going to trigger a communication event...

... So long story short, linking in the current Java implementation is slow. Hopefully the eventual native implementation can handle linking at full speed.

Each emulation window animates frames in its own thread as a consequence of how timers work. However, linked frames will only use the animation thread from whichever window initiated simulation processing. I'm pretty sure I got all the logic correct, but since thread locks are rather intermingled under a variety of circumstances, it's possible there might be some combination of circumstances that could cause the application to deadlock.

The following describes the general contract of the linking behavior:

• Unlinked windows operate in their own threads
• When paused windows are linked, the one that invokes the Run command controls both
• When running windows are linked, the one that invokes the Link command controls both
• When a running and paused window are linked, the paused window is activated and the one that invokes the Link command controls both
• When running linked windows are disconnected, the "slave" window resumes control of itself
• Closing a linked window invokes the Disconnect command
• The following commands will only apply to the linked window that invokes them: Reset, Frame Advance, Step Over, and any user-defined breakpoints

Keep an eye out for any reproducible problems that might occur with thread management, and please report any problems in a reply. I did my best to make sure it works correctly, but this is a bit of an atypical method of threading windows and I don't want to say with absolute certainty that it can't break.
__________

Besides the link feature, the main window was redesigned and all of the old features remain implemented. However, the only new feature that was implemented is the Game/Debug Mode setup, with additional menu options to be implemented later. One thing to keep in mind with regards to window modes:

• In Game Mode, emulation will always begin when a ROM is loaded
• In Debug Mode, emulation will always be paused when a ROM is loaded

This should be most useful to the most users and might wind up in the Settings window depending on what I decide on the matter.

Ctrl+3 still cycles anaglyph colors, but it is a temporary command that will be removed once the Video Settings interface is implemented, which will allow the user to configure whatever colors they wish.

The debugger interfaces still do not contain any safeguards while the simulation is running, and should not be used unless the simulation is paused. This is also temporary, as I didn't want to delay this build any longer than necessary.

Step, Step Over and Frame Advance can now be used while the simulation is running. All three will cause emulation to pause after they complete.

Attach file:


vb communication_workshop.vb Size: 16.00 KB; Hits: 27

png  Linked2.png (24.19 KB)
3060_5c9522ae356dd.png 773X555 px
Edited by Guy Perfect on 2019/3/22 20:15
Top

#123
Re: PVB Emulator & Fundraiser
Posted on: 3/22 20:15
VUE(xpert)
Joined 2012/12/4
418 Posts
CoderLong Time User (6 Years)
Turns out I'd forgotten to put the new "config" package into the .jar file, so the previous upload did not work. The one attached to this post should be fine.

Also, after typing out why I had to process linked simulations one cycle at a time, it occurred to me that I could check for communications while both simulations were in halt status even if the communication doesn't raise an interrupt. This build takes that into account and sees vastly improved performance over the broken one that you never got a chance to use anyway because of the aforementioned .jar mistake...

Attach file:


jar pvbemu_20190322b.jar Size: 325.71 KB; Hits: 39
Top

#124
Re: PVB Emulator & Fundraiser
Posted on: 3/27 23:10
VUE(xpert)
Joined 2012/12/4
418 Posts
CoderLong Time User (6 Years)
A new build is attached to this post:

New Features
• Audio is now implemented, disabled by default, toggled with Ctrl+A
• Added disassembler comments for VSU registers

Code Changes
• Rebuilt the Console class with new threading, timing and audio code

Bug Fixes
• Items in the Link menu will now retain the check mark when selected
• Triggered breakpoints will no longer steal focus from other main windows
• Corrected the address that presents BKCOL disassembler comments
• Disassembler comment detection for I/O ports now correctly masks address bits

The key attraction this time around is audio support, and the Sacred Tech Scroll has been updated as usual. There's very little left for the document before the formal v1.0 release, and the emulator application just needs a few menu items implemented before it's quote-unquote "ready" for its own version 1.0.

If you give the audio a go, you'll probably notice pretty quick a bit of a glaring problem: it's a bit too much for Java to handle unless you've got a hulking monster of a computer. On my own box, most games stutter pretty badly, spending more time between frames than presenting them, which is why audio is disabled by default. This isn't a problem that's going to go away without a native implementation driving the workload. The JVM profiler does its best to optimize the emulation core, but there's just too much going on for it to keep up.

Audio does work correctly, though, and dare I say perfectly. Attached to this post is a .ogg file that is a log of audio output from the emulator during a short Wario Land session. If you open it up in an audio editor, you'll see the actual samples produced by the emulator, including the simulated analog filter that centers the output around zero. All of the samples are unedited, exactly as they came out of the emulator. The only thing I did to the clip was trim off some silence at the beginning.

Also attached to this post is an IPS patch (use it with something like Lunar IPS) that will modify Wario Land slightly in order to use the HALT instruction while waiting for VIP activity. The disassembler and breakpoints came in real handy for this! Performance is improved relative to the unmodified game, but it's still not quite fast enough on my box. That native implementation is going to be the key to getting performance back up to where it needs to be, but that's still a ways out yet.

Lastly, a copy of VSU Workshop is attached to this post for testing purposes.

All of the internals regarding the frame animator were completely redone in this build, meaning a completely different set of potential bugs now applies. If you could play around with the window commands and linked window communication to check for bugs, it would be appreciated.

Attach file:


jar pvbemu_20190327.jar Size: 345.74 KB; Hits: 61
ogg wario_log.ogg Size: 3,001.43 KB; Hits: 44
ips wario_halt.ips Size: 0.16 KB; Hits: 51
vb vsu_workshop.vb Size: 32.00 KB; Hits: 38
Top

#125
Re: PVB Emulator & Fundraiser
Posted on: 3/28 0:44
VUE(xpert)
Joined 2012/12/4
418 Posts
CoderLong Time User (6 Years)
With the entire emulation core implemented, with the experience of producing the emulator of my dreams, and with a sigh of relief, I'm finally freed up to do other things. I won't be abandoning this project--far from it--but as of this latest update, it is no longer my primary spare-time focus. I'll still work on it from time to time when other things don't have my attention, but since interest in this project is very low, there are other things I want to be doing that I've been putting off.

The remaining window menus will be implemented in the coming weeks, but I won't be sticking too strongly to my Wednesday update schedule like I have been for the past couple of months. If someone is keenly interested in something that can't be clicked on, I'd be happy to prioritize it to make it available, but if it's just a matter of "it's not done yet", then I'll get to it when I get to it. (-:

As for what I will be doing, there's 1) a long-neglected project with some other PVB members I'd like to get the ball rolling on, 2) something I want to do with Wario Land and 3) something related to NES that I'd like to keep a complete secret until the time comes.

For those who have stuck with me through all of this, thank you for your patience and thank you for your financial support. Planet Virtual Boy's emulator is becoming something great and that means the world to me.
Top

#126
Re: PVB Emulator & Fundraiser
Posted on: 3/28 9:44
Nintendoid!
Joined 2004/5/28
215 Posts
Long Time User (15 Years)
Good work as usual but I have to say Bye Bye 3DS VB Emulator.
Reading the last post this will never happen anymore.
Shame.

And you entirely missing the point. There is and was interest in the Emulator but as I said from the beginning, the people today do not care so much about the next PC emulator or debugger. That is only us here who care about such stuff mostly. And if people care for emulators they want it to work with stuff like retroarch as libretro compatible emulator.

The Patreon page was not going too bad for a while but now it is almost to zero after such a long time of nothing. And if somebody would have listen to me from the beginning, patreon would still go strong. But without any 3DS stuff it is no wonder that is not working.

Sorry, I am very disappointed!

So okay, who is next in line for doing finally the right thing???
Top

#127
Re: PVB Emulator & Fundraiser
Posted on: 3/28 14:40
Virtual Freak
Joined 1/27
USA
90 Posts
Well that audio for what can be made out is clean clear and impressive. I'd hate to think what machine you'd need to get this to run right with the audio on. I've got a mid-range i7 from 4 years back and an nvidia 980 with 8GB of ram on that and 16gb on the system and it is chugging to say the least.

Also are some games implemented and others not on this? I tried to load up Red Alarm, Golf, and one other and it never started them up while others did (Vertical Force, Wario, Tennis.)

And thirdly the menu is grayed out I noticed for configuring the emulator settings for audio, visual, inputs.
Top

#128
Re: PVB Emulator & Fundraiser
Posted on: 3/28 17:20
VUE(xpert)
Joined 2012/12/4
418 Posts
CoderLong Time User (6 Years)
Quote:

VmprHntrD wrote:
I'd hate to think what machine you'd need to get this to run right with the audio on.

The JVM is able to get short burts out--longer than the 1/50 second rendering interval--so I know it's not a limitation of CPU power at the lowest level. The native implementation written in C should shine a better light on this, since it doesn't have any of the sandboxing overhead that the managed Java code has to deal with.

Quote:

VmprHntrD wrote:
Also are some games implemented and others not on this?

The emulation core in its current state isn't 100% compatible with the commercial library. Red Alarm in particular is mostly supported, but stopped booting after I adjusted the number of CPU cycles taken by a store operation. I don't know what the game is doing that it would even be aware of how long a store takes, but getting the game up and running will require some investigation in the debugger. It's a great example of why the CPU and breakpoint features are so important to have!

If anyone is technically inclined and would be able to help look into Red Alarm specifically, that would be greatly appreciated.

Quote:

VmprHntrD wrote:
And thirdly the menu is grayed out I noticed for configuring the emulator settings for audio, visual, inputs.

Anything greyed out (except for the Link menu when only one window is active) isn't implemented yet, so that's not an error. If you want something specific to help with testing, let me know and I'll make a point to get it set up for you.

Quote:

Fire-WSP wrote:
And you entirely missing the point. There is and was interest in the Emulator but as I said from the beginning, the people today do not care so much about the next PC emulator or debugger. That is only us here who care about such stuff mostly.

Every part of the project is important, which is a much broader scope than running the core on 3DS. The documentation and Java implementation account for some 80% of the project goals, and they've taken a fair amount of time and effort to get to their current state. The CPU and breakpoint debuggers in particular have been instrumental for research and bug-hunting, so it's not like any development time has been spent on frivolous things.

The remaining 20% is still on the way, but it's abundantly clear that I'd be doing it mostly for myself. The invitation still stands that if someone needs something implemented I'd be happy to work on it, and the source code for every build released has been bundled inside of every .jar file.

Quote:

Fire-WSP wrote:
[...] I have to say Bye Bye 3DS VB Emulator.
Reading the last post this will never happen anymore.
Shame.

[...]

So okay, who is next in line for doing finally the right thing???

Overlooking the part where I said exactly the opposite, is this really the tone you want to convey?
Top

#129
Re: PVB Emulator & Fundraiser
Posted on: 3/28 18:44
Virtual Freak
Joined 1/27
USA
90 Posts
Rude comments weren't they?


Anyway, nothing I'm doing in any particular bit, just recalled an earlier build had stuff like that enabled at the least so you could setup your own button configuration on the keyboard so that's why I asked.

It's a nice try at an emulator definitely, guess it's just java being java perhaps holding things back some due to how it works.
Top

#130
Re: PVB Emulator & Fundraiser
Posted on: 3/28 19:01
Virtual Freak
Joined 2013/1/25
USA
51 Posts
Long Time User (6 Years) 20+ Game Ratings
Quote:

Guy Perfect wrote:
With the entire emulation core implemented, with the experience of producing the emulator of my dreams, and with a sigh of relief, I'm finally freed up to do other things. I won't be abandoning this project--far from it--but as of this latest update, it is no longer my primary spare-time focus. I'll still work on it from time to time when other things don't have my attention, but since interest in this project is very low, there are other things I want to be doing that I've been putting off.

The remaining window menus will be implemented in the coming weeks, but I won't be sticking too strongly to my Wednesday update schedule like I have been for the past couple of months. If someone is keenly interested in something that can't be clicked on, I'd be happy to prioritize it to make it available, but if it's just a matter of "it's not done yet", then I'll get to it when I get to it. (-:

As for what I will be doing, there's 1) a long-neglected project with some other PVB members I'd like to get the ball rolling on, 2) something I want to do with Wario Land and 3) something related to NES that I'd like to keep a complete secret until the time comes.

For those who have stuck with me through all of this, thank you for your patience and thank you for your financial support. Planet Virtual Boy's emulator is becoming something great and that means the world to me.


This is great news about your other projects! Looking forward to all of them!! Thank you for all that you do.
Top

 Top   Previous Topic   Next Topic


Register To Post