JVic libGDX
Moderator: Moderators
Re: JVic libGDX
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.
-
- Vic 20 Afficionado
- Posts: 413
- Joined: Sat Nov 10, 2012 3:19 pm
- Website: https://sites.google.com/site/mos6561vic/
Re: JVic libGDX
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.
-
- Vic 20 Afficionado
- Posts: 413
- Joined: Sat Nov 10, 2012 3:19 pm
- Website: https://sites.google.com/site/mos6561vic/
Re: JVic libGDX
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.joshuadenmark wrote:I've got the X5 from Ebay, great phone for the price, well worth the money indeed.
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.
-
- Vic 20 Afficionado
- Posts: 413
- Joined: Sat Nov 10, 2012 3:19 pm
- Website: https://sites.google.com/site/mos6561vic/
Re: JVic libGDX
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.![Confused :?](./images/smilies/icon_confused.gif)
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
![Sad :(](./images/smilies/icon_sad.gif)
So much for the Doogee being my low end test phone. I'll need to go cheaper for that it would seem.
![Confused :?](./images/smilies/icon_confused.gif)
- joshuadenmark
- Big Mover
- Posts: 1218
- Joined: Sat Oct 23, 2010 11:32 am
- Location: Fr-Havn, Denmark
- Occupation: Service engineer
Re: JVic libGDX
![Very Happy :D](./images/smilies/icon_biggrin.gif)
![Cool 8)](./images/smilies/icon_cool.gif)
Go for at thrashfindphone
![Cool 8)](./images/smilies/icon_cool.gif)
Kind regards, Peter.
____________________________________________________
In need of a wiki logon - PM me
____________________________________________________
In need of a wiki logon - PM me
-
- Vic 20 Afficionado
- Posts: 413
- Joined: Sat Nov 10, 2012 3:19 pm
- Website: https://sites.google.com/site/mos6561vic/
Re: JVic libGDX
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.
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.