/*
- GEOS constants, 4-2-99, 18-3-99
+ GEOS constants
- small C version: 25-27.10.99
reassembled by Maciej 'YTM/Elysium' Witkowiak
*/
/*
GEOS functions from disk driver
- ported to small C on 21.12.1999
by Maciej 'YTM/Elysium' Witkowiak
*/
char __fastcall__ WriteBlock(struct tr_se *myTrSe, const char *buffer);
char __fastcall__ VerWriteBlock(struct tr_se *myTrSe, const char *buffer);
-unsigned __fastcall__ CalcBlksFree(void);
-char __fastcall__ ChkDkGEOS(void);
-char __fastcall__ SetGEOSDisk(void);
-char __fastcall__ NewDisk(void);
-char __fastcall__ OpenDisk(void);
+unsigned CalcBlksFree(void);
+char ChkDkGEOS(void);
+char SetGEOSDisk(void);
+char NewDisk(void);
+char OpenDisk(void);
char __fastcall__ FindBAMBit(struct tr_se *myTrSe);
char __fastcall__ BlkAlloc(struct tr_se output[], unsigned length);
struct tr_se __fastcall__ SetNextFree(struct tr_se *myTrSe);
// above needs (unsigned) casts on both sides of '='
-char __fastcall__ GetDirHead(void);
-char __fastcall__ PutDirHead(void);
+char GetDirHead(void);
+char PutDirHead(void);
void __fastcall__ GetPtrCurDkNm(char *name);
-void __fastcall__ EnterTurbo(void);
-void __fastcall__ ExitTurbo(void);
-void __fastcall__ PurgeTurbo(void);
+void EnterTurbo(void);
+void ExitTurbo(void);
+void PurgeTurbo(void);
char __fastcall__ ChangeDiskDevice(char newdev);
-/* disk header offsets */
+/* disk header offsets i.e. index curDirHead with these */
#define OFF_TO_BAM 4
#define OFF_DISK_NAME 144
#define OFF_GS_DTYPE 189
#define OFF_OP_TR_SC 171
#define OFF_GS_ID 173
-/* disk errors */
+/* disk errors reported in oserrno */
#define ANY_FAULT 0xf0
#define G_EOF 0
#define NO_BLOCKS 1
GEOS dialog box functions
by Maciej 'YTM/Elysium' Witkowiak
- 26.12.1999, 10.03.2000, 17.8.2003
*/
#ifndef _GDLGBOX_H
#define _GDLGBOX_H
char __fastcall__ DoDlgBox(const char *dboxstring);
-char __fastcall__ RstrFrmDialogue(void);
+char RstrFrmDialogue(void);
/* These are custom, predefined dialog boxes, I'm sure you'll find them usable
Most of them show 2 lines of text */
#define OFF_DB_1STCMD 7
#endif
-
/*
GEOS filesystem functions
- ported to small C on 25.12.1999
by Maciej 'YTM/Elysium' Witkowiak
*/
#include <geos/gstruct.h>
#endif
-struct filehandle *__fastcall__ Get1stDirEntry(void);
-struct filehandle *__fastcall__ GetNxtDirEntry(void);
+struct filehandle *Get1stDirEntry(void);
+struct filehandle *GetNxtDirEntry(void);
char __fastcall__ FindFTypes(char *buffer, char ftype, char fmaxnum, const char *classtxt);
char __fastcall__ DeleteFile(const char *fname);
char __fastcall__ RenameFile(const char *source, const char *target);
-char __fastcall__ ReadByte(void);
+char ReadByte(void);
char __fastcall__ FollowChain(struct tr_se *startTrSe, char *buffer);
char __fastcall__ GetFHdrInfo(struct filehandle *myFile);
char __fastcall__ OpenRecordFile(const char *fname);
-char __fastcall__ CloseRecordFile(void);
-char __fastcall__ NextRecord(void);
-char __fastcall__ PreviousRecord(void);
+char CloseRecordFile(void);
+char NextRecord(void);
+char PreviousRecord(void);
char __fastcall__ PointRecord(char);
-char __fastcall__ DeleteRecord(void);
-char __fastcall__ InsertRecord(void);
-char __fastcall__ AppendRecord(void);
+char DeleteRecord(void);
+char InsertRecord(void);
+char AppendRecord(void);
char __fastcall__ ReadRecord(char *buffer, unsigned flength);
char __fastcall__ WriteRecord(const char *buffer, unsigned flength);
-char __fastcall__ UpdateRecordFile(void);
+char UpdateRecordFile(void);
/* GEOS filetypes */
#define NOT_GEOS 0
#define REL 4
#define CBM 5
/* directory offsets */
-/* offsets in dir entry */
+/* offsets in dir entry i.e. index dirEntryBuf with these */
#define FRST_FILE_ENTRY 2
#define OFF_CFILE_TYPE 0
#define OFF_DE_TR_SC 1
#define OFF_YEAR 23
#define OFF_SIZE 28
#define OFF_NXT_FILE 32
-/* offsets in file header */
+/* offsets in file header i.e. index fileHeader with these */
#define O_GHIC_WIDTH 2
#define O_GHIC_HEIGHT 3
#define O_GHIC_PIC 4
#define O_GH_AUTHOR 97
#define O_GHP_DISK 97
#define O_GHP_FNAME 117
-#define O_GHINFO_TXT 0xa0
+#define O_GHINFO_TXT 160
#endif
/*
GEOS graphic (non icon/menu/sprite) functions
- ported to small C on 29.10.1999
by Maciej 'YTM/Elysium' Witkowiak
- 10,11.03.2000 - updates
*/
#ifndef _GGRAPH_H
void __fastcall__ VerticalLine(char pattern, char ystart, char yend, unsigned x);
void __fastcall__ InitDrawWindow(struct window *myRectangle);
-void __fastcall__ Rectangle(void);
+void Rectangle(void);
void __fastcall__ FrameRectangle(char pattern);
-void __fastcall__ InvertRectangle(void);
-void __fastcall__ ImprintRectangle(void);
-void __fastcall__ RecoverRectangle(void);
+void InvertRectangle(void);
+void ImprintRectangle(void);
+void RecoverRectangle(void);
void __fastcall__ DrawLine(char mode, struct window *topBotCoords);
char __fastcall__ GetCharWidth(char character);
void __fastcall__ LoadCharSet(struct fontdesc *myFont);
-void __fastcall__ UseSystemFont(void);
+void UseSystemFont(void);
void __fastcall__ BitmapUp(struct iconpic *myIcon);
void __fastcall__ BitmapClip(char skipl, char skipr, unsigned skiptop,
#define COLOR_LIGHTGREEN 0x0D
#define COLOR_LIGHTBLUE 0x0E
#define COLOR_GRAY3 0x0F
-/* VIC memory banks */
+/* VIC memory banks - lowest 2 bits of cia2base+0 */
#define GRBANK0 3
#define GRBANK1 2
#define GRBANK2 1
#define ST_WR_BACK 0x40
#define ST_WR_FORE 0x80
/* PutDecimal parameters */
-/* leading 0s? */
+/* leading zeros? */
#define SET_NOSURPRESS 0
#define SET_SURPRESS 0x40
/* justification */
/*
GEOS memory and string functions
- ported to small C on 27.10.1999
by Maciej 'YTM/Elysium' Witkowiak
- 04.04.2003 - updates
*/
#ifndef _GMEMORY_H
/*
GEOS menu and icon functions
- ported to small C on 27.10.1999
- by Maciej 'YTM/Alliance' Witkowiak
+ by Maciej 'YTM/Elysium' Witkowiak
*/
#ifndef _GMENU_H
#endif
void __fastcall__ DoMenu(struct menu *myMenu);
-void __fastcall__ ReDoMenu(void);
-void __fastcall__ RecoverMenu(void);
-void __fastcall__ RecoverAllMenus(void);
-void __fastcall__ DoPreviousMenu(void);
-void __fastcall__ GotoFirstMenu(void);
+void ReDoMenu(void);
+void RecoverMenu(void);
+void RecoverAllMenus(void);
+void DoPreviousMenu(void);
+void GotoFirstMenu(void);
void __fastcall__ DoIcons(struct icontab *myIconTab);
/*
GEOS processes (~multitasking) functions
- ported to small C on 27.10.1999
by Maciej 'YTM/Elysium' Witkowiak
*/
/*
GEOS mouse and sprite functions
- ported to small C on 27.10.1999
by Maciej 'YTM/Elysium' Witkowiak
*/
#ifndef _GSPRITE_H
#define _GSPRITE_H
-void __fastcall__ StartMouseMode(void);
-void __fastcall__ ClearMouseMode(void);
-void __fastcall__ MouseUp(void);
-void __fastcall__ MouseOff(void);
+void StartMouseMode(void);
+void ClearMouseMode(void);
+void MouseUp(void);
+void MouseOff(void);
char __fastcall__ IsMseInRegion(struct window *region);
void __fastcall__ DrawSprite(char spritenum, const char *spritepic);
void __fastcall__ InitTextPrompt(char height);
void __fastcall__ PromptOn(struct pixel *position);
-void __fastcall__ PromptOff(void);
-char __fastcall__ GetNextChar(void);
+void PromptOff(void);
+char GetNextChar(void);
/* keyboard constants */
#define KEY_F1 1
/*
GEOS structs
- ported to small C on 25-27.10.1999
by Maciej 'YTM/Elysium' Witkowiak
*/
e.g. if you have menu defined as TopMenu and you want to change the number of
menu items use:
((struct menu*)&TopMenu)->number=newNumber;
- This will translate into single lda/sta pair
+ This will be translated into single lda/sta pair
*/
#ifndef _GSTRUCT_H
/*
- GEOS constants reassembled 4-2-99
- ported to small C 26.8.99, 25-26.10.99
- Maciej 'YTM/Elysium' Witkowiak
- ytm@elysium.pl
+ GEOS system addresses and locations
+
+ reassembled by Maciej 'YTM/Elysium' Witkowiak
*/
#ifndef _GSYM_H
/*
GEOS system functions
- ported to small C on 27.10.1999
by Maciej 'YTM/Elysium' Witkowiak
*/
#ifndef _GSYS_H
#define _GSYS_H
-void __fastcall__ FirstInit(void);
-void __fastcall__ InitForIO(void);
-void __fastcall__ DoneWithIO(void);
-void __fastcall__ MainLoop(void);
-void __fastcall__ EnterDeskTop(void);
-void __fastcall__ ToBASIC(void);
-void __fastcall__ Panic(void);
+void FirstInit(void);
+void InitForIO(void);
+void DoneWithIO(void);
+void MainLoop(void);
+void EnterDeskTop(void);
+void ToBASIC(void);
+void Panic(void);
void __fastcall__ CallRoutine(void *myRoutine);
-unsigned __fastcall__ GetSerialNumber(void);
-char __fastcall__ GetRandom(void);
+unsigned GetSerialNumber(void);
+char GetRandom(void);
void __fastcall__ SetDevice(char newdev);
-char __fastcall__ get_ostype(void);
+char get_ostype(void);
/* possible return values of get_ostype, machine and version flags will
be combined with OR */
#define GEOS_V20 0x20
#define WHEELS 0x40 /* only Wheels? */
-char __fastcall__ get_tv(void);
+char get_tv(void);
/* possible return values of get_tv, these flags will be combined
note that columns state can be changed during runtime and get_tv