first commit - moved from local dev to git

This commit is contained in:
firebee
2022-10-02 10:09:40 +02:00
commit bbb3ef9333
1861 changed files with 167960 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
' these provide information about your application
> FUNCTION app_timestamp !v1.00
$F% !build date/time in gemdos format, see xbios(23)
RETURN LONG{HIMEM+12}
ENDFUNC
' build date and time in human readable form
' call MODE once before use to set the output format
> FUNCTION app_build_date$ !v1.00
RETURN CHAR{HIMEM+130} !10 chars
ENDFUNC
> FUNCTION app_build_time$ !v1.00
RETURN CHAR{HIMEM+120} !8 chars
ENDFUNC
' returns "68K" or "V4E" depending on the build type at compile time
> FUNCTION app_build_type$ !v1.00
RETURN CHAR{HIMEM+154} !3 chars
ENDFUNC
' the revision of the compiler/linker at the moment your program was compiled
> FUNCTION compiler_revision !v1.00
$F%
RETURN LONG{HIMEM+8}
ENDFUNC
' these provide information about the library
' the revision of the library at the moment your program was compiled
> FUNCTION library_revision !v1.00
$F%
RETURN LONG{HIMEM+4}
ENDFUNC
> FUNCTION library_id$ !v1.00
RETURN MKL$(LONG{HIMEM}) !'GBE3'
ENDFUNC

View File

@@ -0,0 +1,7 @@
' this will flush the cpu and data cache on all 68K CPUs and the coldfire
' it first tries ssystem(), if that don't work it does it the hard way
> PROCEDURE flush_cache !v1.00
LOCAL asm%
asm%=LONG{HIMEM+28}
~C:asm%()
RETURN

View File

@@ -0,0 +1,29 @@
' built in cookie routine
> FUNCTION get_cookie(id%,VAR result%) !v1.00
$F% !return: false=not found/true=found
LOCAL asm%
asm%=LONG{HIMEM+24}
RETURN C:asm%(L:id%,L:V:result%)
ENDFUNC
' the library start-up code has already fetched these cookies
' these can be used to access the stored information
> FUNCTION cpu_cookie !v1.00
$F%
RETURN LONG{HIMEM+32}
ENDFUNC
> FUNCTION fpu_cookie !v1.00
$F%
RETURN LONG{HIMEM+36}
ENDFUNC
> FUNCTION mch_cookie !v1.00
$F%
RETURN LONG{HIMEM+40}
ENDFUNC
> FUNCTION snd_cookie !v1.00
$F%
RETURN LONG{HIMEM+44}
ENDFUNC
> FUNCTION cf_cookie !v1.00
$F%
RETURN LONG{HIMEM+48}
ENDFUNC

View File

@@ -0,0 +1,9 @@
' these are special routines that only activate options when compiled
' allows activation of cpu and fpu enhanced options seperately
' as opposed to the TT? function which always activates both
> PROCEDURE cpu_on !v1.00
$X PATIFP !ignored by the edtior
RETURN
> PROCEDURE fpu_on !v1.00
$X PATCHXX !ignored by the edtior
RETURN

View File

@@ -0,0 +1,6 @@
' last line an error occured at (compiled only)
' this is used with the advanced debugging options ($Tx)
> FUNCTION erl !v1.00
$F%
RETURN LONG{HIMEM+80}
ENDFUNC

View File

@@ -0,0 +1,13 @@
' these options can be turned on
' enable licomlib/runlib compatibility
> PROCEDURE enable_gem !v1.00
BYTE{HIMEM+168}=TRUE
RETURN
' enable VDI bezier curves
> PROCEDURE enable_curve !v1.00
BYTE{HIMEM+167}=TRUE
RETURN
' enable expanded rgb range (0-1000)
> PROCEDURE enable_vsetcolor !v1.00
BYTE{HIMEM+166}=TRUE
RETURN

View File

@@ -0,0 +1,15 @@
' needs to be called at the very top of your program, very first thing!
> PROCEDURE check_fatal !v1.00
IF FATAL !wrong binary for this cpu?
~FORM_ALERT(1,"[3][ |Wrong CPU type detected! ][ Abort ]")
EDIT
ENDIF
RETURN
' only do this check if your program uses the $Mx compiler option
' needs to be checked right away before any arrays are dimensioned
> PROCEDURE check_err !v1.00
IF ERR=8 !$mx failed?
~FORM_ALERT(1,"[3][ |Not enough memory! ][ Abort ]")
EDIT
ENDIF
RETURN

View File

@@ -0,0 +1,13 @@
' define some handy flags
ejoy!=BTST(STE?,0) !machine has enhanced joysticks
dma_snd!=BTST(STE?,1) !machine has stereo 8-bit playback
cpu!=BTST(STE?,2) !cpu is =>68020
fpu!=BTST(STE?,3) !fpu detected
coldfire!=BTST(STE?,4) !coldfire detected
gbe3!=BTST(STE?,5) !safe to access himem
compiled!=BTST(STE?,6) !code is compiled
cpu_on!=BTST(STE?,7) !cpu options are active
fpu_on!=BTST(STE?,8) !fpu options are active
auto!=BTST(STE?,9) !started from \auto or no aes init
acc!=BTST(STE?,10) !program is a desk accessory
mint!=BTST(STE?,11) !mint detected via ssystem()

View File

@@ -0,0 +1,19 @@
' the library start-up code already called these OS functions
' these functions can be used to fetch the information stored by the library
> FUNCTION getrez !v1.00
$F%
RETURN WORD{HIMEM+84}
ENDFUNC
' the library start-up creates a DTA for you, this returns its address
> FUNCTION fgetdta !v1.00
$F%
RETURN LONG{HIMEM+20}
ENDFUNC
> FUNCTION graf_handle(VAR cw&,ch&,bw&,bh&) !v1.00
$F%
cw&=WORD{HIMEM+88}
ch&=WORD{HIMEM+90}
bw&=WORD{HIMEM+92}
bh&=WORD{HIMEM+94}
RETURN WORD{HIMEM+86}
ENDFUNC