Retro Virtual Machine 2.0 beta 1 released

Struggling with Fuse or trying to find an emulator with a specific feature. Ask your questions here.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by Ast A. Moore »

jcgamestoy wrote: Sun Dec 23, 2018 10:56 pm I'm surprised, because the rvm2 lag was supposed to be smaller than the rvm1 lag.
I find the test you did super interesting. Could you send me the program to do tests?
Sure. Here you go.

It’s very basic. You press a key and release it. As soon as the key is down, the square in the middle of the screen toggles its color between black and cyan and a short beep (more of a click) is played. If you keep holding the key down, the color toggle/click will happen continuously at a regular rate. The latter is useful for evaluating a lag between the video and audio.
jcgamestoy wrote: Sun Dec 23, 2018 10:56 pm As for the floating bus, yes, I have implemented it at the last minute and by request of a tester and still is not accurate at all, do you know any software with which to test it properly?
I do, of course. Since I was on the team who discovered, analyzed, and booked down the floating bus on the +2A/+3, I made quite a few tests. Mark Woodmass was the first to implement it in his SpecEmu, and I made a special version of my test for him to fine-tune his emulation. You can check out the link in my signature for the most detailed information about it you can ever find. Here are the links to my test programs:

1. Floating Bus Test (Universal) 2 There are two versions here—2.0 and 2.1. Version 2 is meant to test the best-case scenario. When you launch it, two yellow stripes in the border will appear at the same height as the “ground” level. They may jitter a little bit, but at no point should they appear below or above the yellow ground area. When you press a key, white vertical lines will appear in the “sky” area. Again, the two yellow stripes should remain in the border at the same position and nowhere else on the screen. Pressing and holding a key will cause a single yellow stripe to roll inside the ground area. You can now press and hold keys randomly and the yellow stripe should never appear anywhere else on the screen. Version 2.1 is a preliminary worse-case scenario test. Its only difference from 2.0 is that after pressing a key, the border should fill up with yellow stripes from top to bottom. Holding a key down, will cause a single flickering yellow stripe to roll down across the screen.

2. Woody’s Special. This is the ultimate emulator test. Upon loading, it behaves just like the above. However, after you press a key, it displays a very specific pattern, which is easier to understand by looking at it, rather than reading its description. I ran this test on a real Spectrum +2A and took a video of the screen at 50 fps. You can examine it frame by frame and then fine-tune your emulator to make sure that each frame matches real hardware exactly. The yellow stripes have distinct edges that contrast well with the black border and the white vertical lines should help you see at which exact T state it happens.

(I really should do a writeup on all so I can refer any emulator author to it. The one I did was aimed more at Spectrum software developers.)
Last edited by Ast A. Moore on Mon Dec 24, 2018 9:47 am, edited 1 time in total.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
Woodster
Drutt
Posts: 47
Joined: Mon Nov 13, 2017 12:17 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by Woodster »

48K 128K +3 ULA bus
-----------------------------
14338 14364 14367 (0x4000)
14339 14365 14368 (0x5800)
14340 14366 14369 (0x4001)
14341 14367 14370 (0x5801)
14342 14368 14371 IDLE
14343 14369 14372 IDLE
14344 14370 14373 IDLE
14345 14371 14374 IDLE

During idle cycles the 48K and 128K ULAs will return #FF for port reads from unattached ports whereas the +2A and +3 ASIC, when memory paging is enabled, will return the most recently cached value from a display byte (see the above table) or a byte read from or written to contended memory by the Z80, but with bit 0 set in all cases. The +2A/+3 floating bytes will appear on all ports following the Centronics port decoding (0000 ---- ---- --0-). With paging disabled the +2A/+3 will always return #FF.

All timings are relative to the ULA/ASIC asserting the INTREQ line.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by Ast A. Moore »

Woodster wrote: Mon Dec 24, 2018 9:31 am 48K 128K +3 ULA bus
I wish I could like this post a thousand times, Mark! Eloquent, no-nonsense, and dead accurate. Mind if I quote it in my future writeup for Spectrum emulator developers? Also, I need your full 3D scan for a thirty-foot-tall bronze monument. (You can choose the posture and installation location.)
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
Woodster
Drutt
Posts: 47
Joined: Mon Nov 13, 2017 12:17 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by Woodster »

Do what you want with it. It belongs to everybody so spread the word!

