BBC BASIC
« Interrupts »

Welcome Guest. Please Login or Register.
Mar 31st, 2018, 11:10pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Cross-platform BBC BASIC (Windows, Linux x86, Mac OS-X, Android, iOS, Raspberry Pi)
BBC BASIC Resources
BBC BASIC Help Documentation
BBC BASIC for Windows Home Page
BBC BASIC Programmers' Reference
BBC BASIC Beginners' Tutorial
BBC BASIC for SDL 2.0 Home Page
BBC BASIC Discussion Group

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Interrupts  (Read 839 times)
Ric
New Member
Image


member is offline

Avatar




PM


Posts: 30
xx Re: Interrupts
« Reply #3 on: Jun 19th, 2016, 1:34pm »

Thanks Richard,

Again for the detailed answer. You are right, I was checking eax directly on return, hence the failure.

The reason I want to access the keyboard in assembler is just to test my 3d software without dropping fps. When I have sorted it to a standard which I am happy with ,i will put a proper user interface in, in Basic.

Ric

PS. It is all just for a personal challenge. And why not, it's fun.
User IP Logged

You can't succeed without failing a few times first, CHIN UP.
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 803
xx Re: Interrupts
« Reply #4 on: Jun 19th, 2016, 3:16pm »

on Jun 19th, 2016, 1:34pm, Ric wrote:
The reason I want to access the keyboard in assembler is just to test my 3d software without dropping fps.

Remember that there is virtually no benefit in the frame rate exceeding about 60 fps, because the eye/brain system cannot perceive the difference. The only effect is to waste CPU time and flatten batteries prematurely! Having spent much of my career in the business of generating high-quality video I am not impressed by meaningless FPS values. tongue

The thing to aim for is a fixed frame rate (ideally synchronised with the display refresh) and then to take full advantage of those 16 milliseconds or so per frame to make your graphics look as nice as possible. When looked at from that viewpoint there's no need for your assembler code to test the keyboard or the mouse, just return to BASIC at the end of each frame. The effect on the overall execution time will be tiny, and the effect on the frame rate zero (so long as you are locked to the vsync).

I wonder if you've checked the CPU time used by the WORLD.BBC example program supplied with BB4W. That renders a 3D rotating sphere, texture-mapped with an image from NASA, and illuminated by a virtual sun. It runs at approaching 100 fps, is written in 100% BASIC code (even D3DLIB is all BASIC) and uses less than 1% CPU on my laptop!

Richard.
User IP Logged

Ric
New Member
Image


member is offline

Avatar




PM


Posts: 30
xx Re: Interrupts
« Reply #5 on: Jun 22nd, 2016, 09:46am »

Cheers, I'll have a look.
User IP Logged

You can't succeed without failing a few times first, CHIN UP.
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls