You are not logged in.
Lost Password?


Register To Post



 Bottom   Previous Topic   Next Topic

#101
Re: PVB Emulator & Fundraiser
Posted on: 2/7 15:02
Virtual Freak
Joined 2017/6/24
USA
62 Posts
Long Time User (2 Years)
There's just one thing missing here in this update: a column table tab.

You guys ever thought the column table of the VIP was useless for graphical effects? Well, nope.
Top

#102
Re: PVB Emulator & Fundraiser
Posted on: 2/9 7:08
Virtual Freak
Joined 2017/6/24
USA
62 Posts
Long Time User (2 Years)
The 2nd example used on this article explains why the column table is so useful.

For instance, the Wario Land game's intro cutscene actually uses a fade effect on the sides via the column table. Guy Perfect told me about that on Discord when I was still discussing the VIP with him.
Top

#103
Re: PVB Emulator & Fundraiser
Posted on: 2/13 17:29
Virtual Freak
Joined 2017/6/24
USA
62 Posts
Long Time User (2 Years)
The Sacred Tech Scroll draft just got updated with details of the VB's hardware timer. http://perfectkiosk.net/stsvb1.html#timer

In the Java program's update, the bindings for the L and R buttons are "E" and "R" respectively.
Edited by StinkerB06 on 2019/2/13 18:39
Edited by StinkerB06 on 2019/2/13 18:41
Top

#104
Re: PVB Emulator & Fundraiser
Posted on: 2/14 4:32
VUE(xpert)
Joined 2012/12/4
417 Posts
CoderLong Time User (6 Years)
Quote:

StinkerB06 wrote:
There's just one thing missing here in this update: a column table tab.

Any ideas for how that might be visualized?

Quote:

StinkerB06 wrote:
For instance, the Wario Land game's intro cutscene actually uses a fade effect on the sides via the column table.

While testing Wario Land in the emulator, the column table didn't appear to be updated during the intro cutscene, which seems wrong. The result is a very dark cutscene, which makes sense because the brightness is turned down for the column multiplier to take effect, but it never seems to be written.

I may have screwed something up, but it should be a simple matter of store instructions, so I can't quite pin down what's (not) going on.

Quote:

StinkerB06 wrote:
The Sacred Tech Scroll draft just got updated with details of the VB's hardware timer. http://perfectkiosk.net/stsvb1.html#timer

