|
| #define | WORD(w) (w & 0xff), (w >> 8) |
| |
| #define | STRINGIFY_AUX(x) #x |
| |
| #define | STRINGIFY(x) STRINGIFY_AUX(x) |
| |
| #define | RAM_64K 0x30 /** 64K RAM */ |
| |
| #define | IO_IN 0x35 /** 60K RAM, 4K I/O space in */ |
| |
| #define | KRNL_IO_IN 0x36 /** kernal and I/O mapped into memory */ |
| |
| #define | KRNL_BAS_IO_IN 0x37 /** kernal, I/O and basic mapped into memory */ |
| |
| #define | CIOIN 0x7E /** 60K RAM, 4K I/O space in */ |
| |
| #define | CRAM64K 0x7F /** 64K RAM */ |
| |
| #define | CKRNLBASIOIN |
| |
| #define | CKRNLIOIN 0x4E /** Kernal ROM and I/O space mapped in */ |
| |
| #define | OFF_MY_TOP 0 /** offset to y pos of top of menu */ |
| |
| #define | OFF_MY_BOT 1 /** offset to y pos of bottom of menu */ |
| |
| #define | OFF_MX_LEFT 2 /** offset to x pos of left side of menu */ |
| |
| #define | OFF_MX_RIGHT 4 /** offset to x pos of right side of menu */ |
| |
| #define | OFF_NUM_M_ITEMS 6 /** offset to Alignment|Movement|Number of items */ |
| |
| #define | OFF_1ST_M_ITEM |
| |
| #define | SET_RUNABLE 0b10000000 /** runable flag */ |
| |
| #define | SET_BLOCKED 0b01000000 /** process blocked flag */ |
| |
| #define | SET_FROZEN 0b00100000 /** process frozen flag */ |
| |
| #define | SET_NOTIMER 0b00010000 /** not a timed process flag */ |
| |
| #define | RUNABLE_BIT 7 /** runable flag */ |
| |
| #define | BLOCKED_BIT 6 /** process blocked flag */ |
| |
| #define | FROZEN_BIT 5 /** process frozen flag */ |
| |
| #define | NOTIMER_BIT 4 /** not a timed process flag */ |
| |
| #define | SET_UNDERLINE 0b10000000 |
| |
| #define | SET_BOLD 0b01000000 |
| |
| #define | SET_REVERSE 0b00100000 |
| |
| #define | SET_ITALIC 0b00010000 |
| |
| #define | SET_OUTLINE 0b00001000 |
| |
| #define | SET_SUPERSCRIPT 0b00000100 |
| |
| #define | SET_SUBSCRIPT 0b00000010 |
| |
| #define | SET_PLAINTEXT 0b00000000 |
| |
| #define | UNDERLINE_BIT 7 |
| |
| #define | BOLD_BIT 6 |
| |
| #define | REVERSE_BIT 5 |
| |
| #define | ITALIC_BIT 4 |
| |
| #define | OUTLINE_BIT 3 |
| |
| #define | SUPERSCRIPT_BIT 2 |
| |
| #define | SUBSCRIPT_BIT 1 |
| |
| #define | EOF 0 /** end of text object */ |
| |
| #define | BACKSPACE 8 /** move left a card */ |
| |
| #define | TAB 9 |
| |
| #define | FORWARDSPACE 9 /** move right one card */ |
| |
| #define | LF 10 /** move down a card row */ |
| |
| #define | HOME 11 /** move to top left corner of screen */ |
| |
| #define | UPLINE 12 /** move up a card line */ |
| |
| #define | PAGE_BREAK 12 /** page break */ |
| |
| #define | CR 13 /** move to beginning of next card row */ |
| |
| #define | ULINEON 14 /** turn on underlining */ |
| |
| #define | ULINEOFF 15 /** turn off underlining */ |
| |
| #define | ESC_GRAPHICS 16 /** escape code for grahics string */ |
| |
| #define | ESC_RULER 17 /** ruler escape */ |
| |
| #define | REV_ON 18 /** turn on reverse video */ |
| |
| #define | REV_OFF 19 /** turn off reverse video */ |
| |
| #define | GOTOX 20 /** use next byte as 1+x cursor */ |
| |
| #define | GOTOY 21 /** use next byte as 1+y cursor */ |
| |
| #define | GOTOXY 22 /** use next bytes as 1+x and 1+y cursor */ |
| |
| #define | NEWCARDSET 23 /** use next 2 bytes as new font id */ |
| |
| #define | BOLDON 24 /** turn on BOLD characters */ |
| |
| #define | ITALICON 25 /** turn on ITALIC characters */ |
| |
| #define | OUTLINEON 26 /** turn on OUTLINE characters */ |
| |
| #define | PLAINTEXT 27 /** plain text mode */ |
| |
| #define | USELAST 127 /** erase character */ |
| |
| #define | SHORTCUT 128 /** shortcut character */ |
| |
| #define | KEY_INVALID 31 |
| |
| #define | KEY_F1 1 |
| |
| #define | KEY_F2 2 |
| |
| #define | KEY_F3 3 |
| |
| #define | KEY_F4 4 |
| |
| #define | KEY_F5 5 |
| |
| #define | KEY_F6 6 |
| |
| #define | KEY_NOSCRL 7 |
| |
| #define | KEY_TAB 9 |
| |
| #define | KEY_LF 10 |
| |
| #define | KEY_ENTER 11 |
| |
| #define | KEY_F7 14 |
| |
| #define | KEY_F8 15 |
| |
| #define | KEY_UP 16 |
| |
| #define | KEY_DOWN 17 |
| |
| #define | KEY_HOME 18 |
| |
| #define | KEY_CLEAR 19 |
| |
| #define | KEY_LARROW 20 |
| |
| #define | KEY_UPARROR 21 |
| |
| #define | KEY_STOP 22 |
| |
| #define | KEY_RUN 23 |
| |
| #define | KEY_BPS 24 |
| |
| #define | KEY_LEFT BACKSPACE |
| |
| #define | KEY_HELP 25 |
| |
| #define | KEY_ALT 26 |
| |
| #define | KEY_ESC 27 |
| |
| #define | KEY_RIGHT 30 |
| |
| #define | KEY_DELETE 29 |
| |
| #define | KEY_INSERT 28 |
| |
| #define | SET_MSE_ON 0b10000000 |
| |
| #define | SET_MENUON 0b01000000 |
| |
| #define | SET_ICONSON 0b00100000 |
| |
| #define | MOUSEON_BIT 7 |
| |
| #define | MENUON_BIT 6 |
| |
| #define | ICONSON_BIT 5 |
| |
| #define | SC_BYTE_WIDTH 40 /** width of screen in bytes */ |
| |
| #define | SC_PIX_HEIGHT 200 /** width of screen in pixels */ |
| |
| #define | SC_PIX_WIDTH 320 /** height of screen in scanlines */ |
| |
| #define | SC_SIZE 8000 /** size of screen memory in bytes */ |
| |
| #define | SCREENBYTEWIDTH 80 /** width of screen in bytes */ |
| |
| #define | SCREENPIXELWIDTH 640 /** width of screen in pixels */ |
| |
| #define | ST_WR_FORE 0x80 /** write to foreground */ |
| |
| #define | ST_WR_BACK 0x40 /** write to background */ |
| |
| #define | ST_WRGS_FORE 0x20 /** graphic strings only write to foreground */ |
| |
| #define | MOVEPENTO 1 /** move pen to x,y */ |
| |
| #define | LINETO 2 /** draw line to x,y */ |
| |
| #define | RECTANGLETO 3 /** draw rectangle to x,y */ |
| |
| #define | NEWPATTERN 5 /** set a new pattern */ |
| |
| #define | ESC_PUTSTRING 6 /** start putstring interpretation */ |
| |
| #define | FRAME_RECTO 7 /** draw frame of rectangle */ |
| |
| #define | PEN_X_DELTA 8 /** move pen to signed word delta in x */ |
| |
| #define | PEN_Y_DELTA 9 /** move pen to signed word delta in y */ |
| |
| #define | PEN_XY_DELTA 10 /** move pen to signed word delta in x,y */ |
| |
| #define | BLACK 0 |
| |
| #define | WHITE 1 |
| |
| #define | RED 2 |
| |
| #define | CYAN 3 |
| |
| #define | PURPLE 4 |
| |
| #define | GREEN 5 |
| |
| #define | BLUE 6 |
| |
| #define | YELLOW 7 |
| |
| #define | ORANGE 8 |
| |
| #define | BROWN 9 |
| |
| #define | LTRED 10 |
| |
| #define | DKGREY 11 |
| |
| #define | GREY 12 |
| |
| #define | MEDGREY 12 |
| |
| #define | LTGREEN 13 |
| |
| #define | LTBLUE 14 |
| |
| #define | LTGREY 15 |
| |
| #define | SET_LEFTJUST 0b10000000 /** left justified */ |
| |
| #define | SET_RIGHTJUST 0b00000000 /** right justified */ |
| |
| #define | SET_SURPRESS 0b01000000 /** no leading 0's */ |
| |
| #define | SET_NOSURPRESS 0b00000000 /** leading 0's */ |
| |
| #define | ST_FLASH 0x80 /** bit to indicate icon should flash */ |
| |
| #define | ST_INVERT 0x40 /** bit to indicate icon should be inverted */ |
| |
| #define | OFF_NM_ICNS 0 /** number of icons in structure */ |
| |
| #define | OFF_IC_XMOUSE 1 /** mouse x start position */ |
| |
| #define | OFF_IC_YMOUSE 3 /** mouse y start position */ |
| |
| #define | OFF_PIC_ICON 0 /** picture pointer for icon */ |
| |
| #define | OFF_X_ICON_POS 2 /** x position of icon */ |
| |
| #define | OFF_Y_ICON_POS 3 /** y position of icon */ |
| |
| #define | OFF_WDTH_ICON 4 /** width of icon */ |
| |
| #define | OFF_HEIGHT_ICON 5 /** height of icon */ |
| |
| #define | OFF_SRV_RT_ICON 6 /** pointer to service routine for icon */ |
| |
| #define | OFF_NX_ICON 8 /** next icon in icon structure */ |
| |
| #define | KEYPRESS_BIT 7 /** other keypress */ |
| |
| #define | INPUT_BIT 6 /** input device change */ |
| |
| #define | MOUSE_BIT 5 /** mouse press */ |
| |
| #define | SET_KEYPRESS 0b10000000 /** other keypress */ |
| |
| #define | SET_INPUTCHG 0b01000000 /** input device change */ |
| |
| #define | SET_MOUSE 0b00100000 /** mouse press */ |
| |
| #define | OFFTOP_BIT 7 /** mouse fault up */ |
| |
| #define | OFFBOTTOM_BIT 6 /** mouse fault down */ |
| |
| #define | OFFLEFT_BIT 5 /** mouse fault left */ |
| |
| #define | OFFRIGHT_BIT 4 /** mouse fault right */ |
| |
| #define | OFFMENU_BIT 3 /** menu fault */ |
| |
| #define | SET_OFFTOP 0b10000000 /** mouse fault up */ |
| |
| #define | SET_OFFBOTTOM 0b01000000 /** mouse fault down */ |
| |
| #define | SET_OFFLEFT 0b00100000 /** mouse fault left */ |
| |
| #define | SET_OFFRIGHT 0b00010000 /** mouse fault right */ |
| |
| #define | SET_OFFMENU 0b00001000 /** menu fault */ |
| |
| #define | ANY_FAULT 0b11110000 |
| |
| #define | TOTAL_BLOCKS |
| |
| #define | OFF_TO_BAM 4 /** first BAM entry */ |
| |
| #define | OFF_DISK_NAME 144 /** disk name string */ |
| |
| #define | OFF_OP_TR_SC |
| |
| #define | OFF_GS_ID 173 /** where GEOS ID string is located */ |
| |
| #define | OFF_GS_DTYPE |
| |
| #define | ST_WR_PR |
| |
| #define | OFF_CFILE_TYPE 0 /** standard commodore file type indicator */ |
| |
| #define | OFF_INDEX_PTR 1 /** index table pointer (VLIR file) */ |
| |
| #define | OFF_DE_TR_SC 1 /** track for file´s 1st data block */ |
| |
| #define | OFF_FNAME 3 /** file name */ |
| |
| #define | OFF_GHDR_PTR 19 /** track/sector info on where header block is */ |
| |
| #define | OFF_GSTRUC_TYPE 21 /** GEOS file structure type */ |
| |
| #define | OFF_GFILE_TYPE 22 /** geos file type indicator */ |
| |
| #define | OFF_YEAR 23 /** year (first byte of date stamp) */ |
| |
| #define | OFF_SIZE 28 /** size of file in blocks */ |
| |
| #define | OFF_NXT_FILE 32 /** next file entry in directory structure */ |
| |
| #define | FRST_FILE_ENTRY 2 /** first dir entry is at byte #2 */ |
| |
| #define | O_GHIC_WIDTH 2 /** byte: width in bytes of file icon */ |
| |
| #define | O_GHIC_HEIGHT 3 /** byte: indicates height of file icon */ |
| |
| #define | O_GHIC_PIC 4 /** 64 bytes: picture data for file icon */ |
| |
| #define | O_GHCMDR_TYPE 68 /** byte: Comm. file type */ |
| |
| #define | O_GHGEOS_TYPE 69 /** byte: GEOS file type */ |
| |
| #define | O_GHSTR_TYPE 70 /** byte: GEOS file structure type */ |
| |
| #define | O_GHST_ADDR 71 /** 2 bytes: start address of file in mem */ |
| |
| #define | O_GHEND_ADDR 73 /** 2 bytes: end address of file on memory */ |
| |
| #define | O_GHST_VEC 75 /** 2 bytes: init vector if file is appl. */ |
| |
| #define | O_GHFNAME 77 /** 20 bytes, permanent file name */ |
| |
| #define | O_128_FLAGS |
| |
| #define | O_GH_AUTHOR 97 /** 20 bytes: author´s name (only if is applic.) */ |
| |
| #define | O_GHINFO_TXT |
| |
| #define | O_GHP_DISK 97 /** 20 bytes: disk name of parent application´s disk */ |
| |
| #define | O_GHP_FNAME |
| |
| #define | ST_LD_AT_ADDR |
| |
| #define | ST_LD_DATA |
| |
| #define | ST_PR_DATA |
| |
| #define | DK_NM_ID_LEN 18 /** # of characters in disk name */ |
| |
| #define | DRV_NULL 0 /** No drive present at this device address */ |
| |
| #define | DRV_1541 1 /** Drive type Commodore 1541 */ |
| |
| #define | DRV_1571 2 /** Drive type Commodore 1571 */ |
| |
| #define | DRV_1581 3 /** Drive type Commodore 1581 */ |
| |
| #define | DRV_NETWORK 15 /** Drive type for GEOS getNet "drive" */ |
| |
| #define | N_TRACKS 35 /** # of tracks available on the 1541 disk */ |
| |
| #define | DIR_TRACK 18 /** track # reserved on disk for directory */ |
| |
| #define | DIR_1581_TRACK |
| |
| #define | MAX_CMND_STR 32 /** maximum length a command string would have */ |
| |
| #define | DIR_ACC_CHAN 13 /** default direct access channel */ |
| |
| #define | REL_FILE_NUM 9 /** logical file number & channel used for relative files. */ |
| |
| #define | CMND_FILE_NUM 15 /** logical file number & channel used for command files. */ |
| |
| #define | TRACK 9 /** offset to low byte decimal ASCII track number */ |
| |
| #define | SECTOR 12 /** offset to low byte decimal ASCII sector number */ |
| |
| #define | DEF_DB_POS 0x80 /** command for default dialog box position */ |
| |
| #define | SET_DB_POS 0 /** command for user-set DB position */ |
| |
| #define | OK |
| |
| #define | CANCEL 2 /** Like OK, system DB icon, position follows */ |
| |
| #define | YES 3 /** Like OK, system DB icon, position follows */ |
| |
| #define | NO 4 /** Like OK, system DB icon, position follows */ |
| |
| #define | OPEN 5 /** Like OK, system DB icon, position follows */ |
| |
| #define | DISK 6 /** Like OK, system DB icon, position follows */ |
| |
| #define | FUTURE1 7 /** reserved for future system icons */ |
| |
| #define | FUTURE2 8 /** reserved for future system icons */ |
| |
| #define | FUTURE3 9 /** reserved for future system icons */ |
| |
| #define | FUTURE4 10 /** reserved for future system icons */ |
| |
| #define | DBTXTSTR 11 /** Command to display a text string. */ |
| |
| #define | DBVARSTR 12 /** Used to put out variant string. */ |
| |
| #define | DBGETSTRING 13 /** Get an ASCII string from the user. */ |
| |
| #define | DBSYSOPV 14 /** Any press not over an icon return to applic. */ |
| |
| #define | DBGRPHSTR 15 /** Execute graphics string. */ |
| |
| #define | DBGETFILES 16 /** Get filename from user. */ |
| |
| #define | DBOPVEC 17 /** User defined other press vector. */ |
| |
| #define | DBUSRICON 18 /** User defined icon. */ |
| |
| #define | DB_USR_ROUT 19 /** User defined routine. */ |
| |
| #define | OFF_DB_FORM 0 /** box form description, i.e. shadow or not */ |
| |
| #define | OFF_DB_TOP 1 /** position for top of dialog box */ |
| |
| #define | OFF_DB_BOT 2 /** position for bottom of dialog box */ |
| |
| #define | OFF_DB_LEFT 3 /** position for left of dialog box */ |
| |
| #define | OFF_DB_RIGHT 5 /** position for right of dialog box */ |
| |
| #define | OFF_DB_1STCMD 7 /** 1st command in dialog box descriptor table */ |
| |
| #define | SYSDBI_WIDTH 6 /** height in pixels */ |
| |
| #define | SYSDBI_HEIGHT 16 /** width in bytes */ |
| |
| #define | DEF_DB_TOP 32 /** top y coordinate of default box */ |
| |
| #define | DEF_DB_BOT 127 /** bottom y coordinate of default box */ |
| |
| #define | DEF_DB_LEFT 64 /** left edge of default box */ |
| |
| #define | DEF_DB_RIGHT 255 /** right edge of default box */ |
| |
| #define | TXT_LN_X 16 /** standard text x start */ |
| |
| #define | TXT_LN_1_Y 16 /** standard text line y offsets */ |
| |
| #define | TXT_LN_2_Y 32 |
| |
| #define | TXT_LN_3_Y 48 |
| |
| #define | TXT_LN_4_Y 64 |
| |
| #define | TXT_LN_5_Y 80 |
| |
| #define | DBI_X_0 1 /** left side standard icon x position */ |
| |
| #define | DBI_X_1 9 /** center standard icon x position */ |
| |
| #define | DBI_X_2 17 /** right side standard icon x position */ |
| |
| #define | DBI_Y_0 8 /** left side standard icon y position */ |
| |
| #define | DBI_Y_1 40 /** center standard icon y position */ |
| |
| #define | DBI_Y_2 72 /** right side standard icon y position */ |
| |
| #define | DB_NAME(name) |
| |
| #define | DB_NAME_SECT(name, sect) |
| |
| #define | DB_END(name) asm(".byte 0\n.size " STRINGIFY(name) ", . - " STRINGIFY(name)); |
| |
| #define | DB_DEFPOS(pattern) asm(".byte 0x80|" STRINGIFY(pattern)); |
| |
| #define | DB_SETPOS(pattern, top, bottom, left, right) |
| |
| #define | DB_ICON(icon, x, y) asm(".byte " STRINGIFY(icon) "\n.byte " STRINGIFY(x) "\n.byte " STRINGIFY(y)); |
| |
| #define | DB_TXTSTR(x, y, text) |
| |
| #define | DB_VARSTR(x, y, zp_ptr) |
| |
| #define | DB_GETSTR(x, y, zp_ptr, length) |
| |
| #define | DB_SYSOPV() asm(".byte 14"); |
| |
| #define | DB_GRPHSTR(ptr) asm(".byte 15\n.short " STRINGIFY(ptr)); |
| |
| #define | DB_GETFILES(x, y) asm(".byte 16\n.byte " STRINGIFY(x) "\n.byte " STRINGIFY(y)); |
| |
| #define | DB_OPVEC(ptr) asm(".byte 17\n.short " STRINGIFY(ptr)); |
| |
| #define | DB_USRICON(x, y, icon_ptr) |
| |
| #define | DB_USRROUT(ptr) asm(".byte 19\n.short " STRINGIFY(ptr)); |
| |
| #define | GRBANK0 0b11 /** bits indicate VIC ram is 0x0000-0x3fff, 1st 16K */ |
| |
| #define | GRBANK1 0b10 /** bits indicate VIC ram is 0x4000-0x7fff, 2nd 16K */ |
| |
| #define | GRBANK2 0b01 /** bits indicate VIC ram is 0x8000-0xbfff, 3rd 16K */ |
| |
| #define | GRBANK3 0b00 /** bits indicate VIC ram is 0xc000-0xffff, 4th 16K */ |
| |
| #define | MOUSE_SPRNUM 0 /** sprite no. used for mouse (used to set VIC) */ |
| |
| #define | VIC_YPOS_OFF |
| |
| #define | VIC_XPOS_OFF |
| |
| #define | ALARMMASK |
| |
| #define | FG_SAVE 0b10000000 /** save and restore foreground graphics data. */ |
| |
| #define | CLR_SAVE 0b01000000 /** save and restore color information. */ |
| |
| #define | ADD1_W 0x2000 |
| |
| #define | ADD1_B 0x20 |
| |
| #define | DOUBLE_W 0x8000 |
| |
| #define | DOUBLE_B 0x80 |
| |
| #define | ARROW 0 /** pass this to SetMsePic */ |
| |
| #define | GR_40 0 /** use these two to test */ |
| |
| #define | GR_80 0x80 /** graphMode */ |
| |
| #define | CLICK_COUNT 30 |
| |
| #define | DISK_DRV_LGH 0x0d80 |
| |
| #define | OS_VARS_LGH 0x0500 |
| |