English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Tutorials

 
 
Thread Tools
Old 03 July 2024, 01:06   #1
Oli1974
Registered User
 
Join Date: Jun 2024
Location: Bogotá, Colombia
Posts: 2
How to create a View with Rastport in BASIC?

Hi folks,

I am Oliver, 50 yo, used to code a lot back in the day. My biggest (and only commercial) project was a 3D editor with rendering software.

In 1989 I started to write some sort of "virtual machine" that resembles an ancient 8 bit computer. Just for fun and to practise skills. I got quite far until 1992 when I dropped it.

Fortunately I never lost my Amiga data, because in 2004 when I sold my last physical machine (an A3k, fully loaded) I took an rdf image of the hard drive and still use it with WinUAE to the day.

Later I became a professional (Perl) programmer, and when I had some beers and got bored, I rediscovered the aforementioned project and finished it, still in BASIC, but using my now more advanced skills. I even implemented a character generator and nibble organized attribute ram, and also "hardware" blinking. All in BASIC! More than 4600 lines of code And blazing fast even on a hardware machine.

Right now, I am using an Intuition screen without a window, because it turned out to be a lot faster (nearly 5 %). Out of curiosity I was thinking, maybe I should switch to a "naked" view with rastport. But how do I do that? I am running OS 3.9. While the "virtual machine" is running multitasking isn't needed, but I still want to have it system friendly.

Could anybody guide me a bit as per how I can do that? I want to have a 3 bitplane 640 x 512 View with a RastPort to draw into.

Edit:
If somebody wants a live demo to see how crazy I am, no problem Write me a private message and we can have a screen sharing session over Skype.
Attached Thumbnails
Click image for larger version

Name:	source.png
Views:	32
Size:	118.2 KB
ID:	82576   Click image for larger version

Name:	kalender.png
Views:	29
Size:	21.5 KB
ID:	82578   Click image for larger version

Name:	source_bas.png
Views:	31
Size:	32.8 KB
ID:	82579  

Last edited by Oli1974; 03 July 2024 at 22:27.
Oli1974 is offline  
Old 03 July 2024, 09:06   #2
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,327
Quote:
Originally Posted by Oli1974 View Post
Right now, I am using an Intuition screen without a window, because it turned out to be a lot faster (nearly 5 %). Out of curiosity I was thinking, maybe I should switch to a "naked" view with rastport.
What kind of advantage you expect from doing so? It is not going to be faster. It will only interact badly with intuition which is then no longer able to manage your screen, and it will be less compatible.


Drawback of writing into the rastport of the screen is that there is no clipping, which means that whenever you overrun the screen boundaries, you will write into memory and trash whatever is placed there. Or to put differently, you need to clip yourself, which is also not necessarily for free.



Quote:
Originally Posted by Oli1974 View Post
But how do I do that? I am running OS 3.9. While the "virtual machine" isn't running multitasking isn't needed, but I still want to have it system friendly.
Then use a screen. That is system friendly.



Quote:
Originally Posted by Oli1974 View Post

Could anybody guide me a bit as per how I can do that? I want to have a 3 bitplane 640 x 512 View with a RastPort to draw into.
There is example code in the RKRM libraries, actually, but it is also said there that this is not recommended.
Thomas Richter is offline  
Old 03 July 2024, 15:30   #3
Oli1974
Registered User
 
Join Date: Jun 2024
Location: Bogotá, Colombia
Posts: 2
Quote:
Originally Posted by Thomas Richter View Post
he rastport of the screen is that there is no clipping, which means that whenever you overrun the screen boundaries, you will write into memory and trash whatever is placed there. Or to put differently, you need to clip yourself, which is also not necessarily for free.
I am of course aware of that and implemented my own clipping already. Actually, works better than the OS clipping which turned out to have its flaws.
Attached Thumbnails
Click image for larger version

Name:	circs.png
Views:	25
Size:	70.8 KB
ID:	82594  
Oli1974 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mechanical keyboards from RastPort Krashan News 41 17 July 2023 17:40
How does one create Blitz Basic compatible anim files? earok Coders. Blitz Basic 6 06 February 2017 16:54
A script to create a bootable floppy from Blitz Basic 2 iso TenLeftFingers support.Apps 17 20 November 2016 21:09
RastPort fields (PenWidth and PenHeight) Gilloo Coders. System 1 19 May 2013 21:59

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:52.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10332 seconds with 16 queries