I tapped that up many months back after your initial work but then sat on it in case anything else turned up in how the bus works. Then it kinda got forgotten until now lol
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by Ast A. Moore »

Woodster wrote: Mon Dec 24, 2018 9:57 am Do what you want with it. It belongs to everybody so spread the word!
Thanks, mate!
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
jcgamestoy
Drutt
Posts: 12
Joined: Sun Dec 23, 2018 10:40 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by jcgamestoy »

Ast A. Moore wrote: Mon Dec 24, 2018 9:11 am
jcgamestoy wrote: Sun Dec 23, 2018 10:56 pm I'm surprised, because the rvm2 lag was supposed to be smaller than the rvm1 lag.
I find the test you did super interesting. Could you send me the program to do tests?
Sure. Here you go.

It’s very basic. You press a key and release it. As soon as the key is down, the square in the middle of the screen toggles its color between black and cyan and a short beep (more of a click) is played. If you keep holding the key down, the color toggle/click will happen continuously at a regular rate. The latter is useful for evaluating a lag between the video and audio.
jcgamestoy wrote: Sun Dec 23, 2018 10:56 pm As for the floating bus, yes, I have implemented it at the last minute and by request of a tester and still is not accurate at all, do you know any software with which to test it properly?
I do, of course. Since I was on the team who discovered, analyzed, and booked down the floating bus on the +2A/+3, I made quite a few tests. Mark Woodmass was the first to implement it in his SpecEmu, and I made a special version of my test for him to fine-tune his emulation. You can check out the link in my signature for the most detailed information about it you can ever find. Here are the links to my test programs:

1. Floating Bus Test (Universal) 2 There are two versions here—2.0 and 2.1. Version 2 is meant to test the best-case scenario. When you launch it, two yellow stripes in the border will appear at the same height as the “ground” level. They may jitter a little bit, but at no point should they appear below or above the yellow ground area. When you press a key, white vertical lines will appear in the “sky” area. Again, the two yellow stripes should remain in the border at the same position and nowhere else on the screen. Pressing and holding a key will cause a single yellow stripe to roll inside the ground area. You can now press and hold keys randomly and the yellow stripe should never appear anywhere else on the screen. Version 2.1 is a preliminary worse-case scenario test. Its only difference from 2.0 is that after pressing a key, the border should fill up with yellow stripes from top to bottom. Holding a key down, will cause a single flickering yellow stripe to roll down across the screen.

2. Woody’s Special. This is the ultimate emulator test. Upon loading, it behaves just like the above. However, after you press a key, it displays a very specific pattern, which is easier to understand by looking at it, rather than reading its description. I ran this test on a real Spectrum +2A and took a video of the screen at 50 fps. You can examine it frame by frame and then fine-tune your emulator to make sure that each frame matches real hardware exactly. The yellow stripes have distinct edges that contrast well with the black border and the white vertical lines should help you see at which exact T state it happens.

(I really should do a writeup on all so I can refer any emulator author to it. The one I did was aimed more at Spectrum software developers.)
Impressive work and many thanks, I do my best to implement this in the next beta.

About the lag, what osx version and what gpu your computer has? Can you press CMD+X and tell me if the video fps display something under 60. Maybe all the gpu postprocessing is the culpable of this. If you have another computer with linux or windows and a powerfull gpu test there. Nobody of my testers notice the lag, but i notice it a lot in my macbook white old computer.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by Ast A. Moore »

jcgamestoy wrote: Mon Dec 24, 2018 11:44 am Impressive work and many thanks, I do my best to implement this in the next beta.
Excellent. And be sure to use Mark’s notes on ULA timings above, too.
jcgamestoy wrote: Mon Dec 24, 2018 11:44 amAbout the lag, what osx version and what gpu your computer has? Can you press CMD+X and tell me if the video fps display something under 60. Maybe all the gpu postprocessing is the culpable of this. If you have another computer with linux or windows and a powerfull gpu test there. Nobody of my testers notice the lag, but i notice it a lot in my macbook white old computer.
I’m running macOS 10.13.6 on a 2.4 GHz 15-inch mid-2010 MacBook Pro (model ID MacBookPro6,2) with two GPUs: an Intel HD Graphics and an NVIDIA GeForce GT 330M. I usually force the integrated Intel GPU to run all the time (with a special app). However, RVM2 exhibits the same delay with either GPU.

