JVic libGDX

You need an actual VIC.

Moderator: Moderators

User avatar
beamrider
Vic 20 Nerd
Posts: 833
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: JVic libGDX

Postby beamrider » Sat Feb 20, 2016 5:06 pm

I'm not an Android programmer, but are you sure there isn't a "KeyPress" event. In windows programming, you can ignore the lower level down/up messages and just handle the higher level 'keypress' abstraction if you wish.

User avatar
lance.ewing
Vic 20 Devotee
Posts: 262
Joined: Sat Nov 10, 2012 3:19 pm

Re: JVic libGDX

Postby lance.ewing » Sun Feb 21, 2016 6:48 am

Yeah, there is a "key typed" event, but that is passed a char rather than a keycode. So I suspect that keys such as shift and control may not get raised through that one since they don't represent a character as such. Would be worth testing that though.

User avatar
lance.ewing
Vic 20 Devotee
Posts: 262
Joined: Sat Nov 10, 2012 3:19 pm

Re: JVic libGDX

Postby lance.ewing » Sat Feb 27, 2016 11:49 am

joshuadenmark wrote:I've got the X5 from Ebay, great phone for the price, well worth the money indeed.

I added some debug timing code to the render method in my emulator. On my desktop, it is rendering 60 frames a second and spending less than 3 ms in the render method, so that's 3 ms out of the maximum 16.6 ms that a 60 fps would allow before having to resort to skipping frames. The emulator itself is running at the right speed for a VIC 20 and its not by choice that I'm running it at 60 fps. That seems to be what libGDX does on my Android phone and desktop, and I think different platforms might call the render method at different FPS rates. At 60 FPS, the emulator may choose to skip rendering the VIC 20 frame if a VIC 20 frame isn't actually ready for that particular invocation of the render method.

I ran the same debug timing when running on my Oneplus One android phone. In this case it was a bit tighter. On average it was spending about 10 ms within the render method on each invocation, which is edging close to the 16.6 ms delta rate at which this method gets called on my android phone.

So I'm starting to thing about putting some support in there for frame skipping, where it decides to skip drawing a VIC 20 frame so that the rest of the machine emulation can keep up with normal VIC 20 speed.

That's a long way of saying that I decided to buy a Doogee X5, since it is certainly cheap enough, and I think it will be a good lower spec Android device for testing purposes. My Oneplus One isn't near the top of the Android benchmarks by any means, in fact Oneplus are making their phones cheaper by using older technology (as Doogee must be as well). But the Oneplus One is a lot quicker than the very budget phones. So if I can get the emulator to work on a Doogee X5, then I'm hoping it will cover most bases.

User avatar
lance.ewing
Vic 20 Devotee
Posts: 262
Joined: Sat Nov 10, 2012 3:19 pm

Re: JVic libGDX

Postby lance.ewing » Sat Feb 27, 2016 4:22 pm

Well that's strange. I'll start by saying that from my first impressions, JVic seems to be running a lot smoother on the Doogee X5. The flashing cursor is much smoother than on my Oneplus One (which I need to look in to, because there's a flicker on my phone that I don't yet understand; no such flicker on the Doogee though).

My timing debug output is saying that the render method is being called about 8000 times a second on the Doogee, which is the bit I find unusual. Now, that doesn't actually affect the emulator as such. It just emulates as many cycles as the delta since the last render call, and only renders the VIC screen when a whole VIC frame is complete. So it doesn't really matter how many times the render method is invoked. I think libGDX relies on something within Android itself and can't actually request a desired rate for the render method to be invoked. It's just really weird that on this phone it's calling it so frequently.

£47 for this Doogee phone? I can't believe it's coping better than my Oneplus One :( .

So much for the Doogee being my low end test phone. I'll need to go cheaper for that it would seem. :?

User avatar
joshuadenmark
Big Mover
Posts: 911
Joined: Sat Oct 23, 2010 11:32 am
Location: Denmark
Occupation: Copier technician

Re: JVic libGDX

Postby joshuadenmark » Sun Feb 28, 2016 11:19 am

:D told You so, great value for the money with the Doogee 8)
Go for at thrashfindphone 8)
Kind regards, Peter.
____________________________________________________
In need of a wiki logon - PM me

User avatar
lance.ewing
Vic 20 Devotee
Posts: 262
Joined: Sat Nov 10, 2012 3:19 pm

Re: JVic libGDX

Postby lance.ewing » Sat Jun 11, 2016 3:16 pm

I realised a few weeks back that this year is the 20th anniversary of when I released my very first VIC 20 emulator.

https://groups.google.com/forum/#!searc ... ePxDY3nX8J

It makes me think that I should try to release a publicly available build of JVic libGDX by the end of the year as a 20 year anniversary of V20. I've just been too absorbed with the 6561 die shot over recent months to have spent any time on the JVic libGDX project.


Return to “Emulation and Cross Development”

Who is online

Users browsing this forum: No registered users and 1 guest