Jumping the gun a bit are we? Feel free to post the next software update so I can take a break. (-:


The Next Software Update

... is attached to this post. I adjusted the focus when running the emulated program, so the keyboard keys should correctly apply without intervention.

I also implemented the timer into the emulation core... I think. Everything looks like it checks out, and the timer itself is fairly simple, but I haven't had a chance to fully test it. I was hoping Galactic Pinball would start working magically once it was implemented, but something else is causing that game to hang on the title screen.

If anyone has a simple test ROM handy that just does timer functions, see if it works correctly in this build of the emulator. Otherwise I'll draft one up for next week to verify that everything is working as intended.

Attach file:


jar pvbemu_20190213.jar Size: 247.74 KB; Hits: 26
Top

#105
Re: PVB Emulator & Fundraiser
Posted on: 2/14 10:54
PVB Elite
Joined 2008/12/28
Slovenia
626 Posts
Highscore Top ScoreHighscore Top ScoreCoderContributor10+ Game RatingsLong Time User (10 Years) App CoderPVBCC 2010 EntryPVBCC 2013 Entry
Quote:

Guy Perfect wrote:
Quote:

StinkerB06 wrote:
There's just one thing missing here in this update: a column table tab.

Any ideas for how that might be visualized?

With a list/table with two columns ("repeat" and "time") that can be edited. The result would be shown on two screen-sized pictures (slightly wider) where each column would be represented by one or more columns of pixels (depending on "time"), their color being determined by the "repeat". The column currently selected in the table should be highlighted somehow.
Quote:

If anyone has a simple test ROM handy that just does timer functions, see if it works correctly in this build of the emulator. Otherwise I'll draft one up for next week to verify that everything is working as intended.

I tested it with a private/work in progress ROM. It doesn't do just timer functions, but I did notice that despite the timer interrupt being acknowledged (and EIPC set correctly), upon executing RETI, the PC was again set to FFFFFE10. The ROM works in Mednafen and it worked on hardware the last time I tried it, and I don't think I changed the timer code since then.

And Deathchase, for whatever reason, resets when entering the first level, though it does not use the timer. The source code is available if you want to investigate.
Top

#106
Re: PVB Emulator
Posted on: 2/17 23:43
VUE(xpert)
Joined 2012/12/4
417 Posts
CoderLong Time User (6 Years)
Attached to this post is another classic feature-testing program called Timer Workshop:

Open in new window


The left D-pad moves the cursor around, the right D-pad's up and down changes the current selection, and pressing A when "Write" is selected will write a value to TCR using the current Clock, Interrupt, Zero Clear and Enable settings. Changing the digits of Reload will immediately write to THR or TLR as appropriate.

As far as I can tell, I've worked out all of the errors in the previous implementation and the emulator now correctly simulates the timer. However, none of the broken games have magically fixed, so I won't put out an update just for this small change.

If you want a quick laugh, go ahead and load Timer Workshop into the current build and watch it break. The moral of the story is that I need to make these "Workshop" programs before I declare something implemented. (-:

The Sacred Tech Scroll has been updated accordingly.

Attach file:


vb timer_workshop.vb Size: 8.00 KB; Hits: 25

png  TimerWorkshop.png (0.95 KB)
3060_5c69e112cd6b9.png 384X224 px
Top

#107
Re: PVB Emulator
Posted on: 2/20 23:15
VUE(xpert)
Joined 2012/12/4
417 Posts
CoderLong Time User (6 Years)
Got a new update attached to this post. It includes a few fixes to floating-point operations and VIP behavior that fix a few games like Bound High!, Galactic Pinball and Vertical Force.

The application was reorganized a bit. The Console window still pops up when you load a ROM, but the other windows are now accessed through a new Windows menu.

When you run the emulation, focus is now correctly given to the Console window, so you no longer have to click on it. A third anaglyph color mode has been added with full intensity red/blue like conventional VB emulators.


Breakpoints

Did you think the timer was kinda small for the last two weeks' worth of work? It was! Truth to tell, I only did the timer when I did because it was small and I spent the last two weeks working on breakpoints.

Open in new window

It might not look like much, but the new Breakpoints window is one of the most significant features of the entire application. This tool allows you to stop emulation whenever something you're interested in happens. This is big news for reverse engineering and debugging efforts.

The flexibility of this emulator's breakpoint system is far and away above anything else I've seen (except for MHS). Let's take a look!

Breakpoints can be configured to trigger on one or more of the following conditions:

• Read - An instruction attempts to read from the bus
• Write - An instruction attempts to write to the bus
• Execute - An instruction is about to execute
• Exception - An exception was raised

Crucially, all breakpoints are captured before their respective events are processed. For example, a write breakpoint will stop the program before the value gets written, letting you see what value is being replaced.

Exceptions include operations errors as well as all interrupts. For the most part, interrupts should be trapped with execute breakpoints on their handler addresses.


Addresses

The address field allows you to specify an arbitrary list of individual addresses and address ranges. All figures are expressed in hexadecimal as follows:

• A value by itself is an individual address.
• Two values separated by a hyphen is a range of addresses, with the start on the left and the end on the right.
• Multiple addresses/ranges can be provided simultaneously by separating them with commas.

For read and write breakpoints, the address specifies the bus address being accessed. For execute and exception breakpoints, the address specifies the address of the instruction to be executed or that raises the exception.

It's totally valid to mix-and-match addresses and breakpoint types.


Conditions

The condition field is the big kahuna that sets this emulator apart from the rest. It's a fully-featured expression evaluator that accepts a set of C-like operators in order to determine dynamically when a breakpoint should trigger. This gives breakpoints access to CPU registers, the contents of system memory and operands for the current instruction.

Earlier today, I was helping someone track down Wario's animation data in Wario Land. We started by looking at object 2 (Wario's eye), which has an address of 0003E010. A write breakpoint on that address stopped the program in the function at FFFC1D0C, which is a small function that copies data from a global variable into OAM. Armed with that knowledge, we figured out where object 2 came from by inspecting the CPU state, which allowed the guy to find the data he was looking for.

In the above screenshot, you see a sample breakpoint that stops on all function calls in Wario Land's crt0. The condition expression is "inst == jal || inst == jmp && reg1 != 31", which you can see is accessing instruction operands in order to stop on only specific instructions. It also supplies an address range.

The supported features in the condition are so expansive, in fact, that I can't go over it all here in this forum post. So instead, an HTML file is attached to this post (and included in the .jar) that covers all the specs. I promise it won't disappoint.

The expression evaluator was also exposed to the Goto prompt in the CPU window (Ctrl+G in the disassembler or hex editor).

Attach file:


jar pvbemu_20190220.jar Size: 280.63 KB; Hits: 20

png  Breakpoints.png (9.96 KB)
3060_5c6dcb43c873f.png 400X300 px
html expressions.html Size: 21.29 KB; Hits: 24
Top

#108
Re: PVB Emulator
Posted on: 2/27 23:29
VUE(xpert)
Joined 2012/12/4
417 Posts
CoderLong Time User (6 Years)
No amazing, ground-breaking new developments this time, just a round of fun and profit.

New features:
• The game pad is now properly implemented and the tech scroll updated accordingly
• Added support for .isx debugger ROMs
• Added value breakpoint condition symbol for the actual value being read/written
• Added disassembler comment for when an exception/interrupt is raised
• Added disassembler comment for JMP [lp] instructions

Bug fixes:
• Extended duration of DPBSY and XPBSY, enabling Mario's Tennis to function
• Corrected the operation of XB, enabling Jack Bros. to function
• The disassembler now displays TRAP, XB and XH incorrectly
• Step will now enter an exception handler without also executing its first instruction
• Step Over was previously broken, and was reworked to use a breakpoint
• Read and Write breakpoints now detect if any of the bytes being accessed are in the given ranges, not just the exact byte specified
• The Breakpoints window will no longer erroneously show a star next to Read, Write or Exception breakpoints that don't match the current emulation state

Attach file:


jar pvbemu_20190227.jar Size: 292.62 KB; Hits: 26

png  NowWithISX.png (19.79 KB)
3060_5c770f281f045.png 429X334 px
Top

#109
Re: PVB Emulator
Posted on: 2/28 20:54
PVB Elite
Joined 2011/7/1
Germany
1109 Posts
CoderContributorTop10 PosterLong Time User (7 Years) App CoderPVBCC 2013 Entry
Just gave it a try and it seems to work quite good. I noticed a few things here and there in the UI that could need improvement but I don't want to throw more work at you. Just tell me when you are up for it and I will make a short list.
Top

#110
Re: PVB Emulator
Posted on: 3/1 6:17
VUE(xpert)
Joined 2012/12/4
417 Posts
CoderLong Time User (6 Years)
Go for it. Don't worry about extra work, I do that to myself all the time. (-:
Top

 Top   Previous Topic   Next Topic


Register To Post