English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 12 June 2018, 17:14   #1
E-Penguin
Banana

 
Join Date: Jul 2016
Location: Darmstadt
Posts: 590
Blitz and RTG?

I realise Blitz is really all about banging the hardware and CopLists and sprites and such, but should an intrepid developer want to branch out into the world of RTG, how might one go about it? Is it simply a case of using the OS graphics functions in Amiga mode?
E-Penguin is offline  
AdSense AdSense  
Old 12 June 2018, 17:39   #2
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 2,933
Yep, pretty much. All the graphics library calls are available, but there are a lot of the built-in commands that can also be used on RTG systems. Unfortunately, it's difficult to tell with the Blitz editor, but for example WBlit, BitmaptoWindow, WScroll and the other window graphics commands will all work well if you're doing relatively simple stuff, and obtaining the required details from system windows, screens etc. is relatively easy so you can still use the built-in commands for the rest of your program.

If AmiBlitz 3 is an option, I would recommend it. First, the editor highlights commands that bang the hardware in red, so for RTG you know to avoid any graphics operations that are so highlighted (non-graphics commands that are highlighted, e.g. joystick reading, will still work fine on classic hardware). And second, it comes with a number of graphics includes (e.g. dbl_display.include for an RTG-friendly double-buffered display and image.include for loading, saving, blitting and otherwise manipulating images), which give you a nice set of wrappers for the OS graphics routines, along with some other capabilities such as easily loading other image formats, scaling, blending, 24-bit support and so on. Of course, some of the operations like scaling will be quite slow, but it's available and comes with some simple examples.
Daedalus is offline  
Old 12 June 2018, 17:43   #3
E-Penguin
Banana

 
Join Date: Jul 2016
Location: Darmstadt
Posts: 590
Nice, I'll give that a go as my next project. I might assume that anything with an RTG board has an FPU in it* so using AmiBlitz3 directly makes sense.

except my A500, which has an RTG board thanks to your zorro adaptor but no FPU on the ACA1221. Typical. Maybe I'll go shopping...
E-Penguin is offline  
Old 12 June 2018, 17:50   #4
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 2,933
Hmmm, yep, you'll definitely need an FPU for the IDE unfortunately, and possibly for the executables produced too. Kinda annoying.

I did start my own little project a few years ago to backport the AB3 includes to Blitz 2.1. It hasn't gone beyond a few partial includes I needed for a particular program, and doesn't cover the graphics ones unfortunately. They make heavy use of some of the AB3 syntax changes, and of other includes, so it's a much bigger task than simply copying them over. Some day I'll get to it...
Daedalus is offline  
Old 17 June 2018, 01:10   #5
ExiE
Registered User

 
Join Date: Apr 2016
Location: T/C
Posts: 62
FPU requirement makes BB3 lot less usable...
ExiE is offline  
Old 11 July 2018, 00:56   #6
earok
Registered User

 
Join Date: Dec 2013
Location: Auckland
Posts: 1,700
I've been working on an update to the intro to Giana Sisters SE, it's not system friendly currently (uses InitCopList etc) but I can't see any reason why it couldn't be made entirely system friendly since it essentially just displays bitmaps and plays sounds.

The question I have is, assuming the user has an RTG card and an OCS machine - is there any way to display 256 colour bitmaps with just the built in Blitz (BB2) commands, or would I need to use special libraries for that?
earok is offline  
Old 11 July 2018, 17:17   #7
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 2,933
I don't know if you consider the graphics.library calls in the built-in category, but using them would be the best option without using external libraries or AmiBlitz 3. Most of the built-in graphics commands like Blit bang the hardware directly, so simply won't work on anything other than the chipset the machine is fitted with.
Daedalus is offline  
Old 11 July 2018, 19:30   #8
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,448
WBlit might work.
idrougge is offline  
Old 12 July 2018, 01:38   #9
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 2,933
Yeah, WBlit is system friendly indeed, though there's no W-equivalent of BBlit or QBlit, which limits it somewhat. It really comes down to what and how exactly you need to draw the various objects.
Daedalus is offline  
Old 12 July 2018, 01:42   #10
earok
Registered User

 
Join Date: Dec 2013
Location: Auckland
Posts: 1,700
I shouldn't need to Blit (though that's handy to know!), it more or less just comes down to loading and fading graphics (a slide show, essentially). My question was more around being able to render 8 bitplane bitmaps on an OCS machine IF an RTG card was present, if that was possible in any way.
earok is offline  
Old 12 July 2018, 02:22   #11
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,448
It certainly is possible. Foundation was made in Blitz and runs on graphics cards.
idrougge is offline  
Old 12 July 2018, 15:24   #12
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 2,933
Yep, so long as you use the OS it should be doable. Even handling 8 bitplane bitmaps can't be done on an OCS machine using the chipset, so you just need to avoid those commands. Having an RTG card in the system doesn't change that capability unfortunately.

From what I remember, Foundation uses the Mildred library, which offers lots of graphics functions that use the OS rather than bang the hardware directly. That's an extra command library, but is included with the Ultimate Blitz installation so you probably already have it installed and ready to go.
Daedalus is offline  
Old 12 July 2018, 19:09   #13
E-Penguin
Banana

 
Join Date: Jul 2016
Location: Darmstadt
Posts: 590
Looks good
http://www.david-mcminn.co.uk/blitz-...hives/mildred/
E-Penguin is offline  
AdSense AdSense  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blitz 2.1 Manual Akira Coders. Blitz Basic 5 24 May 2017 07:47
[blitz basic] How much amiga-blitz friendly is this? saimon69 Coders. Blitz Basic 104 29 November 2016 20:45
The Blitz Defender support.Apps 15 14 January 2014 22:55
blitz incbin.. yoki Coders. General 5 03 April 2009 12:29
Blitz CD? Graham Humphrey Coders. General 5 08 February 2005 13:49

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 04:37.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.07177 seconds with 14 queries