The FPS does indeed hover at just under 60; usually at around 55–58 fps. Sorry, I don’t have any other (well, more powerful) machines for testing at the moment.

Could it be that some people simply don’t notice the lag, rather than the lag not being there?

Could you perhaps make a special build of RVM with an option to turn all the video processing off? Or is it too much trouble at this point?
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
jcgamestoy
Drutt
Posts: 12
Joined: Sun Dec 23, 2018 10:40 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by jcgamestoy »

djnzx48 wrote: Mon Dec 24, 2018 2:23 am Thanks, I got it working now. (I guess you meant to say to use the HOME key for an NMI?) The Pentagon timings are fine, but the samples are out of tune on a standard 128K, which doesn't happen on other emulators (e.g. Fuse). So it's just the 128 timings that are too fast.
:o You are completly right, i test rvmv1 vs rvmv2 in an spectrum analizer and the pitch in the zx128 is A LOT Higher, but i'm very surprised cause the ay code is the same, is a big bug i will fix it ASAP. Thanks!!!
User avatar
jcgamestoy
Drutt
Posts: 12
Joined: Sun Dec 23, 2018 10:40 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by jcgamestoy »

djnzx48 wrote: Mon Dec 24, 2018 2:23 am Thanks, I got it working now. (I guess you meant to say to use the HOME key for an NMI?) The Pentagon timings are fine, but the samples are out of tune on a standard 128K, which doesn't happen on other emulators (e.g. Fuse). So it's just the 128 timings that are too fast.
I found the bug and i fixed it. I the next weeks i will release a new build with this bug and other fixed. MANY THANKS :D
User avatar
jcgamestoy
Drutt
Posts: 12
Joined: Sun Dec 23, 2018 10:40 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by jcgamestoy »

djnzx48 wrote: Mon Dec 24, 2018 2:23 am Thanks, I got it working now. (I guess you meant to say to use the HOME key for an NMI?) The Pentagon timings are fine, but the samples are out of tune on a standard 128K, which doesn't happen on other emulators (e.g. Fuse). So it's just the 128 timings that are too fast.
While I release the new version there is a way to fix the bug, add a Turbo Sound to the machine, that deactivates the internal AY and the AYs of the Turbo Sound don't have the bug.
zxwanderer
Drutt
Posts: 2
Joined: Tue Jun 19, 2018 4:19 pm
Contact:

Re: Retro Virtual Machine 2.0 beta 1 released

Post by zxwanderer »

Nice work, thank you for pretty emulator!
Waiting for kempston mouse emulation ;)
User avatar
jcgamestoy
Drutt
Posts: 12
Joined: Sun Dec 23, 2018 10:40 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by jcgamestoy »

zxwanderer wrote: Mon Dec 24, 2018 5:08 pm Nice work, thank you for pretty emulator!
Waiting for kempston mouse emulation ;)
it has kempston mouse emulation ;) Add the device in the devices panel, then press ALT+M (CMD+M in mac) to capture or release the mouse
zxwanderer
Drutt
Posts: 2
Joined: Tue Jun 19, 2018 4:19 pm
Contact:

Re: Retro Virtual Machine 2.0 beta 1 released

Post by zxwanderer »

jcgamestoy wrote: Mon Dec 24, 2018 6:07 pm it has kempston mouse emulation ;) Add the device in the devices panel, then press ALT+M (CMD+M in mac) to capture or release the mouse
Wow, yes! CMD+M is worked for ZX-Uno. Perfect! Thank you again! :D
User avatar
g0blinish
Manic Miner
Posts: 281
Joined: Sun Jun 17, 2018 2:54 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by g0blinish »

Didn't found Pentagon128(Russian clone) at list machines.
can you add assembler?

Then I choose Debugger, app crached after i click CPU. Well, it is beta.
Magnus
Dizzy
Posts: 61
Joined: Sat Jan 06, 2018 6:47 am
Location: Sweden

Re: Retro Virtual Machine 2.0 beta 1 released

Post by Magnus »

Great work, very nice GUI with an impressive attention to detail! I saw this a couple of years ago on OSX and look forward to playing with it on my Windows machine. Strangely, the emulator window freezes on my external display which is connected via DisplayLink. I guess there is some driver incompatibility. Hmm, it actually wakes up when I close the laptop lid, so I'll be all right :).
My ZX Spectrum emulator project: https://softspectrum48.weebly.com.
User avatar
druellan
Dynamite Dan
Posts: 1466
Joined: Tue Apr 03, 2018 7:19 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by druellan »

