English Amiga Board


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

 
 
Thread Tools
Old 18 July 2019, 10:25   #201
Retro1234
Boo

Retro1234's Avatar
 
Join Date: Jun 2006
Location: 5150
Posts: 4,366
Thanks ill check out REDShapez
Retro1234 is offline  
Old 10 September 2019, 04:02   #202
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,927
RedShapeZ is quite useful. You can use it to grab sprites automatically if you've laid out your shapes in a (visible) grid.
idrougge is offline  
Old 10 September 2019, 18:00   #203
activist
Registered User

 
Join Date: May 2017
Location: here
Posts: 50
software failure

New to Blizbasic, and playing about with some of the code on the ultimateblitzbasiccd e.g. triplanes.bb2 in Examples/tedsdemos folder

However, when compile and run, they run fine but when I exit the relevant demo, it always results in "program failed (error #87000004) Wait for disk activity to finish. Suspend or Reboot.

Tried some of the other examples same result. Also Tried 'compile and run' and 'create executable...'

Using winuae 4.2.1, BB2.1 + A1200 configuration + blizzard 030, os 3.1 running in a window.

Maybe has to be an absolute vanilla A1200 to run correctly perhaps ?
activist is offline  
Old 10 September 2019, 20:03   #204
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 476
Quote:
Originally Posted by activist View Post
New to Blizbasic, and playing about with some of the code on the ultimateblitzbasiccd e.g. triplanes.bb2 in Examples/tedsdemos folder

However, when compile and run, they run fine but when I exit the relevant demo, it always results in "program failed (error #87000004) Wait for disk activity to finish. Suspend or Reboot.

Tried some of the other examples same result. Also Tried 'compile and run' and 'create executable...'

Using winuae 4.2.1, BB2.1 + A1200 configuration + blizzard 030, os 3.1 running in a window.

Maybe has to be an absolute vanilla A1200 to run correctly perhaps ?
Hmm, works for me with a similar configuration, maybe something is wrong with your BB2.1 install. How did you install Blitz Basic 2? Have you tried installing from my newly modified version of the blitz 2 CD? This one: http://eab.abime.net/showthread.php?t=98664
MickGyver is offline  
Old 11 September 2019, 00:11   #205
activist
Registered User

 
Join Date: May 2017
Location: here
Posts: 50
Quote:
Originally Posted by MickGyver View Post
How did you install Blitz Basic 2?
Thanks, copied the installer from:
http://aminet.net/package/dev/basic/ubbinstall
to the ultimate bb cd and ran that. 2 assigns - blitzlibs and blitz2. No errors or issue running compiling or installing. But will try a re-install using that other link just in case.

edit: am pretty sure it's due to something on my uae config unfortunately as I get the same result when try to run any of the 'pre compiled' BB executables on the ultimate cd e.g. blitz2_pddisk2\worm\

Thanks

Last edited by activist; 11 September 2019 at 00:23.
activist is offline  
Old 26 September 2019, 16:36   #206
activist
Registered User

 
Join Date: May 2017
Location: here
Posts: 50
another noob question with winuae with rtg enabled.
When run a blitz game demo from workbench sometimes the native screen the blitz game runs on is hidden. I can hear game sounds, but no video. stays on the workbench screen but is frozen until the blitz demo in the background or native screen ends.
Have set both native and rtg as 'windowed' in winuae display options.
Is there a way of switching from rtg to native if doesn't happen automatically. Or do I have to configure something in picasso96 prefs in workbench for this. Doesnt happen for every blitz game/demo. Just some. thank you.
activist is offline  
Old 30 September 2019, 03:47   #207
Nightshft
Registered User

Nightshft's Avatar
 
Join Date: Mar 2018
Location: Austria
Age: 44
Posts: 196
In AB2 when printing output to cli (not opening any windows or screens) - I just get a cli in full width, but only with 4 lines. Anyway to create a bigger cli window for standard output?
Nightshft is online now  
Old 11 October 2019, 18:12   #208
Nightshft
Registered User

Nightshft's Avatar
 
Join Date: Mar 2018
Location: Austria
Age: 44
Posts: 196
I have a problem with ReadFile and Inkey$ when the Debugger is running. It normally works fine, but with active debugger it says "No currently used object!"

Code:
if readFile(0,"filename")
  fileInput 0
  y=asc(inkey$)  <- error
  or
  bla=cvq(inkey$(4))  <- same
  closeFile 0
Seems like inkey$ sees no active fileInput although its defined one line before. Only when the debugger is running. Am I missing something, or is there a workaround?
(Blitzbasic 2.42. Without debugger this never happens. With debugger always.)
Nightshft is online now  
Old 13 October 2019, 18:29   #209
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,292
Quote:
Originally Posted by activist View Post
When run a blitz game demo from workbench sometimes the native screen the blitz game runs on is hidden. I can hear game sounds, but no video. stays on the workbench screen but is frozen until the blitz demo in the background or native screen ends.
Have set both native and rtg as 'windowed' in winuae display options.
Is there a way of switching from rtg to native if doesn't happen automatically. Or do I have to configure something in picasso96 prefs in workbench for this. Doesnt happen for every blitz game/demo. Just some. thank you.
This is a strange one indeed, and it's not one I've ever seen... Any time I open a native screen WinUAE will automatically switch to that in a window. Which demos in particular are causing this? Does it happen 100% of the time with those particular demos? Are you using the latest WinUAE?

Quote:
Originally Posted by Nightshft View Post
In AB2 when printing output to cli (not opening any windows or screens) - I just get a cli in full width, but only with 4 lines. Anyway to create a bigger cli window for standard output?
Not that I know of. AB3 has an option in the IDE preferences window for defining the console output device. This is normally CON: but can be modified to also include size parameters. AB2 and BB2 don't appear to have this option however.

Quote:
Originally Posted by Nightshft View Post
I have a problem with ReadFile and Inkey$ when the Debugger is running. It normally works fine, but with active debugger it says "No currently used object!"

Seems like inkey$ sees no active fileInput although its defined one line before. Only when the debugger is running. Am I missing something, or is there a workaround?
(Blitzbasic 2.42. Without debugger this never happens. With debugger always.)
And it works perfectly without the debugger? That sounds like a debugger bug - there are a couple of them unfortunately. It's not ideal, but you can disable the debugger for certain commands by using the RunErrsOff command before it, and then re-enable it afterwards with RunErrsOn.
Daedalus is offline  
Old 14 October 2019, 03:10   #210
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,927
Quote:
Originally Posted by Nightshft View Post
I have a problem with ReadFile and Inkey$ when the Debugger is running. It normally works fine, but with active debugger it says "No currently used object!"

Code:
if readFile(0,"filename")
  fileInput 0
  y=asc(inkey$)  <- error
  or
  bla=cvq(inkey$(4))  <- same
  closeFile 0
Seems like inkey$ sees no active fileInput although its defined one line before. Only when the debugger is running. Am I missing something, or is there a workaround?
(Blitzbasic 2.42. Without debugger this never happens. With debugger always.)
I wouldn't use Inkey$ for reading a file, but in case the debugger is bothering you, you can turn it off and on for specific blocks of source code. The commands are Runerrsoff/Runerrson.
idrougge is offline  
Old 17 October 2019, 16:15   #211
Nightshft
Registered User

Nightshft's Avatar
 
Join Date: Mar 2018
Location: Austria
Age: 44
Posts: 196
Quote:
Originally Posted by Daedalus View Post
And it works perfectly without the debugger? That sounds like a debugger bug ...
Yes it does. Guess it's a debugger bug then (AB2 2.42). I just was wondering if I'm doing something wrong or how to get around this. RunErrsOff/On seems like a fine workaround (it's not my own sourcecode so I'm not changing the inkey$ method against something else). Thanks!

Another question: when drawing 2d on a bitmap with line, boxF and all that I don't have to care about clipping, right? I deliberately drew out of the bitmaps bounds and it didn't crash, but maybe that doesn't prove anything if there's enough free ram around the bitmap
Nightshft is online now  
Old 17 October 2019, 16:39   #212
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,292
Hmmm, normally the drawing commands *aren't* clipped, and will trigger the debugger when they draw out of bounds. They will silently overwrite neighbouring memory without the debugger, which could also be another area of the same bitmap causing graphical glitches, or damaging code or data. So I would make sure that there's no way your code can draw outside the bitmap.
Daedalus is offline  
Old 05 November 2019, 16:23   #213
Nightshft
Registered User

Nightshft's Avatar
 
Join Date: Mar 2018
Location: Austria
Age: 44
Posts: 196
First I was surprised that you have to take care about clipping, but then again.. not lol.

Thx for all your help daedalus! Is it ok if I ask more? I'm in the process of learning Blitz, but lack of namespace and complete documentation and all those language additions make it a little jungle to wrestle through

Is there a function to return the filename of a path+name or do I have to build one from "Instr" and co?

Is scroll and blockscroll the same? The reference mentions scroll in the chapter about 2d drawing. Code examples seem to use blockscroll more often. I didn't find info about it.

And is there a way to get an overview about the language additions and/or libraries that came later?
Nightshft is online now  
Old 05 November 2019, 17:07   #214
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,292
Quote:
Originally Posted by Nightshft View Post
First I was surprised that you have to take care about clipping, but then again.. not lol.
Yeah, the drawing commands are pretty close to the hardware, so using them responsibly and safely is up to you - the hardware will blit your data wherever you want it, be it a bitmap, a window, or your program stack

There is a clipped blit command you can use, but it's much slower than normal blits because every blit needs to be checked to make sure it's not beyond the boundaries of the bitmap. It's much quicker to just ensure your code can never produce a blitting location outside the bitmap.

