GAMELEGEND 2020-05-04 17:44
Oh and when the CPU reaches max does everything just slow down and some things start actin weird or is there more things happenin
was8bit 2020-05-04 19:46
While your game is playing, hit the little button in the upper right corner and select ENABLE DEBUG MODE... do the same thing to turn it off...
And yes, when it goes to MAX things can start behaving oddly... you should always try to prevent your game to go to MAX, and if it does it will occasionally act funny... i "THINK" that it skips a line of code or so or maybe skips other things upon occasion...
Just be glad it doesnt crash your game when it hits MAX ;)
GAMELEGEND 2020-05-04 20:21
Thanks for the second answer
But on the first answer i thought of a better way to ask my question
I want to know what makes the debug mode work
I want to know how it works
I want to know what makes it tick
was8bit 2020-05-04 21:22 (Edited)
I dont know precicely... i do know it is timed at 60frames/second, so 1/60 of a second per frame... i am guessing that the code execution cannot exceeed 1/60 a second between each WAIT command...
... hopefully Timo can better respond :)
was8bit 2020-05-05 02:14
Per HELP section...
LowRes NX has a simplified simulation of CPU cycles. There is a fixed limit of cycles per frame. This assures the same program execution speed on all devices, so if you optimize your program on your device to run smoothly, it will run the same on all other devices.
Each execution of a command, function or operator, as well as access to a variable or a constant count 1 cycle. Some operations have additional costs:
String creation and modification count 1 cycle per letter.
Array initialization counts 1 cycle per element.
Memory area modification counts 1 cycle per byte (not single byte modifications like POKE).
BG area modification and text output count 2 cycles per cell (not single cell modifications like CELL).
Total cycles per frame 17556
Cycles per VBL interrupt 1140
Cycles per raster interrupt 51
The main program may spend any number of cycles, but when the limit is reached before a WAIT VBL or WAIT command, the execution continues in the next frame. If interrupts exceed their limit, you will see black scanlines on the screen.
was8bit 2020-05-05 02:19
Check out this speed test...
was8bit 2020-05-05 02:21
This seems to suggest that there are 3 cpu cycles in my code per "loop"...
GAMELEGEND 2020-05-05 02:28
I have never gotten those scan lines and i have definitely passed the limit no doubt about that one right there
was8bit 2020-05-05 02:37
Also, use AB buttons to make the delay loop longer, let go to let it speed up...
was8bit 2020-05-05 02:40
Post what you have here that is MAX and i can check it out :)
GAMELEGEND 2020-05-05 02:52 (Edited)
This is breaking lowres
this is destroying the CPU
it is MURDERING the CPU
and probably breaking my ipad
And i also tried WAIT
But still no scan lines
Timo 2020-05-05 06:10
Scanlines only work with the ON RASTER CALL command. All other commands are always executed between the screen refreshes. This is where the simulation of real hardware ends ;)
GAMELEGEND 2020-05-05 06:10
was8bit 2020-05-05 08:41
Well... not sure what you were trying to create, so i took the liberty, inspired by you, to create this :)
was8bit 2020-05-05 08:45
This is an example of some tricks.... perhaps this is what you where looking for?
GAMELEGEND 2020-05-05 14:00 (Edited)
I wasn't trying to create anything i was just trying to break lowres to get some scan lines
That is why i did j = 0 to 90000
But then timo replied and i knew what i was doing would not give me scan lines
But when i did j = 0 to 16 i made a pretty cool program
was8bit 2020-05-05 16:14