g0blinish wrote: Wed Dec 26, 2018 5:11 am Didn't found Pentagon128(Russian clone) at list machines.
You can emulate them via the ZXUNO emulation for now. Just fire a ZXUNO virtual machine, create a new SD virtual card and drag & drop any TRD. A bit complex but works.
User avatar
jcgamestoy
Drutt
Posts: 12
Joined: Sun Dec 23, 2018 10:40 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by jcgamestoy »

New version released with a lot of bug fixed:

Change Log:

https://www.retrovirtualmachine.org/boo ... gelog.html

Download from:

https://www.retrovirtualmachine.org
User avatar
Turtle_Quality
Manic Miner
Posts: 502
Joined: Fri Dec 07, 2018 10:19 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by Turtle_Quality »

It's looking very good.

Just noticed the developer mode. Although it has help commands, would be nice to get some more info on using the assembler, i guess that's coming later.
I was just thinking yesterday that it would be excellent if an emulator with monitor debugger could show us exactly where the raster is while single stepping or using breakpoints, to understand screen timing in our code. Is that what the menu below the emulation screen is going to do ? (last frame/raster/raster & previous...)

Keep up the good work
Definition of loop : see loop
User avatar
Joefish
Rick Dangerous
Posts: 2042
Joined: Tue Nov 14, 2017 10:26 am

Re: Retro Virtual Machine 2.0 beta 1 released

Post by Joefish »

Also to be able to view the 128K Shadow Screen - and ideally in a separate window so you can have both screens at the same time on separate monitors... :mrgreen:
User avatar
Turtle_Quality
Manic Miner
Posts: 502
Joined: Fri Dec 07, 2018 10:19 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by Turtle_Quality »

To answer my own question about the assembler, found the following on the RVM Site today

RVMv2 Also features a powerful integrated z80 assembler. You can compile your own programs from the debugger terminal.
The assembler uses LUA as "meta-language".
The "Programming Guide with RVMv2 Beta1" will soon be available.
Be warned that the development environment will change a lot in future versions.
Definition of loop : see loop
User avatar
Juan F. Ramirez
Bugaboo
Posts: 5102
Joined: Tue Nov 14, 2017 6:55 am
Location: Málaga, Spain

Re: Retro Virtual Machine 2.0 beta 1 released

Post by Juan F. Ramirez »

Just downloaded and it's visually impressive!
WDeranged
Drutt
Posts: 19
Joined: Tue Apr 14, 2020 10:28 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by WDeranged »

With emulators for Commodore (UK) systems I've always set my refresh rate to 50hz for the silky smooth scrolling. Is there any benefit to running 50hz with the UK computers that were mostly incapable of it? I know the Speccy occasionally manages a bit of smooth scrolling text so would these effects stutter with this emulator running at the standard 60hz?

Love the software by the way. Multi loading tapes is a bit clumsy but I otherwise adore the interface.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Retro Virtual Machine 2.0 beta 1 released

Post by Ast A. Moore »

WDeranged wrote: Fri Jun 19, 2020 11:18 pm I know the Speccy occasionally manages a bit of smooth scrolling text so would these effects stutter with this emulator running at the standard 60hz?
What do you mean “occasionally manages a bit of smooth scrolling text”? There are quite a few games—especially modern ones—that run at a steady 50 fps.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
AndyC
Dynamite Dan
Posts: 1388
Joined: Mon Nov 13, 2017 5:12 am

Re: Retro Virtual Machine 2.0 beta 1 released

Post by AndyC »

At 60Hz, everything will stutter to some degree. Even if a game only updated every other frame and thus had a smooth 25Hz, that doesn't divide cleanly into 60Hz and so there will inevitably be some disconnect between what the experience is supposed to be like and what an emulator will end up providing. How much this bothers you is a whole other matter, but if you're looking for perfect emulation then 50Hz (or some exact multiple thereof) is essential.
User avatar
cmal
Manic Miner
Posts: 619
Joined: Fri Jun 05, 2020 1:05 am
Location: California

Re: Retro Virtual Machine 2.0 beta 1 released

Post by cmal »

I only just ran into this emulator yesterday and I'm Impressed! Excellent work!
It's been out for a while... I feel like I've been living under a rock :|
Post Reply