Recent Posts

Pages: 1 2 [3] 4 5 ... 10
General Discussion / Re: Adjusting the Frame Rate on Lunar Lander
« Last post by Astrosynthesist on April 24, 2017, 06:40:34 PM »
Okay, I'm back with further insight.

Try the version of lunar.bas but with the included diff applied to it (or just lunarmod2.bas, which is just that).

Now I'm hitting the frame rate limit you were speaking of before. Specifically, it is 96 fps. (that's the setting from my diff). In my previous post I was testing at 120 fps and that was why the timing was all wrong.
The game now runs perfectly well at 60fps and I recommend playing it at that speed. But pushing it to its limits at 96fps reveals something interesting - a flicker appears on my Vectrex every once in a while, where it misses a frame or two. I'm not sure why.
So by cutting out the TextListSprite references I boosted the maximum possible frame rate from 35 to 96.
I'm wondering if there's another function being called in the program which is another limiting factor. When I adjust the frame rate you can actually hear the scans slow down when changing between 96 and 97 fps. This one will be a bit harder to isolate (at least on my end, only playing with the basic side) but as it stands I think 96 fps is more than adequate for most applications.
Also be aware that all of the data omitted from the screen is now printed to terminal (and the stats appear once per second, mostly as a cheat so I could visually "tick" every second and check that one second for the vectrex is one second in real life. You can change it to frame by frame prints by removing the if statement at the end of the main while loop (exposing the print statement).
General Discussion / Re: Adjusting the Frame Rate on Lunar Lander
« Last post by Astrosynthesist on April 24, 2017, 03:05:23 PM »
This post should probably be moved to bug reports...

A few notes:
In lunar.bas, after breaking, you can increase frame rate to 35 and the frame rate will increase. Once you hit 36, it slows down again (and increases from there such that setting to 60 is equal to setting to 30).
This is strange but it gets stranger.
I've narrowed part of the problem to the TextListSprite function.
If you comment all references to those sprites (instructions, stats, msg) out the vectrex is able to boost the frame rate to 120 no problem.
The next weird thing I'm noticing after that is that the timing gets all screwed up. I add the line "call setFrameRate(120)" to the beginning of the code, and the framerate indeed stays at 120, (and the frameRate variable depends on the getFrameRate() call later so that's all fine) and yet the game runs super sluggish. I'm not sure what is calculating the timing that is causing this but I will continue to investigate this a bit later.

Anyways, I'm almost positive the frame rate barrier is not a hardware issue but just a bug as stated above. I believe this because I can stop what's running, create a simple text sprite, and adjust the frame rate as high or low as I please without problems.
Feature Requests and Bug Reports / Crashing in live shell
« Last post by Astrosynthesist on April 24, 2017, 02:16:31 PM »
Boot Vectrex32, hit ^C to enter live shell
I noted that if I'm in the middle of creating a while loop in the live shell, such as:
Code: [Select]
move = 122
while 1
call MoveSprite(-50,0)
call TextSprite(move
And then I realize I forgot something so I break to get out of it:
Code: [Select]
move = 122
while 1
call MoveSprite(-50,0)
call TextSprite(move^C
I usually have to hit enter for the break to register.
Then the very next command I enter soft crashes the Vectrex 32.
(The two I've tried are print(move), print(), and call MoveSprite(50,0), all of which crash the Vectrex32.
It then reboots to the standard menu (no errors output on terminal)
Then I once had it crash again and reboot without even connecting to the shell.

From the testing I've done, this happens in these circumstances but it's hard to make happen using any general commands. It might involve function calls as this also works:
Code: [Select]
while 1
call MoveSprite(0,50)
call MoveSprite(1,50)^C
I found the bug in my code that prevented the V32 from reading the Y axis of controller 2's joystick. It will be fixed in the next firmware release.

- Bob
Easy to replicate technique for vectrex32 crash in Demo3d:

Hold Button 3
Hold stick left

The first tie fighter should whizz off to the left and in a matter of a few seconds the vectrex32 will crash (I get ejected from my terminal session), then the vectrex/vectrex32 will reboot with the typical vectrex32 title screen (but interestingly with a highscore of 0 appearing as well), and it functions as normal again.
Out of curiosity I tried something tonight with interesting results.
I stopped all running programs and entered these lines into the shell:

while true
buttons = waitforframe(2,3,3)
call clearscreen()
call TextSprite(buttons[1,1] + " ")

It works, and when I change the frame rate the frame rate indeed does change.
Here are the peculiarities:
Moving the joystick left and right changes the values of the digits on screen
Moving the joystick up and down changes the sound of the buzz that the vectrex makes and also moves the text on screen ever so slightly.
This is weird as I would have expected the raster font to not be affected by the vertical position of controller 1.
As a quick update I have made the 3d demo run out of memory in the manner you specified (being able to still communicate over the command line and recover) but I have also made the vectrex32 crash - it involved generating about 5 fighters, pressing buttons 2 and 3 at the same time (and moving the stick up, zooming in), then rotating them off the screen to the left, not even very far off frame. The Vectrex32 crashed and I was ejected from the terminal session. I will work on a technique to reliably replicate that crash in the near future.
General Discussion / Re: Adjusting the Frame Rate on Lunar Lander
« Last post by Astrosynthesist on April 20, 2017, 09:33:47 PM »
In your docs you mentioned that heavy computation might slow down the frame rate... next time I play around with it I'll start removing blocks of code here and there until I find whether or not the limiting factor is one particular call or a combination of everything that's causing the slowdown. I'll probably be playing with it again on Saturday or Sunday.
Okay, thank you
General Discussion / Re: Adjusting the Frame Rate on Lunar Lander
« Last post by Vectrex32 on April 20, 2017, 09:05:52 PM »
I've seen that too, and investigated it a fair amount. What's happening is that the Vectrex/V32 system seems to have a maximum frame rate somewhere around 60 or 80. I don't know if the limiting factor is the Vectrex or the Vectrex32. When you jack the frame rate up to 120, the screen refreshes at around 60 to 80 fps, but since the V32 is using 120 as its time base, the timing of the game is thrown off.

- Bob
Pages: 1 2 [3] 4 5 ... 10