20 November 2019, 15:05 | #221 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
Hmmm, that's interesting. I'm sure I've poked colour registers before to change them (and regularly still do for the background colour for examining timings). Is it possible that you're poking too early in the frame? Or do you have any other palette commands in the loop that might override the poked value?
|
20 November 2019, 15:58 | #222 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
|
20 November 2019, 16:46 | #223 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
Are you using VWait in your program? There's an alternative command in one of the support libraries called VWaitPos (I think) that can replace VWait and has the ability to be triggered at any given line on the display. At least for experimenting, it might be worth trying it half way down the screen, and if the colour change takes effect there, working upwards to see if/when it stops working.
|
20 November 2019, 17:19 | #224 | |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
Yes.
Quote:
I also wasn't able to check timing per background color poke/move before because of this. I don't understand why it works for some people nevertheless, but however vWaitPos now makes that possible too. As always, many thanks Deadalus! |
|
20 November 2019, 21:57 | #225 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
No bother Yeah, the display wouldn't normally start to be drawn until around line 44, so I guess the copperlist is only initialising certain things like the palette just before that.
|
10 December 2019, 01:55 | #226 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
For anybody running into the same problem in Blitzbasic 2.1:
Opening the IDE I encountered "unable to open screen". The solution was to rename/delete sys: prefs/env-archive/ted.prefs (Probably better after restart and before trying to start the IDE because some prefs are copied to ENV: then) |
11 December 2019, 03:51 | #227 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
The compiler directive "optimize" has the following parameters, which can be combined:
1..integer and code, 2..fpu, 4..new language syntax So far so good, but what does "new language syntax" mean? |
11 December 2019, 09:46 | #228 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
It enables a additional ways of interpreting certain items in the source. For example, with New Syntax enables, you can mark a parameter to a statement or function as optional by putting @ in front of it. For example:
Code:
Function test.l{data1.w, data2.w, @data3.w} All useful things in certain situations. |
12 December 2019, 04:47 | #229 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
It surprises me that this is an option of "optimize" and not of "syntax" but the main point is that it's a useful addition. Thanks for the info.
|
12 December 2019, 12:29 | #230 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
Yeah, it would make sense to belong to the Syntax command I guess. I think the reasoning could be that the Syntax command deals exclusively with variable handling, while the Optimize command turns on and off various different compiler settings. To be honest, both commands could probably be renamed, or split out into their discrete functions like pragmas. For example:
Optimize Off|Int|FPU NewSyntax Off|On ForceDeclarations Off|Inline|On CheckCasts Off|On |
28 December 2019, 17:51 | #231 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
Is it possible to read cpu registers? I know of getReg and putReg which can read the standard adress- and data registers and write to the data-registers. But can I read the other registers too? Especially I'd like to read VBR which is only accessible in supervisor mode.
(I guess it could be possible with inline asm and variable pointers?) |
29 March 2020, 18:59 | #232 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
Just found out that I can set the initial path for a file requester with
Code:
path$=drive:somepath/ a$=FileRequest$("Title",path$,file$) Is there a way to set it to a specific subdirectory (from where the .exe is located)? Unlike some other languages it's not possible to use par$(0) to get the executable path. Last edited by Nightshft; 29 March 2020 at 19:19. Reason: completed syntax |
29 March 2020, 19:57 | #233 |
Registered User
Join Date: Jul 2017
Location: Oxford
Posts: 107
|
How to open a HAM screen with Screen?
Hi all, I have a very noob question, as I'm trying to learn BlitzBasic for the first time.
My attempt to open a HAM screen doesn't seem to be working... according to the manual this should do it: Code:
Screen 0,0,0,320,200,6,$200,"My Screen",0,1 Thanks in advance... |
29 March 2020, 21:52 | #234 | |||
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
Quote:
Quote:
Code:
Screen 0, [...] If peek.l(ADDR Screen 0) = 0 NPrint "Unable to open screen!" End End If Quote:
|
|||
30 March 2020, 20:46 | #235 | |
Registered User
Join Date: Jul 2017
Location: Oxford
Posts: 107
|
Quote:
So far it's my understanding that Blitz Basic is a very low level collection of wrappers around OS functions (and in general Amiga custom chip access). Thus very hard to use without proper documentation and examples, and also pretty easy to crash the machine with . Now for instance, how would I access that screen's bitmap? My goal is to have a quick way to wrap some assembler code I have already done with all those "boring" parts to open a screen, show some titles, high-scores, etc. Is there any decent example collection? |
|
31 March 2020, 10:18 | #236 | |||||
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
Quote:
Quote:
Quote:
Quote:
Quote:
|
|||||
01 April 2020, 01:14 | #237 | ||
Registered User
Join Date: Jul 2017
Location: Oxford
Posts: 107
|
Yes, thanks to your advice, I tested $800 with a HAM picture I found on Aminet and it appeared correctly :-) YAY!
Quote:
Quote:
Thanks again, I made some progress at least... ;-) |
||
12 April 2020, 23:15 | #238 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,217
|
Anybody ever had any success with "rotate" on a shape? I set the handle to the middle (with midhandle) but it never seems to rotate around the centre of the shape. Is there something I'm missing?
Code:
MidHandle 0 Rotate 0,0.1 Handle 0,0,0 |
13 April 2020, 20:55 | #239 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,381
|
I've only ever used it for 90 degree rotations on square shapes, so it works without distortions, but it rotates around the centre then. Are you sure you're not getting it clipped because it's wider than it used to be with the rotation? Perhaps your shape object needs to be bigger with an empty margin surrounding the actual image, so it has room to rotate into?
|
13 April 2020, 23:12 | #240 |
Banana
Join Date: Jul 2016
Location: Darmstadt
Posts: 1,217
|
You're right, 90 deg works fine.
It's a 32x32 shape - I'd have though it would have deal with the size internally. I guess I'll have to create a bunch of rotated shapes in a drawing program and load them in. Shame though! |
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 | 105 | 21 April 2022 19:45 |
Blitz Basic (1) | Retro1234 | Coders. Blitz Basic | 9 | 18 February 2016 17:54 |
Blitz basic 2 Help | Havie | Coders. Blitz Basic | 30 | 08 September 2013 09:15 |
Blitz Basic 2 anyone? | jobro | request.Apps | 12 | 28 November 2005 18:15 |
Blitz Basic 2 | LaundroMat | Retrogaming General Discussion | 5 | 24 July 2001 08:10 |
|
|