Quote:
Is there a function to return the filename of a path+name or do I have to build one from "Instr" and co?
Building one from Instr() is probably quite a quick way of doing it. Blitz 2.1 doesn't have a function for extracting a filename from a path, but AB3 does include functions in its Includes that do. However, Amiga's dos.library itself has that and similar functions that you can use, e.g. Filepart_(). You just need to be careful to use pointers to strings instead of the actual strings. This is what the AB3 include does - it should work perfectly in BB" as well:

Code:
Function.s dos_FilePart {filename.s}
fptr.l = FilePart_(&filename.s)
If fptr
  filepart.s = Peek.s(fptr)
Else
  filepath.s = ""
End If
Function Return filepart.s
End Function
That function essentially acts as a Blitz-friendly wrapper for the raw dos.library call.

Quote:
Is scroll and blockscroll the same? The reference mentions scroll in the chapter about 2d drawing. Code examples seem to use blockscroll more often. I didn't find info about it.
They're very similar, but not the same. Blockscroll is basically a much faster version of the Scroll command that can only be used on 16-bit aligned chunks. In effect, this means it can only be used for blocks of bitmap that are multiples of 16 pixels wide, and are located multiples of 16 pixels across the bitmap. If you can ensure these rules, Blockscroll is much faster, but if you can't use the normal scroll.

As an aside, the Block command is the equivalent fast-with-alignment-restrictions counterpart of the Blit command.

Quote:
And is there a way to get an overview about the language additions and/or libraries that came later?
The BUM issues included in the Ultimate Blitz CD and AB3 include the various updates and their documentation. There's also a good overall AmigaGuide document included with AB3, and possibly on previous versions of Blitz that includes the original guide and all the additional libraries. I vaguely remember there was a guide in the older releases - maybe userlibs.guide?
Daedalus is offline  
Old 05 November 2019, 19:14   #215
Shatterhand
Warhasneverbeensomuchfun

Shatterhand's Avatar
 
Join Date: Jun 2001
Location: Rio de Janeiro / Brazil
Age: 36
Posts: 3,430
Quote:
Originally Posted by Nightshft View Post
I have a problem with ReadFile and Inkey$ when the Debugger is running. It normally works fine, but with active debugger it says "No currently used object!"

Code:
if readFile(0,"filename")
  fileInput 0
  y=asc(inkey$)  <- error
  or
  bla=cvq(inkey$(4))  <- same
  closeFile 0
Seems like inkey$ sees no active fileInput although its defined one line before. Only when the debugger is running. Am I missing something, or is there a workaround?
(Blitzbasic 2.42. Without debugger this never happens. With debugger always.)
GODDAMN IT I was fighting with this for a long time until I gave up and just changed the way my code reads data on file.

It's really funny having to code around the bugs of the compiler/debugger of the IDE you are using.....
Shatterhand is offline  
Old 05 November 2019, 19:24   #216
BippyM
Global Moderator

BippyM's Avatar
 
Join Date: Nov 2001
Location: Nottingham, UK
Age: 44
Posts: 8,834
I used banks, and processed the data directly using peek, peek$ and poke etc..



Quote:
Originally Posted by Nightshft View Post
I have a problem with ReadFile and Inkey$ when the Debugger is running. It normally works fine, but with active debugger it says "No currently used object!"

Code:
if readFile(0,"filename")
  fileInput 0
  y=asc(inkey$)  <- error
  or
  bla=cvq(inkey$(4))  <- same
  closeFile 0
Seems like inkey$ sees no active fileInput although its defined one line before. Only when the debugger is running. Am I missing something, or is there a workaround?
(Blitzbasic 2.42. Without debugger this never happens. With debugger always.)
BippyM is online now  
Old 16 November 2019, 06:26   #217
Nightshft
Registered User

Nightshft's Avatar
 
Join Date: Mar 2018
Location: Austria
Age: 44
Posts: 196
Thanks Bippy.

When I use a coplist display instead of a slice I can't seem to change the current used colors with the "RGB c, r,g,b" command. Is this correct? Would I have to change a palette object and use DisplayPalette coplist,palette to make it active (copy it to the display palette)?

Is there a way to directly change sprite colors with some other command?

Thanks in advance for your help guys!
Nightshft is online now  
Old 16 November 2019, 17:22   #218
Daedalus
Registered User

Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 4,292
There's no command to set the colours on a Coplist display directly as such, no. Modifying a palette object and then applying that to the display is one way to do it, or you can poke the values required directly into the colour registers for maximum efficiency.
Daedalus 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
[blitz basic] How much amiga-blitz friendly is this? saimon69 Coders. Blitz Basic 104 29 November 2016 21:45
Blitz Basic (1) Retro1234 Coders. Blitz Basic 9 18 February 2016 18:54
Blitz basic 2 Help Havie Coders. Blitz Basic 30 08 September 2013 10:15
Blitz Basic 2 anyone? jobro request.Apps 12 28 November 2005 19:15
Blitz Basic 2 LaundroMat Retrogaming General Discussion 5 24 July 2001 09:10

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 22:39.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.09162 seconds with 15 queries