any other former gfabasic programmers out there?
any other former gfabasic programmers out there?
with the 'fadeout' of gfa i would expect more programmers to turn to pure, but is that the case? anybody out there who was an active gfabasic user and made a succesfull switchover?
-
freedimension
- Enthusiast

- Posts: 613
- Joined: Tue May 06, 2003 2:50 pm
- Location: Germany
- Contact:
Yes me.
I used to program in GFA Basic when I was about 10, back in 87-89 on an ATARI ST 1040
It was one of my first programming languages next to Omicron Basic.
But with the buying of my first own 386 I soon lost touch with it. Since then I tried a lot of languages including Java, Pascal, BlitzBasic, C ...
PureBasic is the first one since then I'm really addicted to.
I used to program in GFA Basic when I was about 10, back in 87-89 on an ATARI ST 1040
It was one of my first programming languages next to Omicron Basic.
But with the buying of my first own 386 I soon lost touch with it. Since then I tried a lot of languages including Java, Pascal, BlitzBasic, C ...
PureBasic is the first one since then I'm really addicted to.
Yup, as a former GB32 betatester, i switched to PureBasic in june 2002
It's all here
http://users.pandora.be/berikco/biography.htm
It's all here
yep, i've been on your site
can't you convince fred that we need a little more gfa syntax to make life easeir? syntax, mind you, not business practices
i think i'm going to set up a page for converts... there are a few things in pure that absolutely puzzled me, and the documentation is sadly inadequate... i would be tempted to volunteer on that department, but my knowledge of the language is not yet good enough to handle the more 'esoteric' commands so i'll settle for some sort of beginners faq for now... i'll post it when it's done
can't you convince fred that we need a little more gfa syntax to make life easeir? syntax, mind you, not business practices
i think i'm going to set up a page for converts... there are a few things in pure that absolutely puzzled me, and the documentation is sadly inadequate... i would be tempted to volunteer on that department, but my knowledge of the language is not yet good enough to handle the more 'esoteric' commands so i'll settle for some sort of beginners faq for now... i'll post it when it's done
LOL @ Berikco..Berikco wrote:blueznl wrote: yep, i've been on your site
can't you convince fred that we need a little more gfa syntax to make life easeir? syntax, mind you, not business practices
No, it's me who sugested the strange syntax to Fred![]()
Personally, I like the syntax as it is now.. Please don't mess it up
-Lars
AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
GFA lost soul
I'm another shipwrecked from GFA's sinking.
I've been using GFA since 1986, first on the AtariST, and then with GFAwin16, mainly programming MIDI routines.
Never liked GFA32.
Now I'm VERY happy with PB.
Please, can somebody translate this GFA MIDI IN code to PB?
Thanks in advance and Greetings from Spain!
Einander
_____________________________________________
I've been using GFA since 1986, first on the AtariST, and then with GFAwin16, mainly programming MIDI routines.
Never liked GFA32.
Now I'm VERY happy with PB.
Please, can somebody translate this GFA MIDI IN code to PB?
Thanks in advance and Greetings from Spain!
Einander
_____________________________________________
Code: Select all
@prepare_midi
hMidiIn& = 1
IdMidiIn& = 1
~@@midiInOpen(V:hMidiIn&,IdMidiIn&,WIN(1),0,CALLBACK_WINDOW%)
~@@midiInStart(hMidiIn&)
PROCEDURE prepare_midi
DLL #1, "mmsystem.dll"
DECL LONG timeSetEvent(w,w,l,l,w)
DECL LONG timeKillEvent(w)
DECL LONG midiOutShortMsg(w,l)
DECL LONG midiOutOpen(l,w,l,l,l)
DECL LONG midiOutClose(w)
DECL LONG timeGetDevCaps(l,w)
DECL LONG timeBeginPeriod(w)
DECL LONG timeEndPeriod(w)
DECL WORD midiInGetNumDevs()
DECL WORD midiInGetDevCaps(w,l,w)
DECL LONG midiInOpen(l,w,l,l,l)
DECL LONG midiInStart(w)
DECL LONG midiInStop(w)
DECL LONG midiInClose(w)
DECL WORD midiOutGetNumDevs()
DECL WORD midiOutGetDevCaps(w,l,w)
DECL WORD midiOutGetErrorText(w,l,w)
ENDDLL
LET CALLBACK_WINDOW% = $10000
LET CALLBACK_FUNCTION% = $30000
LET MM_MIM_DATA& = $3C3
LET MMSYSERR_ERROR& = 1 /* unspecified error */
LET MMSYSERR_BADDEVICEID& = 2 /* device ID out of range
LET MMSYSERR_NOTENABLED& = 3 /* driver failed enable
LET MMSYSERR_ALLOCATED = 4 /* device already allocated /*
RETURNif i have the time i'll have a look at the midi stuff tonight
btw, the first ostrowski product i saw was turbobasic on the atari xl
the gfa on an st, gfa on amiga, gfa on dos, gfa on windows, but although i purchased it i never used gfa32... all 16 bit versions made sense, the 32bit did not
i guess more and more gfa users will end up using either purebasic or darkbasic
btw, the first ostrowski product i saw was turbobasic on the atari xl
the gfa on an st, gfa on amiga, gfa on dos, gfa on windows, but although i purchased it i never used gfa32... all 16 bit versions made sense, the 32bit did not
i guess more and more gfa users will end up using either purebasic or darkbasic
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
GFA2PB
My dreams come true: working GFA16 commands in PB!
CLS,GET,PUT,STRETCH,GRAB ;(grab is a PUT for part of image)
;Edited - added ReleaseDC_
CLS,GET,PUT,STRETCH,GRAB ;(grab is a PUT for part of image)
;Edited - added ReleaseDC_
Code: Select all
;Binary raster operation - october 7 - 2003 - by Einander
;Combines the bits from the selected pen with the bits in the destination bitmap.
;(Bit-block transfer of color Data from source DC into a destination DC)
; -********Choose your BitMap on line 48*************
;With Debugger option Off, gets your BitMap; else, only part of debug window
; 15 combination modes:
;#BLACKNESS, #DSTINVERT, #MERGECOPY, #MERGEPAINT, #NOTSRCCOPY, #NOTSRCERASE ;#PATCOPY
; #PATINVERT, #PATPAINT, #SRCAND, #SRCCOPY, #SRCERASE, #SRCINVERT, #SRCPAINT, #WHITENESS
Procedure Get(X,Y,Wi,He) ; Get source image - returns image handle
SRC=GETDC_(WindowID())
DEST = CreateCompatibleDC_(SRC)
SelectObject_(DEST,CreateImage(0,Wi,He))
BitBlt_(DEST,0,0,Wi,He,SRC,X,Y,#SRCCOPY)
ReleaseDC_(WindowID(),Src)
ProcedureReturn DEST
EndProcedure
Procedure Put(X,Y,IMG,MODE) ; Draws image from IMG TO DEST (DEST = GetDC_(SrcID))
hDC=GETDC_(WindowID())
BitBlt_(hDC,X,Y,ImageWidth(),ImageHeight(),IMG,0,0,MODE)
ReleaseDC_(WindowID(),hDC)
EndProcedure
Procedure Stretch(X,Y,Wi,He,IMG,MODE) ; draws stretched image
hDC=GETDC_(WindowID())
StretchBlt_(hDC,X,Y,Wi,He,IMG,0,0,ImageWidth(),ImageHeight(),MODE)
ReleaseDC_(WindowID(),hDC)
EndProcedure
Procedure Grab(StartX,StartY,Wi,He,IMG,X,Y,MODE) ; draws part of image
hDC=GETDC_(WindowID())
BitBlt_(hDC,X,Y,Wi,He,IMG,StartX,StartY,MODE)
ReleaseDC_(WindowID(),hDC)
EndProcedure
Procedure CLS(COLOR) ; clear screen
StartDrawing(WindowOutput())
Box(0,0,WindowWidth(),WindowHeight(),COLOR)
StopDrawing()
EndProcedure
;__________________________
IMAGE$="**************CHOOSE HERE YOUR BMP******************************"
LoadImage(1,Image$)
WIMG=100 : HIMG=100
ResizeImage(1,WIMG,HIMG) ; STARTING WITH 100 X 100 PIXS
id=OpenWindow(0,0,0,WIMG,HIMG,#PB_Window_BorderLess ,"")
StartDrawing(WindowOutput())
DrawImage(UseImage(1),0,0)
IMG=Get(0,0,WIMG,HIMG)
StopDrawing()
CloseWindow(0)
_X=GetSystemMetrics_(#SM_CXSCREEN) : _Y=GetSystemMetrics_(#SM_CYSCREEN)
hWnd=OpenWindow(0,0,0,_X,_Y,#WS_OVERLAPPEDWINDOW | #WS_MAXIMIZE,"")
CLS(#blue)
;Testing some modes
PUT(220,100,IMG,#SRCCOPY)
PUT(350,100,IMG,#SRCPAINT)
STRETCH(20,200,200,200,IMG,#NOTSRCERASE)
x=0 : y=_Y-150
Repeat
GRAB(0,0,50,50,IMG,20+i,y,#SRCINVERT)
i+50
GRAB(50,50,50,50,IMG,20+i,y,#SRCINVERT)
y-50
Until y<50
Repeat
Until WaitWindowEvent()= #PB_Event_CloseWindow
End
Last edited by einander on Wed Nov 05, 2003 1:16 am, edited 3 times in total.
aw yes, are you developing a gfa library? 
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
i don't know if this is of any use...
pb sometimes forces me to use 'pb handles', unique numbers, now if multiple people use the same numbers on a large project or over different libs, conflicts arise easily...
here's what i do:
Procedure x_init()
;
; *** initialize variables, constants and parameters
;
Global x_enum.l , x_enum_n.l
x_enum_n = 1000 ; arbitrary value, first unique number given out
NewList x_enum_list.l() ; see x_number() for more details
;
EndProcedure
Procedure.l x_enum()
Global x_enum.l
;
; *** generates a new unique number
;
; in: none
; out: x_enum.l
;
; pure sometimes uses 'numbers' to identify elements instead of windows handles
; these numbers are arbitrary and fully defined by the user, this can cause trouble
; when using multiple libraries or code from different people as they might be reusing
; these unique numbers, for this purpose, i've added a x_pbh procedure that returns
; a new unique number on every call
;
; you decide yourself if you want to free them or not
; i would suggest doing so if you don't 'recycle' them...
;
If CountList(x_enum_list()) > 0 ; which means there's some stuff on the list
x_enum = x_enum_list()
DeleteElement(x_enum_list())
Else
x_enum = x_enum_n
x_enum_n = x_enum_n+1
EndIf
ProcedureReturn x_enum
EndProcedure
Procedure x_enumfree(n.l)
;
; put this number into the 'free numbers' list so it can be reused by x_enum()
;
AddElement(x_enum_list())
x_enum_list()=n
;
EndProcedure
pb sometimes forces me to use 'pb handles', unique numbers, now if multiple people use the same numbers on a large project or over different libs, conflicts arise easily...
here's what i do:
Procedure x_init()
;
; *** initialize variables, constants and parameters
;
Global x_enum.l , x_enum_n.l
x_enum_n = 1000 ; arbitrary value, first unique number given out
NewList x_enum_list.l() ; see x_number() for more details
;
EndProcedure
Procedure.l x_enum()
Global x_enum.l
;
; *** generates a new unique number
;
; in: none
; out: x_enum.l
;
; pure sometimes uses 'numbers' to identify elements instead of windows handles
; these numbers are arbitrary and fully defined by the user, this can cause trouble
; when using multiple libraries or code from different people as they might be reusing
; these unique numbers, for this purpose, i've added a x_pbh procedure that returns
; a new unique number on every call
;
; you decide yourself if you want to free them or not
; i would suggest doing so if you don't 'recycle' them...
;
If CountList(x_enum_list()) > 0 ; which means there's some stuff on the list
x_enum = x_enum_list()
DeleteElement(x_enum_list())
Else
x_enum = x_enum_n
x_enum_n = x_enum_n+1
EndIf
ProcedureReturn x_enum
EndProcedure
Procedure x_enumfree(n.l)
;
; put this number into the 'free numbers' list so it can be reused by x_enum()
;
AddElement(x_enum_list())
x_enum_list()=n
;
EndProcedure
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
i created a short 'survival' guide to make it easier for converts to convert... euh... 
but it's not specifically targetted at gfabasic users... did you have some sort of list or doc in mind?
but it's not specifically targetted at gfabasic users... did you have some sort of list or doc in mind?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )

