diff --git a/extra/rtg_driver/.gitignore b/extra/rtg_driver/.gitignore new file mode 100644 index 00000000..990a8c99 --- /dev/null +++ b/extra/rtg_driver/.gitignore @@ -0,0 +1,2 @@ +*.o +*.card diff --git a/extra/rtg_driver/MiSTer.card.asm b/extra/rtg_driver/MiSTer.card.asm new file mode 100644 index 00000000..42921a49 --- /dev/null +++ b/extra/rtg_driver/MiSTer.card.asm @@ -0,0 +1,866 @@ +; Minimig.card - P96 RTG driver for the Minimig Amiga core + +; Adapted by Alastair M. Robinson from a similar project +; for the Replay board - WWW.FPGAArcade.COM + +; Replay.card - P96 RTG driver for the REPLAY Amiga core +; Copyright (C) FPGAArcade community +; +; Contributors : Jakub Bednarski, Mike Johnson, Jim Drew, Erik Hemming, Nicolas Hamel +; +; This software is licensed under LPGLv2.1 ; see LICENSE file + + +; 0.1 - Cut down to the bare bones... + + machine 68020 + + incdir "text_include:" + + include P96/P96BoardInfo.i + include P96/P96ModeInfo.i + include P96/P96CardStruct.i + include hardware/custom.i + + include lvo/exec_lib.i + include lvo/intuition_lib.i + include lvo/expansion_lib.i + include exec/exec.i + include intuition/intuitionbase.i + include libraries/expansionbase.i + include hardware/intbits.i + include exec/interrupts.i + +; If you define the Debug Symbol make sure the monitor file is in +; sys:storage/monitors - debug output seems to crash the system if +; it happens during startup. + +;debug + +;HasBlitter +;blitterhistory +;HasSprite + +beacon: + move.l #8191,d0 +.loop + move.w d0,$dff180 + dbf d0,.loop + rts + +BUG MACRO + IFD debug + + ifnc "","\9" + move.l \9,-(sp) + endc + ifnc "","\8" + move.l \8,-(sp) + endc + ifnc "","\7" + move.l \7,-(sp) + endc + ifnc "","\6" + move.l \6,-(sp) + endc + ifnc "","\5" + move.l \5,-(sp) + endc + ifnc "","\4" + move.l \4,-(sp) + endc + ifnc "","\3" + move.l \3,-(sp) + endc + ifnc "","\2" + move.l \2,-(sp) + endc + + jsr bugprintf + + dc.b \1,$d,$a,0 + even + + adda.w #(NARG-1)*4,sp + + ENDC + ENDM + +**************************************************************************** +; section ReplayRTG,code +**************************************************************************** +MEMORY_SIZE EQU $800000 ; 8MB framebuffer +MEMORY_BASE EQU $02000000 +REGISTER_BASE EQU $b80100 + +FB_BASE EQU $27000000 ; MiSTer physical memory address + +; B80100:B80101 : 8:0 : ADDR[24:16] +; B80102:B80103 : 15:0 : ADDR[15:0] +; B80104:B80105 : 5:0 : FORMAT[5:0] +; B80106:B80107 : 0 : ENABLE +; B80108:B80109 : 11:0 : HSIZE +; B8010A:B8010B : 11:0 : VSIZE +; B8010C:B8010D : 13:0 : STRIDE +; B8010E:B8010F : 7:0 : ID = 50 / VERSION = 01 + +; B80400..B807FF CLUT : 256 * 32bits 00 / RR / GG / BB + +REG_ADDRESS EQU 0 +REG_FORMAT EQU 4 +REG_ENABLE EQU 6 +REG_HSIZE EQU 8 +REG_VSIZE EQU 10 +REG_STRIDE EQU 12 +REG_ID EQU 14 +REG_PALETTE EQU $300 + +;------------------------------------------------------------------------------ +ProgStart: +;------------------------------------------------------------------------------ + + moveq #-1,d0 + rts + + IFD debug + bra.b _bugprintf_end +bugprintf: + movem.l d0-d1/a0-a3/a6,-(sp) + move.l $4.w,a6 + move.l 28(sp),a0 + lea 32(sp),a1 + lea .putch(pc),a2 + move.l a6,a3 + jsr beacon + jsr -522(a6) ; _LVORawDoFmt + +.skip move.l 28(sp),a0 +.end: move.b (a0)+,d0 + bne.b .end + move.l a0,d0 + addq.l #1,d0 + and.l #$fffffffe,d0 + move.l d0,28(sp) + movem.l (sp)+,d0-d1/a0-a3/a6 + rts + +.putch: move.l a3,a6 + jmp -516(a6) ; _LVORawPutChar (execPrivate9) +_bugprintf_end: + rts + ENDC + +;------------------------------------------------------------------------------ +RomTag: +;------------------------------------------------------------------------------ + + dc.w RTC_MATCHWORD + dc.l RomTag + dc.l ProgEnd + dc.b RTF_AUTOINIT ;RT_FLAGS + dc.b 1 ;RT_VERSION + dc.b NT_LIBRARY ;RT_TYPE + dc.b 0 ;RT_PRI + dc.l MinimigCard + dc.l IDString + dc.l InitTable +CardName: + dc.b 'MiSTer',0 +MinimigCard: + dc.b 'MiSTer.card',0,0 + dc.b '$VER: ' +IDString: + dc.b 'MiSTer.card 0.1 (19.Oct.2020)',0 + dc.b 0 +expansionLibName: + dc.b 'expansion.library',0 +intuitionLibName: + dc.b 'intuition.library',0 + cnop 0,4 + +InitTable: + dc.l CARD_SIZEOF ;DataSize + dc.l FuncTable ;FunctionTable + dc.l DataTable ;DataTable + dc.l InitRoutine +FuncTable: + dc.l Open + dc.l Close + dc.l Expunge + dc.l ExtFunc + dc.l FindCard + dc.l InitCard + dc.l -1 +DataTable: + INITBYTE LN_TYPE,NT_LIBRARY + INITBYTE LN_PRI,206 + INITLONG LN_NAME,MinimigCard + INITBYTE LIB_FLAGS,LIBF_SUMUSED|LIBF_CHANGED + INITWORD LIB_VERSION,1 + INITWORD LIB_REVISION,0 + INITLONG LIB_IDSTRING,IDString + INITLONG CARD_NAME,CardName + dc.w 0,0 + +;------------------------------------------------------------------------------ +InitRoutine: +;------------------------------------------------------------------------------ + +; BUG "Minimig.card InitRoutine()" + + movem.l a5,-(sp) + movea.l d0,a5 + move.l a6,CARD_EXECBASE(a5) + move.l a0,CARD_SEGMENTLIST(a5) + lea expansionLibName(pc),a1 + moveq #0,d0 + jsr _LVOOpenLibrary(a6) + + move.l d0,CARD_EXPANSIONBASE(a5) + beq.s .fail + + lea intuitionLibName(pc),a1 + moveq #0,d0 + jsr _LVOOpenLibrary(a6) + move.l d0,CARD_INTUITIONBASE(a5) + bne.s .exit + +.fail + movem.l d7/a5/a6,-(sp) + move.l #(AT_Recovery|AG_OpenLib|AO_ExpansionLib),d7 + movea.l $4.w,a6 + jsr _LVOAlert(a6) + + movem.l (sp)+,d7/a5/a6 +.exit: + move.l a5,d0 + movem.l (sp)+,a5 + rts + +;------------------------------------------------------------------------------ +Open: +;------------------------------------------------------------------------------ + + addq.w #1,LIB_OPENCNT(a6) + bclr #3,CARD_FLAGS(a6) + + IFD blitterhistory + move.l a0,-(sp) + lea $80000,a0 + moveq.l #16,d0 +.fill: + clr.l (a0)+ + dbra d0,.fill + + move.l (sp)+,a0 + ENDC + + move.l a6,d0 + rts + +;------------------------------------------------------------------------------ +Close: +;------------------------------------------------------------------------------ + + moveq #0,d0 + subq.w #1,LIB_OPENCNT(a6) + bne.b .exit + + btst #3,CARD_FLAGS(a6) + beq.b .exit + + bsr.b Expunge + +.exit: + rts + +;------------------------------------------------------------------------------ +Expunge: +;------------------------------------------------------------------------------ + + movem.l d2/a5/a6,-(sp) + movea.l a6,a5 + movea.l CARD_EXECBASE(a5),a6 + tst.w LIB_OPENCNT(a5) + beq.b .remove + + bset #3,CARD_FLAGS(a5) + moveq #0,d0 + bra.b .exit + +.remove: + move.l CARD_SEGMENTLIST(a5),d2 + movea.l a5,a1 + jsr _LVORemove(a6) + + movea.l CARD_EXPANSIONBASE(a5),a1 + jsr _LVOCloseLibrary(a6) + + moveq #0,d0 + movea.l a5,a1 + move.w LIB_NEGSIZE(a5),d0 + suba.l d0,a1 + add.w LIB_POSSIZE(a5),d0 + jsr _LVOFreeMem(a6) + + move.l d2,d0 +.exit: + movem.l (sp)+,d2/a5/a6 + rts + +;------------------------------------------------------------------------------ +ExtFunc: +;------------------------------------------------------------------------------ + + moveq #0,d0 + rts + +;------------------------------------------------------------------------------ +FindCard: +;------------------------------------------------------------------------------ +; BOOL FindCard(struct BoardInfo *bi) +; + +; FindCard is called in the first stage of the board initialisation and +; configuration and is used to look if there is a free and unconfigured +; board of the type the driver is capable of managing. If it finds one, +; it immediately reserves it for use by Picasso96, usually by clearing +; the CDB_CONFIGME bit in the flags field of the ConfigDev struct of +; this expansion card. But this is only a common example, a driver can +; do whatever it wants to mark this card as used by the driver. This +; mechanism is intended to ensure that a board is only configured and +; used by one driver. FindBoard also usually fills some fields of the +; BoardInfo struct supplied by the caller, the rtg.library, for example +; the MemoryBase, MemorySize and RegisterBase fields. + + move.l #MEMORY_SIZE ,PSSO_BoardInfo_MemorySize(a0) + move.l #REGISTER_BASE,PSSO_BoardInfo_RegisterBase(a0) + move.l #MEMORY_BASE ,PSSO_BoardInfo_MemoryBase(a0) + + moveq #-1,d0 + rts + +;------------------------------------------------------------------------------ +InitCard: +;------------------------------------------------------------------------------ +; a0: struct BoardInfo + + movem.l a2/a5/a6,-(sp) + movea.l a0,a2 + + lea CardName(pc),a1 + move.l a1,PSSO_BoardInfo_BoardName(a2) + move.l #10,PSSO_BoardInfo_BoardType(a2) + move.l #0,PSSO_BoardInfo_GraphicsControllerType(a2) + move.l #0,PSSO_BoardInfo_PaletteChipType(a2) + + ori.w #2,PSSO_BoardInfo_RGBFormats(a2) ; CLUT + ori.w #8,PSSO_BoardInfo_RGBFormats(a2) ; RGBFB_B8G8R8 + ori.w #16,PSSO_BoardInfo_RGBFormats(a2) ; RGBFB_R5G6B5PC + ori.w #256,PSSO_BoardInfo_RGBFormats(a2) ; RGBFB_R8G8B8A8 + + move.w #8,PSSO_BoardInfo_BitsPerCannon(a2) + move.l #MEMORY_SIZE-$40000,PSSO_BoardInfo_MemorySpaceSize(a2) + move.l PSSO_BoardInfo_MemoryBase(a2),d0 + move.l d0,PSSO_BoardInfo_MemorySpaceBase(a2) + addi.l #MEMORY_SIZE-$4000,d0 + move.l d0,PSSO_BoardInfo_MouseSaveBuffer(a2) + + ori.l #(1<<20),PSSO_BoardInfo_Flags(a2) ; BIF_INDISPLAYCHAIN + ;ori.l #(1<<1),PSSO_BoardInfo_Flags(a2) ; BIF_NOMEMORYMODEMIX + + lea SetSwitch(pc),a1 + move.l a1,PSSO_BoardInfo_SetSwitch(a2) + lea SetDAC(pc),a1 + move.l a1,PSSO_BoardInfo_SetDAC(a2) + lea SetGC(pc),a1 + move.l a1,PSSO_BoardInfo_SetGC(a2) + lea SetPanning(pc),a1 + move.l a1,PSSO_BoardInfo_SetPanning(a2) + lea CalculateBytesPerRow(pc),a1 + move.l a1,PSSO_BoardInfo_CalculateBytesPerRow(a2) + lea CalculateMemory(pc),a1 + move.l a1,PSSO_BoardInfo_CalculateMemory(a2) + lea GetCompatibleFormats(pc),a1 + move.l a1,PSSO_BoardInfo_GetCompatibleFormats(a2) + lea SetColorArray(pc),a1 + move.l a1,PSSO_BoardInfo_SetColorArray(a2) + lea SetDPMSLevel(pc),a1 + move.l a1,PSSO_BoardInfo_SetDPMSLevel(a2) + lea SetDisplay(pc),a1 + move.l a1,PSSO_BoardInfo_SetDisplay(a2) + lea SetMemoryMode(pc),a1 + move.l a1,PSSO_BoardInfo_SetMemoryMode(a2) + lea SetWriteMask(pc),a1 + move.l a1,PSSO_BoardInfo_SetWriteMask(a2) + lea SetReadPlane(pc),a1 + move.l a1,PSSO_BoardInfo_SetReadPlane(a2) + lea SetClearMask(pc),a1 + move.l a1,PSSO_BoardInfo_SetClearMask(a2) + lea WaitVerticalSync(pc),a1 + move.l a1,PSSO_BoardInfo_WaitVerticalSync(a2) +; lea (Reserved5,pc),a1 +; move.l a1,(PSSO_BoardInfo_Reserved5,a2) + lea SetClock(pc),a1 + move.l a1,PSSO_BoardInfo_SetClock(a2) + lea ResolvePixelClock(pc),a1 + move.l a1,PSSO_BoardInfo_ResolvePixelClock(a2) + lea GetPixelClock(pc),a1 + move.l a1,PSSO_BoardInfo_GetPixelClock(a2) + +; lea AllocCardMem(pc),a1 +; move.l a1,PSSO_BoardInfo_AllocCardMem(a2) +; lea FreeCardMem(pc),a1 +; move.l a1,PSSO_BoardInfo_FreeCardMem(a2) + + move.l #113440000,PSSO_BoardInfo_MemoryClock(a2) + + move.l #1,(PSSO_BoardInfo_PixelClockCount+0,a2) + move.l #1,(PSSO_BoardInfo_PixelClockCount+4,a2) + move.l #1,(PSSO_BoardInfo_PixelClockCount+8,a2) + move.l #1,(PSSO_BoardInfo_PixelClockCount+12,a2) + move.l #1,(PSSO_BoardInfo_PixelClockCount+16,a2) +;- Planar +;- Chunky +;- HiColor +;- Truecolor +;- Truecolor + Alpha + + move.w #4095,(PSSO_BoardInfo_MaxHorValue+0,a2) + move.w #4095,(PSSO_BoardInfo_MaxVerValue+0,a2) + move.w #4095,(PSSO_BoardInfo_MaxHorValue+2,a2) + move.w #4095,(PSSO_BoardInfo_MaxVerValue+2,a2) + move.w #4095,(PSSO_BoardInfo_MaxHorValue+4,a2) + move.w #4095,(PSSO_BoardInfo_MaxVerValue+4,a2) + move.w #4095,(PSSO_BoardInfo_MaxHorValue+6,a2) + move.w #4095,(PSSO_BoardInfo_MaxVerValue+6,a2) + move.w #4095,(PSSO_BoardInfo_MaxHorValue+8,a2) + move.w #4095,(PSSO_BoardInfo_MaxVerValue+8,a2) + + move.w #2048,(PSSO_BoardInfo_MaxHorResolution+0,a2) + move.w #2048,(PSSO_BoardInfo_MaxVerResolution+0,a2) + move.w #2048,(PSSO_BoardInfo_MaxHorResolution+2,a2) + move.w #2048,(PSSO_BoardInfo_MaxVerResolution+2,a2) + move.w #2048,(PSSO_BoardInfo_MaxHorResolution+4,a2) + move.w #2048,(PSSO_BoardInfo_MaxVerResolution+4,a2) + move.w #2048,(PSSO_BoardInfo_MaxHorResolution+6,a2) + move.w #2048,(PSSO_BoardInfo_MaxVerResolution+6,a2) + move.w #2048,(PSSO_BoardInfo_MaxHorResolution+8,a2) + move.w #2048,(PSSO_BoardInfo_MaxVerResolution+8,a2) + +; lea PSSO_BoardInfo_HardInterrupt(a2),a1 +; lea VBL_ISR(pc),a0 +; move.l a0,IS_CODE(a1) +; moveq #INTB_VERTB,d0 +; move.l $4,a6 +; jsr _LVOAddIntServer(a6) + +; FIXME - disable vblank interrupt for now. +; ori.l #(1<<4),PSSO_BoardInfo_Flags(a2) ; BIF_VBLANKINTERRUPT +; lea SetInterrupt(pc),a1 +; move.l a1,PSSO_BoardInfo_SetInterrupt(a2) + + IFD HasBlitter + ori.l #(1<<15),PSSO_BoardInfo_Flags(a2) ; BIF_BLITTER + lea BlitRectNoMaskComplete(pc),a1 + move.l a1,PSSO_BoardInfo_BlitRectNoMaskComplete(a2) + lea BlitRect(pc),a1 + move.l a1,PSSO_BoardInfo_BlitRect(a2) + lea WaitBlitter(pc),a1 + move.l a1,PSSO_BoardInfo_WaitBlitter(a2) + ENDC + + IFD HasSprite + ori.l #(1<<0),PSSO_BoardInfo_Flags(a2) ; BIF_HARDWARESPRITE + lea SetSprite(pc),a1 + move.l a1,PSSO_BoardInfo_SetSprite(a2) + lea SetSpritePosition(pc),a1 + move.l a1,PSSO_BoardInfo_SetSpritePosition(a2) + lea SetSpriteImage(pc),a1 + move.l a1,PSSO_BoardInfo_SetSpriteImage(a2) + lea SetSpriteColor(pc),a1 + move.l a1,PSSO_BoardInfo_SetSpriteColor(a2) + ENDC + + ori.l #(1<<3),PSSO_BoardInfo_Flags(a2) ; BIF_CACHEMODECHANGE + move.l PSSO_BoardInfo_MemoryBase(a2),(PSSO_BoardInfo_MemorySpaceBase,a2) + move.l PSSO_BoardInfo_MemorySize(a2),(PSSO_BoardInfo_MemorySpaceSize,a2) + + movea.l PSSO_BoardInfo_RegisterBase(a2),a0 + + moveq #-1,d0 +.exit: + movem.l (sp)+,a2/a5/a6 + rts + +;------------------------------------------------------------------------------ +SetSwitch: +;------------------------------------------------------------------------------ +; a0: struct BoardInfo +; d0.w: BOOL state +; this function should set a board switch to let the Amiga signal pass +; through when supplied with a 0 in d0 and to show the board signal if +; a 1 is passed in d0. You should remember the current state of the +; switch to avoid unneeded switching. If your board has no switch, then +; simply supply a function that does nothing except a RTS. +; +; NOTE: Return the opposite of the switch-state. BDK + + move.w PSSO_BoardInfo_MoniSwitch(a0),d1 + andi.w #$FFFE,d1 + tst.b d0 + beq.b .off + + ori.w #$0001,d1 +.off: + move.w PSSO_BoardInfo_MoniSwitch(a0),d0 + cmp.w d0,d1 + beq.b .done + + move.w d1,PSSO_BoardInfo_MoniSwitch(a0) + + andi.l #$1,d1 + movea.l PSSO_BoardInfo_RegisterBase(a0),a0 + move.w d1,REG_ENABLE(a0) + BUG "RTG:DisplaySwitch = %lx",d1 +.done: + ; bsr.w SetInterrupt + andi.w #$0001,d0 + rts + +;------------------------------------------------------------------------------ +SetDAC: +;------------------------------------------------------------------------------ +; a0: struct BoardInfo +; d7: RGBFTYPE RGBFormat +; This function is called whenever the RGB format of the display changes, +; e.g. from chunky to TrueColor. Usually, all you have to do is to set +; the RAMDAC of your board accordingly. + + movea.l PSSO_BoardInfo_RegisterBase(a0),a0 + move.w .setdac_Format(pc,d7.l*2),d0 + move.w d0,REG_FORMAT(a0) + BUG "RTG:DisplayFormat = %lx",d0 + rts + +; [2:0] : 011=8bpp(palette) 100=16bpp 101=24bpp 110=32bpp +; [3] : 0=16bits 565 1=16bits 1555 +; [4] : 0=RGB 1=BGR (for 16/24/32 modes) +; [5] : Swap Bytes + +.setdac_Format: + dc.w 3 ; 1 RGBFB_NONE planar mode (the name is historical) + dc.w 3 +32 ;+ 2 RGBFB_CLUT palette mode, set colors when opening screen using tags or use SetRGB32/LoadRGB32(...) + dc.w 5 ; 4 RGBFB_R8G8B8 TrueColor RGB (8 bit each) + dc.w 5 +16+32 ;+ 8 RGBFB_B8G8R8 TrueColor BGR (8 bit each) + dc.w 4 +16+32 ;+ 16 RGBFB_R5G6B5PC HiColor16 (5 bit R, 6 bit G, 5 bit B), format: gggbbbbbrrrrrggg + dc.w 4 +8 ; 32 RGBFB_R5G5B5PC HiColor15 (5 bit each), format: gggbbbbb0rrrrrgg + dc.w 6 ; 64 RGBFB_A8R8G8B8 4 Byte TrueColor ARGB (A unused alpha channel) + dc.w 6 +16 ; 128 RGBFB_A8B8G8R8 4 Byte TrueColor ABGR (A unused alpha channel) + dc.w 6 +32 ;+ 256 RGBFB_R8G8B8A8 4 Byte TrueColor RGBA (A unused alpha channel) + dc.w 6 +16 ; 512 RGBFB_B8G8R8A8 4 Byte TrueColor BGRA (A unused alpha channel) + dc.w 4 ; 1024 RGBFB_R5G6B5 HiColor16 (5 bit R, 6 bit G, 5 bit B), format: rrrrrggggggbbbbb + dc.w 4 +8 ; 2048 RGBFB_R5G5B5 HiColor15 (5 bit each), format: 0rrrrrgggggbbbbb + dc.w 4 ; 4096 RGBFB_B5G6R5PC HiColor16 (5 bit R, 6 bit G, 5 bit B), format: gggrrrrrbbbbbggg + dc.w 4 +8+16 ; 8192 RGBFB_B5G5R5PC HiColor15 (5 bit each), format: gggrrrrr0bbbbbbgg + +;------------------------------------------------------------------------------ +SetGC: +;------------------------------------------------------------------------------ +; a0: struct BoardInfo +; a1: struct ModeInfo +; d0: BOOL Border +; This function is called whenever another ModeInfo has to be set. This +; function simply sets up the CRTC and TS registers to generate the +; timing used for that screen mode. You should not set the DAC, clocks +; or linear start adress. They will be set when appropriate by their +; own functions. + +; For MiSTer, just set image size + + move.l a1,PSSO_BoardInfo_ModeInfo(a0) + movea.l PSSO_BoardInfo_RegisterBase(a0),a0 + + move.w PSSO_ModeInfo_Width(a1),d0 + moveq #0,d1 + move.b PSSO_ModeInfo_Depth(a1),d1 + addq.w #7,d1 + lsr.w #3,d1 + mulu.w d1,d0 + move.w d0,REG_STRIDE(a0) + BUG "RTG:BytesPerLine = %lx",d0 + + move.w PSSO_ModeInfo_Width(a1),d0 + move.w d0,REG_HSIZE(a0) + BUG "RTG:HSIZE = %lx",d0 + + move.w PSSO_ModeInfo_Height(a1),d0 + move.w d0,REG_VSIZE(a0) + BUG "RTG:VSIZE = %lx",d0 + + rts + +;------------------------------------------------------------------------------ +SetPanning: +;------------------------------------------------------------------------------ +; a0: struct BoardInfo +; a1: UBYTE* Memory +; d0: WORD Width +; d1: WORD XOffset +; d2: WORD YOffset +; d7: RGBFTYPE RGBFormat +; This function sets the view origin of a display which might also be +; overscanned. In register a1 you get the start address of the screen +; bitmap on the Amiga side. You will have to subtract the starting +; address of the board memory from that value to get the memory start +; offset within the board. Then you get the offset in pixels of the +; left upper edge of the visible part of an overscanned display. From +; these values you will have to calculate the LinearStartingAddress +; fields of the CRTC registers. + + movea.l PSSO_BoardInfo_RegisterBase(a0),a0 + move.l a1,d0 + sub.l #MEMORY_BASE,d0 + add.l #FB_BASE,d0 + BUG "RTG:ADDRESS = %lx",d0 + move.l d0,REG_ADDRESS(a0) + rts + +;------------------------------------------------------------------------------ +CalculateBytesPerRow: +;------------------------------------------------------------------------------ +; a0: struct BoardInfo +; d0: uae_u16 Width +; d7: RGBFTYPE RGBFormat +; This function calculates the amount of bytes needed for a line of +; "Width" pixels in the given RGBFormat. + + cmpi.l #16,d7 + bcc.b .exit + + move.w .base(pc,d7.l*2),d1 + jmp .base(pc,d1.w) + +.base: + dc.w .pp_1Bit-.base + dc.w .pp_1Byte-.base + dc.w .pp_3Bytes-.base + dc.w .pp_3Bytes-.base + dc.w .pp_2Bytes-.base + dc.w .pp_2Bytes-.base + dc.w .pp_4Bytes-.base + dc.w .pp_4Bytes-.base + dc.w .pp_4Bytes-.base + dc.w .pp_4Bytes-.base + dc.w .pp_2Bytes-.base + dc.w .pp_2Bytes-.base + dc.w .pp_2Bytes-.base + dc.w .pp_2Bytes-.base + dc.w .pp_2Bytes-.base + dc.w .pp_1Byte-.base + +.pp_4Bytes: + add.w d0,d0 +.pp_2Bytes: + add.w d0,d0 + bra.b .exit + +.pp_3Bytes: + move.w d0,d1 + add.w d0,d1 + add.w d1,d0 + bra.b .exit + +.pp_1Bit: + lsr.w #3,d0 + +.pp_1Byte: + +.exit: + rts + +;------------------------------------------------------------------------------ +CalculateMemory: +;------------------------------------------------------------------------------ + + move.l a1,d0 + rts + +;------------------------------------------------------------------------------ +SetColorArray: +;------------------------------------------------------------------------------ +; a0: struct BoardInfo +; d0.w: startindex +; d1.w: count +; when this function is called, your driver has to fetch "count" color +; values starting at "startindex" from the CLUT field of the BoardInfo +; structure and write them to the hardware. The color values are always +; between 0 and 255 for each component regardless of the number of bits +; per cannon your board has. So you might have to shift the colors +; before writing them to the hardware. + +; BUG "SetColorArray ( %ld / %ld )",d0,d1 + + lea PSSO_BoardInfo_CLUT(a0),a1 + movea.l PSSO_BoardInfo_RegisterBase(a0),a0 + + lea (a1,d0.w),a1 + lea (a1,d0.w*2),a1 + adda.l #REG_PALETTE,a0 + lea (a0,d0.w*4),a0 + + bra.b .sla_loop_end + +.sla_loop: + moveq #0,d0 + move.b (a1)+,d0 + lsl.w #8,d0 + move.b (a1)+,d0 + lsl.l #8,d0 + move.b (a1)+,d0 + + move.l d0,(a0)+ +.sla_loop_end + dbra d1,.sla_loop + + rts + +;------------------------------------------------------------------------------ +SetDPMSLevel: +;------------------------------------------------------------------------------ + + rts + +;------------------------------------------------------------------------------ +SetDisplay: +;------------------------------------------------------------------------------ +; a0: struct BoardInfo +; d0: BOOL state +; This function enables and disables the video display. +; +; NOTE: return the opposite of the state + + BUG "SetDisplay %ld",d0 + not.b d0 + andi.w #1,d0 + rts + +;------------------------------------------------------------------------------ +SetMemoryMode: +;------------------------------------------------------------------------------ + + rts + +;------------------------------------------------------------------------------ +SetWriteMask: +;------------------------------------------------------------------------------ + + rts + +;------------------------------------------------------------------------------ +SetReadPlane: +;------------------------------------------------------------------------------ + + rts + +;------------------------------------------------------------------------------ +SetClearMask: +;------------------------------------------------------------------------------ + + move.b d0,PSSO_BoardInfo_ClearMask(a0) + rts + +;------------------------------------------------------------------------------ +WaitVerticalSync: +;------------------------------------------------------------------------------ +; a0: struct BoardInfo +; This function waits for the next horizontal retrace. + BUG "WaitVerticalSync" + +; On minimig can simply use VPOSR for this + +.wait_done: + rts + +;------------------------------------------------------------------------------ +Reserved5: +;------------------------------------------------------------------------------ +; BUG "Reserved5" + +; movea.l PSSO_BoardInfo_RegisterBase(a0),a0 +; btst.b #7,VDE_DisplayStatus(a0) ;Vertical retrace +; sne d0 +; extb.l d0 + rts + +;------------------------------------------------------------------------------ +SetClock: +;------------------------------------------------------------------------------ + +; MiSTer framebuffer : Not used + rts + +;------------------------------------------------------------------------------ +ResolvePixelClock: +;------------------------------------------------------------------------------ +; ARGS: +; d0 - requested pixel clock frequency +; RESULT: +; d0 - pixel clock index + +; MiSTer framebuffer : Not used + + move.l #100000000,PSSO_ModeInfo_PixelClock(a1) + moveq #1,d0 + rts + +;------------------------------------------------------------------------------ +GetPixelClock: +;------------------------------------------------------------------------------ + move.l #100000000,d0 + rts + +;------------------------------------------------------------------------------ +SetInterrupt: +;------------------------------------------------------------------------------ + +; bchg.b #1,$bfe001 + +; movea.l PSSO_BoardInfo_RegisterBase(a0),a1 +; tst.b d0 +; beq.b .disable + +; move.w VDE_InterruptEnable(a1),d0 +; bne.b .done + +; move.w #$0001,VDE_InterruptEnable(a1) +; BUG "VDE_InterruptEnable = $0001" + +.done: rts + +;.disable: +; move.w VDE_InterruptEnable(a1),d0 +; beq.b .done + +; move.w #$0000,VDE_InterruptEnable(a1) +; BUG "VDE_InterruptEnable = $0000" +; bra.b .done + +;------------------------------------------------------------------------------ +VBL_ISR: +;------------------------------------------------------------------------------ + + moveq #0,d0 + rts + +;------------------------------------------------------------------------------ +GetCompatibleFormats: +;------------------------------------------------------------------------------ + + moveq #-1,d0 + rts + +;============================================================================== + +ProgEnd: + end diff --git a/extra/rtg_driver/MiSTer_RTG.lha b/extra/rtg_driver/MiSTer_RTG.lha new file mode 100644 index 00000000..05c392e3 Binary files /dev/null and b/extra/rtg_driver/MiSTer_RTG.lha differ diff --git a/extra/rtg_driver/build.bat b/extra/rtg_driver/build.bat new file mode 100644 index 00000000..c38c9be8 --- /dev/null +++ b/extra/rtg_driver/build.bat @@ -0,0 +1,4 @@ +if exist MiSTer.card.o del MiSTer.card.o +vasmm68k_mot -Iinclude -Fhunk -phxass -opt-fconst -nowarn=62 MiSTer.card.asm +vc MiSTer.card.o -nostdlib -o MiSTer.card +pause diff --git a/extra/rtg_driver/include/P96/P96BoardInfo.i b/extra/rtg_driver/include/P96/P96BoardInfo.i new file mode 100644 index 00000000..22cb83f9 --- /dev/null +++ b/extra/rtg_driver/include/P96/P96BoardInfo.i @@ -0,0 +1,165 @@ +; +; WWW.FPGAArcade.COM +; +; REPLAY Retro Gaming Platform +; No Emulation No Compromise +; +; Replay.card - P96 RTG driver for the REPLAY Amiga core +; Copyright (C) FPGAArcade community +; +; Contributors : Jakub Bednarski, Mike Johnson, Jim Drew, Erik Hemming, Nicolas Hamel +; +; This software is licensed under LPGLv2.1 ; see LICENSE file +; +; + +PSSO_BoardInfo_RegisterBase = 0 +PSSO_BoardInfo_MemoryBase = 4 +PSSO_BoardInfo_MemoryIOBase = 8 +PSSO_BoardInfo_MemorySize = 12 +PSSO_BoardInfo_BoardName = 16 +PSSO_BoardInfo_VBIName = 20 +PSSO_BoardInfo_CardBase = 52 +PSSO_BoardInfo_ChipBase = 56 +PSSO_BoardInfo_ExecBase = 60 +PSSO_BoardInfo_UtilBase = 64 +PSSO_BoardInfo_HardInterrupt = 68 +PSSO_BoardInfo_SoftInterrupt = 90 +PSSO_BoardInfo_BoardLock = 112 +PSSO_BoardInfo_ResolutionsList = 158 +PSSO_BoardInfo_BoardType = 170 +PSSO_BoardInfo_PaletteChipType = 174 +PSSO_BoardInfo_GraphicsControllerType = 178 +PSSO_BoardInfo_MoniSwitch = 182 +PSSO_BoardInfo_BitsPerCannon = 184 +PSSO_BoardInfo_Flags = 186 +PSSO_BoardInfo_SoftSpriteFlags = 190 +PSSO_BoardInfo_ChipFlags = 192 +PSSO_BoardInfo_CardFlags = 194 +PSSO_BoardInfo_BoardNum = 198 +PSSO_BoardInfo_RGBFormats = 200 +PSSO_BoardInfo_MaxHorValue = 202 +PSSO_BoardInfo_MaxVerValue = 212 +PSSO_BoardInfo_MaxHorResolution = 222 +PSSO_BoardInfo_MaxVerResolution = 232 +PSSO_BoardInfo_MaxMemorySize = 242 +PSSO_BoardInfo_MaxChunkSize = 246 +PSSO_BoardInfo_MemoryClock = 250 +PSSO_BoardInfo_PixelClockCount = 254 +PSSO_BoardInfo_AllocCardMem = 274 +PSSO_BoardInfo_FreeCardMem = 278 +PSSO_BoardInfo_SetSwitch = 282 +PSSO_BoardInfo_SetColorArray = 286 +PSSO_BoardInfo_SetDAC = 290 +PSSO_BoardInfo_SetGC = 294 +PSSO_BoardInfo_SetPanning = 298 +PSSO_BoardInfo_CalculateBytesPerRow = 302 +PSSO_BoardInfo_CalculateMemory = 306 +PSSO_BoardInfo_GetCompatibleFormats = 310 +PSSO_BoardInfo_SetDisplay = 314 +PSSO_BoardInfo_ResolvePixelClock = 318 +PSSO_BoardInfo_GetPixelClock = 322 +PSSO_BoardInfo_SetClock = 326 +PSSO_BoardInfo_SetMemoryMode = 330 +PSSO_BoardInfo_SetWriteMask = 334 +PSSO_BoardInfo_SetClearMask = 338 +PSSO_BoardInfo_SetReadPlane = 342 +PSSO_BoardInfo_WaitVerticalSync = 346 +PSSO_BoardInfo_SetInterrupt = 350 +PSSO_BoardInfo_WaitBlitter = 354 +PSSO_BoardInfo_ScrollPlanar = 358 +PSSO_BoardInfo_ScrollPlanarDefault = 362 +PSSO_BoardInfo_UpdatePlanar = 366 +PSSO_BoardInfo_UpdatePlanarDefault = 370 +PSSO_BoardInfo_BlitPlanar2Chunky = 374 +PSSO_BoardInfo_BlitPlanar2ChunkyDefault = 378 +PSSO_BoardInfo_FillRect = 382 +PSSO_BoardInfo_FillRectDefault = 386 +PSSO_BoardInfo_InvertRect = 390 +PSSO_BoardInfo_InvertRectDefault = 394 +PSSO_BoardInfo_BlitRect = 398 +PSSO_BoardInfo_BlitRectDefault = 402 +PSSO_BoardInfo_BlitTemplate = 406 +PSSO_BoardInfo_BlitTemplateDefault = 410 +PSSO_BoardInfo_BlitPattern = 414 +PSSO_BoardInfo_BlitPatternDefault = 418 +PSSO_BoardInfo_DrawLine = 422 +PSSO_BoardInfo_DrawLineDefault = 426 +PSSO_BoardInfo_BlitRectNoMaskComplete = 430 +PSSO_BoardInfo_BlitRectNoMaskCompleteDefault = 434 +PSSO_BoardInfo_BlitPlanar2Direct = 438 +PSSO_BoardInfo_BlitPlanar2DirectDefault = 442 +PSSO_BoardInfo_Reserved0 = 446 +PSSO_BoardInfo_Reserved0Default = 450 +PSSO_BoardInfo_Reserved1 = 454 +PSSO_BoardInfo_Reserved1Default = 458 +PSSO_BoardInfo_Reserved2 = 462 +PSSO_BoardInfo_Reserved2Default = 466 +PSSO_BoardInfo_Reserved3 = 470 +PSSO_BoardInfo_Reserved3Default = 474 +PSSO_BoardInfo_Reserved4 = 478 +PSSO_BoardInfo_Reserved4Default = 482 +PSSO_BoardInfo_Reserved5 = 486 +PSSO_BoardInfo_Reserved5Default = 490 +PSSO_BoardInfo_SetDPMSLevel = 494 +PSSO_BoardInfo_ResetChip = 498 +PSSO_BoardInfo_GetFeatureAttrs = 502 +PSSO_BoardInfo_AllocBitMap = 506 +PSSO_BoardInfo_FreeBitMap = 510 +PSSO_BoardInfo_GetBitMapAttr = 514 +PSSO_BoardInfo_SetSprite = 518 +PSSO_BoardInfo_SetSpritePosition = 522 +PSSO_BoardInfo_SetSpriteImage = 526 +PSSO_BoardInfo_SetSpriteColor = 530 +PSSO_BoardInfo_CreateFeature = 534 +PSSO_BoardInfo_SetFeatureAttrs = 538 +PSSO_BoardInfo_DeleteFeature = 542 +PSSO_BoardInfo_SpecialFeatures = 546 +PSSO_BoardInfo_ModeInfo = 558 +PSSO_BoardInfo_RGBFormat = 562 +PSSO_BoardInfo_XOffset = 566 +PSSO_BoardInfo_YOffset = 568 +PSSO_BoardInfo_Depth = 570 +PSSO_BoardInfo_ClearMask = 571 +PSSO_BoardInfo_Border = 572 +PSSO_BoardInfo_Mask = 574 +PSSO_BoardInfo_CLUT = 578 +PSSO_BoardInfo_ViewPort = 1346 +PSSO_BoardInfo_VisibleBitMap = 1350 +PSSO_BoardInfo_BitMapExtra = 1354 +PSSO_BoardInfo_BitMapList = 1358 +PSSO_BoardInfo_MemList = 1370 +PSSO_BoardInfo_MouseX = 1382 +PSSO_BoardInfo_MouseY = 1384 +PSSO_BoardInfo_MouseWidth = 1386 +PSSO_BoardInfo_MouseHeight = 1387 +PSSO_BoardInfo_MouseXOffset = 1388 +PSSO_BoardInfo_MouseYOffset = 1389 +PSSO_BoardInfo_MouseImage = 1390 +PSSO_BoardInfo_MousePens = 1394 +PSSO_BoardInfo_MouseRect = 1398 +PSSO_BoardInfo_MouseChunky = 1406 +PSSO_BoardInfo_MouseRendered = 1410 +PSSO_BoardInfo_MouseSaveBuffer = 1414 +PSSO_BoardInfo_ChipData = 1418 +PSSO_BoardInfo_CardData = 1482 +PSSO_BoardInfo_MemorySpaceBase = 1546 +PSSO_BoardInfo_MemorySpaceSize = 1550 +PSSO_BoardInfo_DoubleBufferList = 1554 +PSSO_BoardInfo_SyncTime = 1558 +PSSO_BoardInfo_SyncPeriod = 1562 +PSSO_BoardInfo_SoftVBlankPort = 1570 +PSSO_BoardInfo_SizeOf = 1604 + +CardData_HTotal = PSSO_BoardInfo_CardData+0 +CardData_HSStart = PSSO_BoardInfo_CardData+2 +CardData_HSStop = PSSO_BoardInfo_CardData+4 +CardData_HBStop = PSSO_BoardInfo_CardData+6 +CardData_VTotal = PSSO_BoardInfo_CardData+8 +CardData_VSStart = PSSO_BoardInfo_CardData+10 +CardData_VSStop = PSSO_BoardInfo_CardData+12 +CardData_VBStop = PSSO_BoardInfo_CardData+14 +CardData_Beamcon0 = PSSO_BoardInfo_CardData+16 +CardData_Control = PSSO_BoardInfo_CardData+18 +CardData_HWTrigger = PSSO_BoardInfo_CardData+20 + diff --git a/extra/rtg_driver/include/P96/P96CardStruct.i b/extra/rtg_driver/include/P96/P96CardStruct.i new file mode 100644 index 00000000..0a68ae99 --- /dev/null +++ b/extra/rtg_driver/include/P96/P96CardStruct.i @@ -0,0 +1,23 @@ +; +; WWW.FPGAArcade.COM +; +; REPLAY Retro Gaming Platform +; No Emulation No Compromise +; +; Replay.card - P96 RTG driver for the REPLAY Amiga core +; Copyright (C) FPGAArcade community +; +; Contributors : Jakub Bednarski, Mike Johnson, Jim Drew, Erik Hemming, Nicolas Hamel +; +; This software is licensed under LPGLv2.1 ; see LICENSE file +; +; + +CARD_FLAGS = $22 +CARD_EXECBASE = $24 +CARD_EXPANSIONBASE = $28 +CARD_SEGMENTLIST = $2C +CARD_NAME = $30 +CARD_INTUITIONBASE = $34 +CARD_SIZEOF = $38 + diff --git a/extra/rtg_driver/include/P96/P96ModeInfo.i b/extra/rtg_driver/include/P96/P96ModeInfo.i new file mode 100644 index 00000000..7c511bd0 --- /dev/null +++ b/extra/rtg_driver/include/P96/P96ModeInfo.i @@ -0,0 +1,40 @@ +; +; WWW.FPGAArcade.COM +; +; REPLAY Retro Gaming Platform +; No Emulation No Compromise +; +; Replay.card - P96 RTG driver for the REPLAY Amiga core +; Copyright (C) FPGAArcade community +; +; Contributors : Jakub Bednarski, Mike Johnson, Jim Drew, Erik Hemming, Nicolas Hamel +; +; This software is licensed under LPGLv2.1 ; see LICENSE file +; +; + +PSSO_ModeInfo_OpenCount = 14 +PSSO_ModeInfo_Active = 16 +PSSO_ModeInfo_Width = 18 +PSSO_ModeInfo_Height = 20 +PSSO_ModeInfo_Depth = 22 +PSSO_ModeInfo_Flags = 23 +PSSO_ModeInfo_HorTotal = 24 +PSSO_ModeInfo_HorBlankSize = 26 +PSSO_ModeInfo_HorSyncStart = 28 +PSSO_ModeInfo_HorSyncSize = 30 +PSSO_ModeInfo_HorSyncSkew = 32 +PSSO_ModeInfo_HorEnableSkew = 33 +PSSO_ModeInfo_VerTotal = 34 +PSSO_ModeInfo_VerBlankSize = 36 +PSSO_ModeInfo_VerSyncStart = 38 +PSSO_ModeInfo_VerSyncSize = 40 +PSSO_ModeInfo_first_union = 42 +PSSO_ModeInfo_second_union = 43 +PSSO_ModeInfo_PixelClock = 44 +PSSO_ModeInfo_sizeof = 48 + +GMB_HPOLARITY = 3 +GMF_HPOLARITY = 8 +GMB_VPOLARITY = 4 +GMF_VPOLARITY = 16 diff --git a/extra/rtg_driver/include/exec/ables.i b/extra/rtg_driver/include/exec/ables.i new file mode 100644 index 00000000..0ac693c4 --- /dev/null +++ b/extra/rtg_driver/include/exec/ables.i @@ -0,0 +1,128 @@ + IFND EXEC_ABLES_I +EXEC_ABLES_I SET 1 +** +** $VER: ables.i 39.0 (15.10.1991) +** Includes Release 45.1 +** +** Task switch and interrupt control macros +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC ; EXEC_TYPES_I + + IFND EXEC_EXECBASE_I + INCLUDE "exec/execbase.i" + ENDC ; EXEC_EXECBASE_I + + +*------------------------------------------------------------------------- +* +* Interrupt Exclusion Macros. Disable all tasks and interrupts. +* +*------------------------------------------------------------------------- + +INT_ABLES MACRO ; externals used by DISABLE and ENABLE + XREF _intena + ENDM + +;Disable interrupts. Avoid use of DISABLE if at all possible. +;Please realize the danger of this macro! Don't disable for long periods! +DISABLE MACRO ; [scratchReg],[NOFETCH] or have ExecBase in A6. + IFC '\1','' ;Case 1: Assume A6=ExecBase + MOVE.W #$04000,_intena ;(NOT IF_SETCLR)+IF_INTEN + ADDQ.B #1,IDNestCnt(A6) + MEXIT + ENDC + IFC '\2','NOFETCH' ;Case 2: Assume \1=ExecBase + MOVE.W #$04000,_intena + ADDQ.B #1,IDNestCnt(\1) + MEXIT + ENDC + IFNC '\1','' ;Case 3: Use \1 as scratch + MOVE.L 4,\1 ;Get ExecBase + MOVE.W #$04000,_intena + ADDQ.B #1,IDNestCnt(\1) + MEXIT + ENDC + ENDM + +;Enable interrupts. Please realize the danger of this macro! +ENABLE MACRO ; [scratchReg],[NOFETCH] or have ExecBase in A6. + IFC '\1','' ;Case 1: Assume A6=ExecBase + SUBQ.B #1,IDNestCnt(A6) + BGE.S ENABLE\@ + MOVE.W #$0C000,_intena ;IF_SETCLR+IF_INTEN +ENABLE\@: + MEXIT + ENDC + IFC '\2','NOFETCH' ;Case 2: Assume \1=ExecBase + SUBQ.B #1,IDNestCnt(\1) + BGE.S ENABLE\@ + MOVE.W #$0C000,_intena +ENABLE\@: + MEXIT + ENDC + IFNC '\1','' ;Case 3: Use \1 as scratch + MOVE.L 4,\1 ;Get ExecBase + SUBQ.B #1,IDNestCnt(\1) + BGE.S ENABLE\@ + MOVE.W #$0C000,_intena +ENABLE\@: + MEXIT + ENDC + ENDM + + +*------------------------------------------------------------------------- +* +* Tasking Exclusion Macros. Forbid all other tasks (but not interrupts) +* +*------------------------------------------------------------------------- + +TASK_ABLES MACRO ; externals used by FORBID and PERMIT + XREF _LVOPermit + ENDM + +;Prevent task switching (disables reschedule) +FORBID MACRO ; [scratchReg],[NOFETCH] or ExecBase in A6! + IFC '\1','' ;Case 1: Assume A6=ExecBase + ADDQ.B #1,TDNestCnt(A6) + MEXIT + ENDC + IFC '\2','NOFETCH' ;Case 2: Assume \1=ExecBase + ADDQ.B #1,TDNestCnt(\1) + MEXIT + ENDC + IFNC '\1','' ;Case 3: Use \1 as scratch + MOVE.L 4,\1 ;Get ExecBase + ADDQ.B #1,TDNestCnt(\1) + MEXIT + ENDC + ENDM + +;Enable task switching +PERMIT MACRO ; [saveFlag],[NOFETCH] or ExecBase in A6! + IFC '\1','' ;Case 1: Assume A6=ExecBase + JSR _LVOPermit(A6) + MEXIT + ENDC + IFC '\2','NOFETCH' ;Case 2: Assume \1=ExecBase + EXG.L A6,\1 ;put execbase in A6 + JSR _LVOPermit(A6) ;no registers touched. A6=ExecBase + EXG.L A6,\1 + MEXIT + ENDC + IFNC '\1','' ;Case 2: save/restore A6 + MOVE.L A6,-(SP) + MOVE.L 4,A6 + JSR _LVOPermit(A6) + MOVE.L (SP)+,A6 + MEXIT + ENDC + ENDM + + ENDC ; EXEC_ABLES_I diff --git a/extra/rtg_driver/include/exec/alerts.i b/extra/rtg_driver/include/exec/alerts.i new file mode 100644 index 00000000..00233fa6 --- /dev/null +++ b/extra/rtg_driver/include/exec/alerts.i @@ -0,0 +1,312 @@ + IFND EXEC_ALERTS_I +EXEC_ALERTS_I SET 1 +** +** $VER: alerts.i 39.4 (13.11.1992) +** Includes Release 45.1 +** +** Alert numbers, as displayed by system crashes. +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + +********************************************************************** +* +* Format of the alert error number: +* +* +---------------+----------------+--------------------------------+ +* |D| SubSysId | General Error | SubSystem Specific Error | +* +---------------+----------------+--------------------------------+ +* 1 7 bits 8 bits 16 bits +* +* D: DeadEnd alert +* SubSysId: indicates ROM subsystem number. +* General Error: roughly indicates what the error was +* Specific Error: indicates more detail +*********************************************************************** + +* +* Use this macro for causing an alert. It is very sensitive to memory +* corruption.... like stepping on location 4! After the alert, it +* will return. +* +* A0/A1 and D0/D1 are destroyed +* +* +ALERT MACRO (alertNumber, [paramArray]) + movem.l d7/a5/a6,-(sp) + move.l #\1,d7 + IFNC '\2','' + lea.l \2,a5 + ENDC + move.l 4,a6 + jsr _LVOAlert(a6) + movem.l (sp)+,d7/a5/a6 + ENDM +* +* Use this macro for dead end alerts that never return +* +DEADALERT MACRO (alertNumber, [paramArray]) + move.l #\1,d7 + IFNC '\2','' + lea.l \2,a5 + ENDC + move.l 4,a6 + jsr _LVOAlert(a6) ; never returns + ENDM + +********************************************************************** +* +* Hardware/CPU specific alerts: They may show without the 8 at the +* front of the number. These are CPU/68000 specific. See 680x0 +* programmer's manuals for more details. +* +********************************************************************** +ACPU_BusErr equ $80000002 ; Hardware bus fault/access error +ACPU_AddressErr equ $80000003 ; Illegal address access (ie: odd) +ACPU_InstErr equ $80000004 ; Illegal instruction +ACPU_DivZero equ $80000005 ; Divide by zero +ACPU_CHK equ $80000006 ; Check instruction error +ACPU_TRAPV equ $80000007 ; TrapV instruction error +ACPU_PrivErr equ $80000008 ; Privilege violation error +ACPU_Trace equ $80000009 ; Trace error +ACPU_LineA equ $8000000A ; Line 1010 Emulator error +ACPU_LineF equ $8000000B ; Line 1111 Emulator error +ACPU_Format equ $8000000E ; Stack frame format error +ACPU_Spurious equ $80000018 ; Spurious interrupt error +ACPU_AutoVec1 equ $80000019 ; AutoVector Level 1 interrupt error +ACPU_AutoVec2 equ $8000001A ; AutoVector Level 2 interrupt error +ACPU_AutoVec3 equ $8000001B ; AutoVector Level 3 interrupt error +ACPU_AutoVec4 equ $8000001C ; AutoVector Level 4 interrupt error +ACPU_AutoVec5 equ $8000001D ; AutoVector Level 5 interrupt error +ACPU_AutoVec6 equ $8000001E ; AutoVector Level 6 interrupt error +ACPU_AutoVec7 equ $8000001F ; AutoVector Level 7 interrupt error + +********************************************************************** +* +* General Alerts +* +* For example: timer.device cannot open math.library: +* +* ALERT (AN_TimerDev!AG_OpenLib!AO_MathLib) ;0x05038015 +* +********************************************************************** + +;------ alert types +AT_DeadEnd equ $80000000 +AT_Recovery equ $00000000 + +;------ general purpose alert codes +AG_NoMemory equ $00010000 +AG_MakeLib equ $00020000 +AG_OpenLib equ $00030000 +AG_OpenDev equ $00040000 +AG_OpenRes equ $00050000 +AG_IOError equ $00060000 +AG_NoSignal equ $00070000 +AG_BadParm equ $00080000 +AG_CloseLib equ $00090000 ;Usually too many closes +AG_CloseDev equ $000A0000 ;or a mismatched close +AG_ProcCreate equ $000B0000 ;Process creation failed + +;------ alert objects: +AO_ExecLib equ $00008001 +AO_GraphicsLib equ $00008002 +AO_LayersLib equ $00008003 +AO_Intuition equ $00008004 +AO_MathLib equ $00008005 +AO_DOSLib equ $00008007 +AO_RAMLib equ $00008008 +AO_IconLib equ $00008009 +AO_ExpansionLib equ $0000800A +AO_DiskfontLib equ $0000800B +AO_UtilityLib equ $0000800C +AO_KeyMapLib equ $0000800D + +AO_AudioDev equ $00008010 +AO_ConsoleDev equ $00008011 +AO_GamePortDev equ $00008012 +AO_KeyboardDev equ $00008013 +AO_TrackDiskDev equ $00008014 +AO_TimerDev equ $00008015 + +AO_CIARsrc equ $00008020 +AO_DiskRsrc equ $00008021 +AO_MiscRsrc equ $00008022 + +AO_BootStrap equ $00008030 +AO_Workbench equ $00008031 +AO_DiskCopy equ $00008032 +AO_GadTools equ $00008033 +AO_Unknown equ $00008035 + +********************************************************************** +* +* Specific Alerts: +* +* For example: exec.library -- corrupted memory list +* +* ALERT AN_MemCorrupt ;8100 0005 +* +********************************************************************** + +;------ exec.library +AN_ExecLib equ $01000000 +AN_ExcptVect equ $01000001 ; 68000 exception vector checksum (obs.) +AN_BaseChkSum equ $01000002 ; Execbase checksum bad (obs.) +AN_LibChkSum equ $01000003 ; Library checksum failure + +AN_MemCorrupt equ $81000005 ; Corrupt memory list detected in FreeMem +AN_IntrMem equ $81000006 ; No memory for interrupt servers +AN_InitAPtr equ $01000007 ; InitStruct() of an APTR source (obs.) +AN_SemCorrupt equ $01000008 ; A semaphore is in an illegal state + ; at ReleaseSemaphore() +AN_FreeTwice equ $01000009 ; Freeing memory that is already free +AN_BogusExcpt equ $8100000A ; Illegal 68k exception taken (obs.) +AN_IOUsedTwice equ $0100000B ; Attempt to reuse active IORequest +AN_MemoryInsane equ $0100000C ; Sanity check on memory list failed + ; during AvailMem(MEMF_LARGEST) +AN_IOAfterClose equ $0100000D ; IO attempted on closed IORequest +AN_StackProbe equ $0100000E ; Stack appears to extend out of range +AN_BadFreeAddr equ $0100000F ; Memory header not located. [ Usually an + ; invalid address passed to FreeMem() ] +AN_BadSemaphore equ $01000010 ; An attempt was made to use the old + ; message semaphores. +AN_BadQuickInt equ $810000FF ; A quick interrupt has happened to an + ; uninitialized vector. + +;------ graphics.library +AN_GraphicsLib equ $02000000 +AN_GfxNoMem equ $82010000 ; graphics out of memory +AN_GfxNoMemMspc equ $82010001 ; MonitorSpec alloc, no memory +AN_LongFrame equ $82010006 ; long frame, no memory +AN_ShortFrame equ $82010007 ; short frame, no memory +AN_TextTmpRas equ $02010009 ; text, no memory for TmpRas +AN_BltBitMap equ $8201000A ; BltBitMap, no memory +AN_RegionMemory equ $8201000B ; regions, memory not available +AN_MakeVPort equ $82010030 ; MakeVPort, no memory +AN_GfxNewError equ $0200000C +AN_GfxFreeError equ $0200000D + +AN_GfxNoLCM equ $82011234 ; emergency memory not available + +AN_ObsoleteFont equ $02000401 ; unsupported font description used + +;------ layers.library +AN_LayersLib equ $03000000 +AN_LayersNoMem equ $83010000 ; layers out of memory + +;------ intuition.library +AN_Intuition equ $04000000 +AN_GadgetType equ $84000001 ; unknown gadget type +AN_BadGadget equ $04000001 ; Recovery form of AN_GadgetType +AN_CreatePort equ $84010002 ; create port, no memory +AN_ItemAlloc equ $04010003 ; item plane alloc, no memory +AN_SubAlloc equ $04010004 ; sub alloc, no memory +AN_PlaneAlloc equ $84010005 ; plane alloc, no memory +AN_ItemBoxTop equ $84000006 ; item box top < RelZero +AN_OpenScreen equ $84010007 ; open screen, no memory +AN_OpenScrnRast equ $84010008 ; open screen, raster alloc, no memory +AN_SysScrnType equ $84000009 ; open sys screen, unknown type +AN_AddSWGadget equ $8401000A ; add SW gadgets, no memory +AN_OpenWindow equ $8401000B ; open window, no memory +AN_BadState equ $8400000C ; Bad State Return entering Intuition +AN_BadMessage equ $8400000D ; Bad Message received by IDCMP +AN_WeirdEcho equ $8400000E ; Weird echo causing incomprehension +AN_NoConsole equ $8400000F ; couldn't open the Console Device +AN_NoISem equ $04000010 ; Intuition skipped obtaining a sem +AN_ISemOrder equ $04000011 ; Intuition obtained a sem in bad order + +;------ math.library +AN_MathLib equ $05000000 + +;------ dos.library +AN_DOSLib equ $07000000 +AN_StartMem equ $07010001 ; no memory at startup +AN_EndTask equ $07000002 ; EndTask didn't +AN_QPktFail equ $07000003 ; Qpkt failure +AN_AsyncPkt equ $07000004 ; Unexpected packet received +AN_FreeVec equ $07000005 ; Freevec failed +AN_DiskBlkSeq equ $07000006 ; Disk block sequence error +AN_BitMap equ $07000007 ; Bitmap corrupt +AN_KeyFree equ $07000008 ; Key already free +AN_BadChkSum equ $07000009 ; Invalid checksum +AN_DiskError equ $0700000A ; Disk Error +AN_KeyRange equ $0700000B ; Key out of range +AN_BadOverlay equ $0700000C ; Bad overlay +AN_BadInitFunc equ $0700000D ; Invalid init packet for cli/shell +AN_FileReclosed equ $0700000E ; A filehandle was closed more than once + +;------ ramlib.library +AN_RAMLib equ $08000000 +AN_BadSegList equ $08000001 ; overlays are illegal for library segments + +;------ icon.library +AN_IconLib equ $09000000 + +;------ expansion.library +AN_ExpansionLib equ $0A000000 +AN_BadExpansionFree equ $0A000001 ;Freeed free region + +;------ diskfont.library +AN_DiskfontLib equ $0B000000 + +;------ audio.device +AN_AudioDev equ $10000000 + +;------ console.device +AN_ConsoleDev equ $11000000 +AN_NoWindow equ $11000001 ; Console can't open initial window + +;------ gameport.device +AN_GamePortDev equ $12000000 + +;------ keyboard.device +AN_KeyboardDev equ $13000000 + +;------ trackdisk.device +AN_TrackDiskDev equ $14000000 +AN_TDCalibSeek equ $14000001 ; calibrate: seek error +AN_TDDelay equ $14000002 ; delay: error on timer wait + +;------ timer.device +AN_TimerDev equ $15000000 +AN_TMBadReq equ $15000001 ; bad request +AN_TMBadSupply equ $15000002 ; power supply -- no 50/60hz ticks + +;------ cia.resource +AN_CIARsrc equ $20000000 + +;------ disk.resource +AN_DiskRsrc equ $21000000 +AN_DRHasDisk equ $21000001 ; get unit: already has disk +AN_DRIntNoAct equ $21000002 ; interrupt: no active unit + +;------ misc.resource +AN_MiscRsrc equ $22000000 + +;------ bootstrap +AN_BootStrap equ $30000000 +AN_BootError equ $30000001 ; boot code returned an error + +;------ workbench +AN_Workbench equ $31000000 +AN_NoFonts equ $B1000001 +AN_WBBadStartupMsg1 equ $31000001 +AN_WBBadStartupMsg2 equ $31000002 +AN_WBBadIOMsg equ $31000003 ; Hacker code? +AN_WBReLayoutToolMenu equ $B1010009 ; GadTools broke? + +;------ DiskCopy +AN_DiskCopy equ $32000000 + +;------ toolkit for Intuition +AN_GadTools equ $33000000 + +;------ System utility library +AN_UtilityLib equ $34000000 + +;------ For use by any application that needs it +AN_Unknown equ $35000000 + + ENDC ;EXEC_ALERTS_I diff --git a/extra/rtg_driver/include/exec/devices.i b/extra/rtg_driver/include/exec/devices.i new file mode 100644 index 00000000..69afa8c5 --- /dev/null +++ b/extra/rtg_driver/include/exec/devices.i @@ -0,0 +1,50 @@ + IFND EXEC_DEVICES_I +EXEC_DEVICES_I SET 1 +** +** $VER: devices.i 39.0 (15.10.1991) +** Includes Release 45.1 +** +** Include file for use by Exec device drivers +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_LIBRARIES_I + INCLUDE "exec/libraries.i" + ENDC ; EXEC_LIBRARIES_I + + IFND EXEC_PORTS_I + INCLUDE "exec/ports.i" + ENDC ; EXEC_PORTS_I + + +*---------------------------------------------------------------- +* +* Device Data Structure +* +*---------------------------------------------------------------- + + STRUCTURE DD,LIB_SIZE + LABEL DD_SIZE ; identical to library + + +*---------------------------------------------------------------- +* +* Suggested Unit Structure +* +*---------------------------------------------------------------- + + STRUCTURE UNIT,MP_SIZE ; queue for requests + UBYTE UNIT_FLAGS + UBYTE UNIT_pad + UWORD UNIT_OPENCNT + LABEL UNIT_SIZE + + +*------ UNIT_FLAG definitions: + + BITDEF UNIT,ACTIVE,0 ; driver is active + BITDEF UNIT,INTASK,1 ; running in driver's task + + ENDC ; EXEC_DEVICES_I diff --git a/extra/rtg_driver/include/exec/errors.i b/extra/rtg_driver/include/exec/errors.i new file mode 100644 index 00000000..66896309 --- /dev/null +++ b/extra/rtg_driver/include/exec/errors.i @@ -0,0 +1,23 @@ + IFND EXEC_ERRORS_I +EXEC_ERRORS_I SET 1 +** +** $VER: errors.i 39.0 (15.10.1991) +** Includes Release 45.1 +** +** Standard Device IO Errors (returned in io_Error) +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + +IOERR_OPENFAIL EQU -1 ; device/unit failed to open +IOERR_ABORTED EQU -2 ; request terminated early [after AbortIO()] +IOERR_NOCMD EQU -3 ; command not supported by device +IOERR_BADLENGTH EQU -4 ; not a valid length (usually IO_LENGTH) +IOERR_BADADDRESS EQU -5 ; invalid address (misaligned or bad range) +IOERR_UNITBUSY EQU -6 ; device opens ok, but requested unit is busy +IOERR_SELFTEST EQU -7 ; hardware failed self-test + +ERR_OPENDEVICE EQU IOERR_OPENFAIL ; Obsolete + + ENDC ; EXEC_ERRORS_I diff --git a/extra/rtg_driver/include/exec/exec.i b/extra/rtg_driver/include/exec/exec.i new file mode 100644 index 00000000..9218c893 --- /dev/null +++ b/extra/rtg_driver/include/exec/exec.i @@ -0,0 +1,36 @@ + IFND EXEC_EXEC_I +EXEC_EXEC_I SET 1 +** +** $VER: exec.i 39.0 (15.10.1991) +** Includes Release 45.1 +** +** Include all other Exec include files in non-overlapping order. +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + INCLUDE "exec/macros.i" + INCLUDE "exec/nodes.i" + INCLUDE "exec/lists.i" + INCLUDE "exec/alerts.i" + INCLUDE "exec/errors.i" + INCLUDE "exec/initializers.i" + INCLUDE "exec/resident.i" + INCLUDE "exec/strings.i" + INCLUDE "exec/memory.i" + INCLUDE "exec/tasks.i" + INCLUDE "exec/ports.i" + INCLUDE "exec/interrupts.i" + INCLUDE "exec/semaphores.i" + INCLUDE "exec/libraries.i" + INCLUDE "exec/io.i" + INCLUDE "exec/devices.i" + INCLUDE "exec/execbase.i" + INCLUDE "exec/ables.i" +;;;;;;;;INCLUDE "exec/exec_lib.i" ;special information + + ENDC ; EXEC_EXEC_I diff --git a/extra/rtg_driver/include/exec/exec_lib.i b/extra/rtg_driver/include/exec/exec_lib.i new file mode 100644 index 00000000..33f3126b --- /dev/null +++ b/extra/rtg_driver/include/exec/exec_lib.i @@ -0,0 +1,160 @@ + IFND EXEC_LIB_I +EXEC_LIB_I SET 1 +** +** $VER: exec_lib.i 45.2 (25.2.2001) +** +** Library vector table +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + FUNCDEF Supervisor + FUNCDEF execPrivate1 + FUNCDEF execPrivate2 + FUNCDEF execPrivate3 + FUNCDEF execPrivate4 + FUNCDEF execPrivate5 + FUNCDEF execPrivate6 + FUNCDEF InitCode + FUNCDEF InitStruct + FUNCDEF MakeLibrary + FUNCDEF MakeFunctions + FUNCDEF FindResident + FUNCDEF InitResident + FUNCDEF Alert + FUNCDEF Debug + FUNCDEF Disable + FUNCDEF Enable + FUNCDEF Forbid + FUNCDEF Permit + FUNCDEF SetSR + FUNCDEF SuperState + FUNCDEF UserState + FUNCDEF SetIntVector + FUNCDEF AddIntServer + FUNCDEF RemIntServer + FUNCDEF Cause + FUNCDEF Allocate + FUNCDEF Deallocate + FUNCDEF AllocMem + FUNCDEF AllocAbs + FUNCDEF FreeMem + FUNCDEF AvailMem + FUNCDEF AllocEntry + FUNCDEF FreeEntry + FUNCDEF Insert + FUNCDEF AddHead + FUNCDEF AddTail + FUNCDEF Remove + FUNCDEF RemHead + FUNCDEF RemTail + FUNCDEF Enqueue + FUNCDEF FindName + FUNCDEF AddTask + FUNCDEF RemTask + FUNCDEF FindTask + FUNCDEF SetTaskPri + FUNCDEF SetSignal + FUNCDEF SetExcept + FUNCDEF Wait + FUNCDEF Signal + FUNCDEF AllocSignal + FUNCDEF FreeSignal + FUNCDEF AllocTrap + FUNCDEF FreeTrap + FUNCDEF AddPort + FUNCDEF RemPort + FUNCDEF PutMsg + FUNCDEF GetMsg + FUNCDEF ReplyMsg + FUNCDEF WaitPort + FUNCDEF FindPort + FUNCDEF AddLibrary + FUNCDEF RemLibrary + FUNCDEF OldOpenLibrary + FUNCDEF CloseLibrary + FUNCDEF SetFunction + FUNCDEF SumLibrary + FUNCDEF AddDevice + FUNCDEF RemDevice + FUNCDEF OpenDevice + FUNCDEF CloseDevice + FUNCDEF DoIO + FUNCDEF SendIO + FUNCDEF CheckIO + FUNCDEF WaitIO + FUNCDEF AbortIO + FUNCDEF AddResource + FUNCDEF RemResource + FUNCDEF OpenResource + FUNCDEF execPrivate7 + FUNCDEF execPrivate8 + FUNCDEF execPrivate9 + FUNCDEF RawDoFmt + FUNCDEF GetCC + FUNCDEF TypeOfMem + FUNCDEF Procure + FUNCDEF Vacate + FUNCDEF OpenLibrary + FUNCDEF InitSemaphore + FUNCDEF ObtainSemaphore + FUNCDEF ReleaseSemaphore + FUNCDEF AttemptSemaphore + FUNCDEF ObtainSemaphoreList + FUNCDEF ReleaseSemaphoreList + FUNCDEF FindSemaphore + FUNCDEF AddSemaphore + FUNCDEF RemSemaphore + FUNCDEF SumKickData + FUNCDEF AddMemList + FUNCDEF CopyMem + FUNCDEF CopyMemQuick + FUNCDEF CacheClearU + FUNCDEF CacheClearE + FUNCDEF CacheControl + FUNCDEF CreateIORequest + FUNCDEF DeleteIORequest + FUNCDEF CreateMsgPort + FUNCDEF DeleteMsgPort + FUNCDEF ObtainSemaphoreShared + FUNCDEF AllocVec + FUNCDEF FreeVec + FUNCDEF CreatePool + FUNCDEF DeletePool + FUNCDEF AllocPooled + FUNCDEF FreePooled + FUNCDEF AttemptSemaphoreShared + FUNCDEF ColdReboot + FUNCDEF StackSwap + FUNCDEF ChildFree + FUNCDEF ChildOrphan + FUNCDEF ChildStatus + FUNCDEF ChildWait + FUNCDEF CachePreDMA + FUNCDEF CachePostDMA + FUNCDEF AddMemHandler + FUNCDEF RemMemHandler + FUNCDEF ObtainQuickVector + FUNCDEF execPrivate10 + FUNCDEF execPrivate11 + FUNCDEF execPrivate12 + FUNCDEF execPrivate13 + FUNCDEF execPrivate14 + FUNCDEF execPrivate15 + FUNCDEF NewMinList + FUNCDEF ExecReserved10 + FUNCDEF ExecReserved11 + FUNCDEF ExecReserved12 + FUNCDEF AVL_AddNode + FUNCDEF AVL_RemNodeByAddress + FUNCDEF AVL_RemNodeByKey + FUNCDEF AVL_FindNode + FUNCDEF AVL_FindPrevNodeByAddress + FUNCDEF AVL_FindPrevNodeByKey + FUNCDEF AVL_FindNextNodeByAddress + FUNCDEF AVL_FindNextNodeByKey + FUNCDEF AVL_FindFirstNode + FUNCDEF AVL_FindLastNode + + ENDC ; EXEC_LIB_I diff --git a/extra/rtg_driver/include/exec/execbase.i b/extra/rtg_driver/include/exec/execbase.i new file mode 100644 index 00000000..8c66154c --- /dev/null +++ b/extra/rtg_driver/include/exec/execbase.i @@ -0,0 +1,220 @@ + IFND EXEC_EXECBASE_I +EXEC_EXECBASE_I SET 1 +** +** $VER: execbase.i 39.4 (18.1.1993) +** Includes Release 45.1 +** +** Definition of the exec.library base structure. +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC ; EXEC_TYPES_I + + IFND EXEC_LISTS_I + INCLUDE "exec/lists.i" + ENDC ; EXEC_LISTS_I + + IFND EXEC_INTERRUPTS_I + INCLUDE "exec/interrupts.i" + ENDC ; EXEC_INTERRUPTS_I + + IFND EXEC_LIBRARIES_I + INCLUDE "exec/libraries.i" + ENDC ; EXEC_LIBRARIES_I + + + +** Definition of the Exec library base structure (pointed to by location 4). +** Most fields are not to be viewed or modified by user programs. Use +** extreme caution. +** + STRUCTURE ExecBase,LIB_SIZE ; Standard library node + +******* Static System Variables ********************************************* + + UWORD SoftVer ; kickstart release number (obs.) + WORD LowMemChkSum ; checksum of 68000 trap vectors + ULONG ChkBase ; system base pointer complement + APTR ColdCapture ; coldstart soft capture vector + APTR CoolCapture ; coolstart soft capture vector + APTR WarmCapture ; warmstart soft capture vector + APTR SysStkUpper ; system stack base (upper bound) + APTR SysStkLower ; top of system stack (lower bound) + ULONG MaxLocMem ; top of chip memory + APTR DebugEntry ; global debugger entry point + APTR DebugData ; global debugger data segment + APTR AlertData ; alert data segment + APTR MaxExtMem ; top of extended mem, or null if none + + WORD ChkSum ; for all of the above (minus 2) + + +******* Interrupt Related ******************************************** + + LABEL IntVects + STRUCT IVTBE,IV_SIZE + STRUCT IVDSKBLK,IV_SIZE + STRUCT IVSOFTINT,IV_SIZE + STRUCT IVPORTS,IV_SIZE + STRUCT IVCOPER,IV_SIZE + STRUCT IVVERTB,IV_SIZE + STRUCT IVBLIT,IV_SIZE + STRUCT IVAUD0,IV_SIZE + STRUCT IVAUD1,IV_SIZE + STRUCT IVAUD2,IV_SIZE + STRUCT IVAUD3,IV_SIZE + STRUCT IVRBF,IV_SIZE + STRUCT IVDSKSYNC,IV_SIZE + STRUCT IVEXTER,IV_SIZE + STRUCT IVINTEN,IV_SIZE + STRUCT IVNMI,IV_SIZE + + +******* Dynamic System Variables ************************************* + + APTR ThisTask ; pointer to current task (readable) + + ULONG IdleCount ; idle counter + ULONG DispCount ; dispatch counter + UWORD Quantum ; time slice quantum + UWORD Elapsed ; current quantum ticks + UWORD SysFlags ; misc internal system flags + BYTE IDNestCnt ; interrupt disable nesting count + BYTE TDNestCnt ; task disable nesting count + + UWORD AttnFlags ; special attention flags (readable) + + UWORD AttnResched ; rescheduling attention + APTR ResModules ; pointer to resident module array + APTR TaskTrapCode ; default task trap routine + APTR TaskExceptCode ; default task exception code + APTR TaskExitCode ; default task exit code + ULONG TaskSigAlloc ; preallocated signal mask + UWORD TaskTrapAlloc ; preallocated trap mask + + +******* System List Headers (private!) ******************************** + + STRUCT MemList,LH_SIZE + STRUCT ResourceList,LH_SIZE + STRUCT DeviceList,LH_SIZE + STRUCT IntrList,LH_SIZE + STRUCT LibList,LH_SIZE + STRUCT PortList,LH_SIZE + STRUCT TaskReady,LH_SIZE + STRUCT TaskWait,LH_SIZE + + STRUCT SoftInts,SH_SIZE*5 + + +******* Other Globals ****************************************************** + + STRUCT LastAlert,4*4 + + ;------ these next two variables are provided to allow + ;------ system developers to have a rough idea of the + ;------ period of two externally controlled signals -- + ;------ the time between vertical blank interrupts and the + ;------ external line rate (which is counted by CIA A's + ;------ "time of day" clock). In general these values + ;------ will be 50 or 60, and may or may not track each + ;------ other. These values replace the obsolete AFB_PAL + ;------ and AFB_50HZ flags. + UBYTE VBlankFrequency ;(readable) + UBYTE PowerSupplyFrequency ;(readable) + + STRUCT SemaphoreList,LH_SIZE + + ;------ these next two are to be able to kickstart into user ram. + ;------ KickMemPtr holds a singly linked list of MemLists which + ;------ will be removed from the memory list via AllocAbs. If + ;------ all the AllocAbs's succeeded, then the KickTagPtr will + ;------ be added to the rom tag list. + APTR KickMemPtr ; ptr to queue of mem lists + APTR KickTagPtr ; ptr to rom tag queue + APTR KickCheckSum ; checksum for mem and tags + + +******* V36 Exec additions start here *************************************** + + UWORD ex_Pad0 ; Private internal use + ULONG ex_LaunchPoint ; Private to Launch/Switch + APTR ex_RamLibPrivate + ;* The next ULONG contains the system "E" clock frequency, + ;* expressed in Hertz. The E clock is used as a timebase for + ;* the Amiga's 8520 I/O chips. (E is connected to "02"). + ;* Typical values are 715909 for NTSC, or 709379 for PAL. + ;* + ULONG ex_EClockFrequency ;(readable) + ULONG ex_CacheControl ;Private to the CacheControl call + ULONG ex_TaskID ;Next available task ID + + STRUCT ex_Reserved1,5*4 + + APTR ex_MMULock ;Private + + STRUCT ex_Reserved2,3*4 + +******* V39 Exec additions start here *************************************** + + ;* The following list and data element are used for + ;* V39 exec's low memory handler. + STRUCT ex_MemHandlers,MLH_SIZE ;* List of handlers + APTR ex_MemHandler ;* Handler pointer (PRIVATE!) + + LABEL SYSBASESIZE + + +******* Bit defines for AttnFlags (see above) ******************************* + +* Processors and Co-processors: + BITDEF AF,68010,0 ; also set for 68020 + BITDEF AF,68020,1 ; also set for 68030 + BITDEF AF,68030,2 ; also set for 68040 + BITDEF AF,68040,3 + BITDEF AF,68881,4 ; also set for 68882 + BITDEF AF,68882,5 + BITDEF AF,FPU40,6 ; Set if 68040 FPU +; +; The AFB_FPU40 bit is set when a working 68040 FPU +; is in the system. If this bit is set and both the +; AFB_68881 and AFB_68882 bits are not set, then the 68040 +; math emulation code has not been loaded and only 68040 +; FPU instructions are available. This bit is valid *ONLY* +; if the AFB_68040 bit is set. +; +; BITDEF AF,RESERVED8,8 +; BITDEF AF,RESERVED9,9 + BITDEF AF,PRIVATE,15 ; Just what it says + + +******* Selected bit definitions for Cache manipulation calls ************** + + BITDEF CACR,EnableI,0 ;Enable instruction cache + BITDEF CACR,FreezeI,1 ;Freeze instruction cache + BITDEF CACR,ClearI,3 ;Clear instruction cache + BITDEF CACR,IBE,4 ;Instruction burst enable + BITDEF CACR,EnableD,8 ;68030 Enable data cache + BITDEF CACR,FreezeD,9 ;68030 Freeze data cache + BITDEF CACR,ClearD,11 ;68030 Clear data cache + BITDEF CACR,DBE,12 ;68030 Data burst enable + BITDEF CACR,WriteAllocate,13 ;68030 Write-Allocate mode (must + ;always be set) + BITDEF CACR,EnableE,30 ;Master enable for external caches + ;External caches should track the + ;state of the internal caches + ;such that they do not cache anything + ;that the internal cache turned off + ;for. + BITDEF CACR,CopyBack,31 ;Master enable for copyback caches + + + BITDEF DMA,Continue,1 ;Continuation flag for CachePreDMA + BITDEF DMA,NoModify,2 ;Set if DMA does not update memory + BITDEF DMA,ReadFromRAM,3 ;Set if DMA goes *FROM* RAM to device + + ENDC ; EXEC_EXECBASE_I diff --git a/extra/rtg_driver/include/exec/initializers.i b/extra/rtg_driver/include/exec/initializers.i new file mode 100644 index 00000000..df01fe28 --- /dev/null +++ b/extra/rtg_driver/include/exec/initializers.i @@ -0,0 +1,70 @@ + IFND EXEC_INITIALIZERS_I +EXEC_INITIALIZERS_I SET 1 +** +** $VER: initializers.i 39.0 (15.10.1991) +** Includes Release 45.1 +** +** Macros for creating InitStruct() tables +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + +INITBYTE MACRO ; &offset,&value + IFLE (\1)-255 ;If offset <=255 + DC.B $a0,\1 ;use byte offset + DC.B \2,0 + MEXIT ;exit early + ENDC + DC.B $e0,0 + DC.W \1 + DC.B \2,0 + ENDM + +INITWORD MACRO ; &offset,&value + IFLE (\1)-255 ;If offset <=255 + DC.B $90,\1 ;use byte offset + DC.W \2 + MEXIT ;exit early + ENDC + DC.B $d0,0 + DC.W \1 + DC.W \2 + ENDM + +INITLONG MACRO ; &offset,&value + IFLE (\1)-255 ;If offset <=255 + DC.B $80,\1 ;use byte offset + DC.L \2 + MEXIT ;exit early + ENDC + DC.B $c0,0 + DC.W \1 + DC.L \2 + ENDM + +;size=source size 0=long, 1=word, 2=byte, 3=illegal. +;offset=offset from memory base to put data +;value=unused +;count=number of source items to copy, minus one +;follow this macro with the proper sized data (dc.b,dc.w,dc.l,etc.) +INITSTRUCT MACRO ; &size,&offset,&value,&count + DS.W 0 + IFC '\4','' +COUNT\@ SET 0 + ENDC + IFNC '\4','' +COUNT\@ SET \4 + ENDC +CMD\@ SET (((\1)<<4)!COUNT\@) + IFLE (\2)-255 ;byte offset large enough? + DC.B (CMD\@)!$80 + DC.B \2 + MEXIT + ENDC + DC.B CMD\@!$0C0 ;byte too small, use 24-bit offset. + DC.B (((\2)>>16)&$0FF) + DC.W ((\2)&$0FFFF) + ENDM + + ENDC ; EXEC_INITIALIZERS_I diff --git a/extra/rtg_driver/include/exec/interrupts.i b/extra/rtg_driver/include/exec/interrupts.i new file mode 100644 index 00000000..d3a9aae5 --- /dev/null +++ b/extra/rtg_driver/include/exec/interrupts.i @@ -0,0 +1,70 @@ + IFND EXEC_INTERRUPTS_I +EXEC_INTERRUPTS_I SET 1 +** +** $VER: interrupts.i 39.0 (15.10.1991) +** Includes Release 45.1 +** +** Callback structures used by hardware & software interrupts +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_NODES_I + INCLUDE "exec/nodes.i" + ENDC ; EXEC_NODES_I + + IFND EXEC_LISTS_I + INCLUDE "exec/lists.i" + ENDC ; EXEC_LISTS_I + + +*---------------------------------------------------------------- +* +* Interrupt Structure +* +*---------------------------------------------------------------- + + STRUCTURE IS,LN_SIZE + APTR IS_DATA + APTR IS_CODE + LABEL IS_SIZE + + +*--------------------------------------------------------------------- +* +* Exec Internal Interrupt Vectors +* +*--------------------------------------------------------------------- + + STRUCTURE IV,0 + APTR IV_DATA + APTR IV_CODE + APTR IV_NODE + LABEL IV_SIZE + + +*------ System Flag bits (in SysBase.SysFlags ) + + BITDEF S,SAR,15 ; scheduling attention required (TOP BIT) + BITDEF S,TQE,14 ; time quantum expended -- time to resched + BITDEF S,SINT,13 + + +*--------------------------------------------------------------------- +* +* Software Interrupt List Headers +* +*--------------------------------------------------------------------- + + STRUCTURE SH,LH_SIZE + UWORD SH_PAD + LABEL SH_SIZE + +SIH_PRIMASK EQU $0F0 +SIH_QUEUES EQU 5 + +** this is a fake INT definition, used only for AddIntServer and the like + BITDEF INT,NMI,15 + + ENDC ; EXEC_INTERRUPTS_I diff --git a/extra/rtg_driver/include/exec/io.i b/extra/rtg_driver/include/exec/io.i new file mode 100644 index 00000000..81eb1371 --- /dev/null +++ b/extra/rtg_driver/include/exec/io.i @@ -0,0 +1,121 @@ + IFND EXEC_IO_I +EXEC_IO_I SET 1 +** +** $VER: io.i 39.0 (15.10.1991) +** Includes Release 45.1 +** +** Message structures used for device communication +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_PORTS_I + INCLUDE "exec/ports.i" + ENDC ; EXEC_PORTS_I + + IFND EXEC_LIBRARIES_I + INCLUDE "exec/libraries.i" + ENDC ; EXEC_LIBRARIES_I + + +;---------------------------------------------------------------- +; +; IO Request Structures +; +;---------------------------------------------------------------- + +;------ Required portion of IO request: + + STRUCTURE IO,MN_SIZE + APTR IO_DEVICE ; device node pointer + APTR IO_UNIT ; unit (driver private) + UWORD IO_COMMAND ; device command + UBYTE IO_FLAGS ; special flags + BYTE IO_ERROR ; error or warning code + LABEL IO_SIZE + + +;------ Standard IO request extension: + + ULONG IO_ACTUAL ; actual # of bytes transfered + ULONG IO_LENGTH ; requested # of bytes transfered + APTR IO_DATA ; pointer to data area + ULONG IO_OFFSET ; offset for seeking devices + LABEL IOSTD_SIZE + + +;------ IO_FLAGS bit definitions: + + BITDEF IO,QUICK,0 ; complete IO quickly + + +;---------------------------------------------------------------- +; +; Standard Device Library Functions +; +;---------------------------------------------------------------- + + LIBINIT + + LIBDEF DEV_BEGINIO ; process IO request + LIBDEF DEV_ABORTIO ; abort IO request + + +;---------------------------------------------------------------- +; +; IO Function Macros +; +;---------------------------------------------------------------- + +BEGINIO MACRO + LINKLIB DEV_BEGINIO,IO_DEVICE(A1) + ENDM + +ABORTIO MACRO + LINKLIB DEV_ABORTIO,IO_DEVICE(A1) + ENDM + + +;---------------------------------------------------------------- +; +; Standard Device Command Definitions +; +;---------------------------------------------------------------- + +;------ Command definition macro: +DEVINIT MACRO ; [baseOffset] + IFC '\1','' +CMD_COUNT SET CMD_NONSTD + ENDC + IFNC '\1','' +CMD_COUNT SET \1 + ENDC + ENDM + +DEVCMD MACRO ; cmdname +\1 EQU CMD_COUNT +CMD_COUNT SET CMD_COUNT+1 + ENDM + + +;------ Standard device commands: + + DEVINIT 0 + + DEVCMD CMD_INVALID ; invalid command + DEVCMD CMD_RESET ; reset as if just inited + DEVCMD CMD_READ ; standard read + DEVCMD CMD_WRITE ; standard write + DEVCMD CMD_UPDATE ; write out all buffers + DEVCMD CMD_CLEAR ; clear all buffers + DEVCMD CMD_STOP ; hold current and queued + DEVCMD CMD_START ; restart after stop + DEVCMD CMD_FLUSH ; abort entire queue + + +;------ First non-standard device command value: + + DEVCMD CMD_NONSTD + + ENDC ; EXEC_IO_I diff --git a/extra/rtg_driver/include/exec/libraries.i b/extra/rtg_driver/include/exec/libraries.i new file mode 100644 index 00000000..d5c71376 --- /dev/null +++ b/extra/rtg_driver/include/exec/libraries.i @@ -0,0 +1,128 @@ + IFND EXEC_LIBRARIES_I +EXEC_LIBRARIES_I SET 1 +** +** $VER: libraries.i 39.2 (10.4.1992) +** Includes Release 45.1 +** +** Definitions for use when creating or using Exec libraries +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_NODES_I + INCLUDE "exec/nodes.i" + ENDC ; EXEC_NODES_I + + +*------ Special Constants --------------------------------------- +LIB_VECTSIZE EQU 6 ;Each library entry takes 6 bytes +LIB_RESERVED EQU 4 ;Exec reserves the first 4 vectors +LIB_BASE EQU -LIB_VECTSIZE +LIB_USERDEF EQU LIB_BASE-(LIB_RESERVED*LIB_VECTSIZE) ;First user func +LIB_NONSTD EQU LIB_USERDEF + + +*---------------------------------------------------------------- +* +* Library Definition Macros (for creating libraries) +* +*---------------------------------------------------------------- + +*------ LIBINIT initializes the base offset for using the "LIBDEF" macro: +LIBINIT MACRO ; [baseOffset] + IFC '\1','' +COUNT_LIB SET LIB_USERDEF + ENDC + IFNC '\1','' +COUNT_LIB SET \1 + ENDC + ENDM + +*------ LIBDEF is used to define each library function entry: +LIBDEF MACRO ;libraryFunctionSymbol +\1 EQU COUNT_LIB +COUNT_LIB SET COUNT_LIB-LIB_VECTSIZE + ENDM + +*------ FUNCDEF is used to parse library offset tables. Many applications +*------ need a special version of FUNCDEF - you provide your own macro +*------ to match your needs. Here is an example: +* +* FUNCDEF MACRO +* _LVO\1 EQU FUNC_CNT +* FUNC_CNT SET FUNC_CNT-6 * Standard offset-6 bytes each +* FUNC_CNT EQU LIB_USERDEF * Skip 4 standard vectors +* ENDM + +*---------------------------------------------------------------- +* +* Standard Library Functions +* +*---------------------------------------------------------------- + + LIBINIT LIB_BASE + + LIBDEF LIB_OPEN + LIBDEF LIB_CLOSE + LIBDEF LIB_EXPUNGE ; must exist in all libraries + LIBDEF LIB_EXTFUNC ; for future expansion - must return zero. + + +*---------------------------------------------------------------- +* +* Library Base Structure Definition +* Also used for Devices and some Resources +* +*---------------------------------------------------------------- + + STRUCTURE LIB,LN_SIZE + UBYTE LIB_FLAGS ; see below + UBYTE LIB_pad ; must be zero + UWORD LIB_NEGSIZE ; number of bytes before LIB + UWORD LIB_POSSIZE ; number of bytes after LIB + UWORD LIB_VERSION ; major + UWORD LIB_REVISION ; minor + APTR LIB_IDSTRING ; ASCII identification + ULONG LIB_SUM ; the system-calculated checksum + UWORD LIB_OPENCNT ; number of current opens + LABEL LIB_SIZE ;Warning: Size is not a longword multiple! + +*------ LIB_FLAGS bit definitions (all others are system reserved) + BITDEF LIB,SUMMING,0 ; system is currently checksumming + BITDEF LIB,CHANGED,1 ; something has changed the library since last sum + BITDEF LIB,SUMUSED,2 ; indicates if the library allows checksumming + BITDEF LIB,DELEXP,3 ; delayed expunge flag (for use by library) + BITDEF LIB,EXP0CNT,4 ; special system expunge flag. + + +*--------------------------------------------------------------------------- +* +* Function Invocation Macros (for calling existing, opened, libraries) +* Also see exec/macros.i +* +*--------------------------------------------------------------------------- + +*------ CALLLIB for calling functions where A6 is already correct: + +CALLLIB MACRO ; functionOffset + IFGT NARG-1 + FAIL !!! CALLLIB MACRO - too many arguments !!! + ENDC + JSR \1(A6) + ENDM + + +*------ LINKLIB for calling functions where A6 is incorrect: + +LINKLIB MACRO ; functionOffset,libraryBase + IFGT NARG-2 + FAIL !!! LINKLIB MACRO - too many arguments !!! + ENDC + MOVE.L A6,-(SP) + MOVE.L \2,A6 + JSR \1(A6) + MOVE.L (SP)+,A6 + ENDM + + ENDC ; EXEC_LIBRARIES_I diff --git a/extra/rtg_driver/include/exec/lists.i b/extra/rtg_driver/include/exec/lists.i new file mode 100644 index 00000000..21c51fed --- /dev/null +++ b/extra/rtg_driver/include/exec/lists.i @@ -0,0 +1,172 @@ + IFND EXEC_LISTS_I +EXEC_LISTS_I SET 1 +** +** $VER: lists.i 39.1 (28.5.1992) +** Includes Release 45.1 +** +** Definitions and macros for use with Exec lists. Most of the +** macros require ownership or locking of the list before use. +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_NODES_I + INCLUDE "exec/nodes.i" + ENDC ; EXEC_NODES_I + + +*--------------------------------------------------------------------- + +* +* Full featured list header +* + STRUCTURE LH,0 + APTR LH_HEAD + APTR LH_TAIL + APTR LH_TAILPRED + UBYTE LH_TYPE + UBYTE LH_pad + LABEL LH_SIZE ;word aligned + +* +* Minimal List Header - no type checking (best for most applications) +* + STRUCTURE MLH,0 + APTR MLH_HEAD + APTR MLH_TAIL + APTR MLH_TAILPRED + LABEL MLH_SIZE ;longword aligned + +*--------------------------------------------------------------------- + +;Prepare a list header for use +NEWLIST MACRO ; list + MOVE.L \1,LH_TAILPRED(\1) + ADDQ.L #4,\1 ;Get address of LH_TAIL + CLR.L (\1) ;Clear LH_TAIL + MOVE.L \1,-(\1) ;Address of LH_TAIL to LH_HEAD + ENDM + +;Test if list is empty (list address in register) +;This operation is safe at any time - no list arbitration needed. +TSTLIST MACRO ; [list] + IFGT NARG-1 + FAIL !!! TSTLIST - Too many arguments !!! + ENDC + IFC '\1','' + CMP.L LH_TAIL+LN_PRED(A0),A0 + ENDC + IFNC '\1','' + CMP.L LH_TAIL+LN_PRED(\1),\1 + ENDC + ENDM + +;Test if list is empty (from effective address of list) +;list arbitration required. +TSTLST2 MACRO ;EA of list,=node + MOVE.L \1,\2 + TST.L (\2) + ENDM + +;Get next in list +SUCC MACRO ; node,=succ + MOVE.L (\1),\2 + ENDM + +;Get previous in list +PRED MACRO ; node,=pred + MOVE.L LN_PRED(\1),\2 + ENDM + +;If empty, branch +IFEMPTY MACRO ; list,label + CMP.L LH_TAIL+LN_PRED(\1),\1 + BEQ \2 + ENDM + +;If not empty, branch +IFNOTEMPTY MACRO ; list,label + CMP.L LH_TAIL+LN_PRED(\1),\1 + BNE \2 + ENDM + +;Get next node, test if at end +TSTNODE MACRO ; node,=next + MOVE.L (\1),\2 + TST.L (\2) + ENDM + +;Get next, go to exit label if at end +NEXTNODE MACRO ; next=next,=current,exit_label ([.s],DX,AX,DISP16) + MOVE.L \1,\2 + MOVE.L (\2),\1 + IFC '\0','' ;Check extension + BEQ \3 + ENDC + IFNC '\0','' + BEQ.S \3 + ENDC + ENDM + +;Add to head of list +ADDHEAD MACRO ; A0-list(destroyed) A1-node D0-(destroyed) + MOVE.L (A0),D0 + MOVE.L A1,(A0) + MOVEM.L D0/A0,(A1) + MOVE.L D0,A0 + MOVE.L A1,LN_PRED(A0) + ENDM + +;Add to tail of list +ADDTAIL MACRO ; A0-list(destroyed) A1-node D0-(destroyed) + ADDQ.L #LH_TAIL,A0 + MOVE.L LN_PRED(A0),D0 + MOVE.L A1,LN_PRED(A0) + EXG D0,A0 + MOVEM.L D0/A0,(A1) + MOVE.L A1,(A0) + ENDM + +;Remove node from whatever list it is in +REMOVE MACRO ; A0-(destroyed) A1-node(destroyed) + MOVE.L (A1)+,A0 + MOVE.L (A1),A1 ; LN_PRED + MOVE.L A0,(A1) + MOVE.L A1,LN_PRED(A0) + ENDM + +;Remove node from head of list +REMHEAD MACRO ; A0-list A1-(destroyed) D0=node + MOVE.L (A0),A1 + MOVE.L (A1),D0 + BEQ.S REMHEAD\@ + MOVE.L D0,(A0) + EXG.L D0,A1 + MOVE.L A0,LN_PRED(A1) +REMHEAD\@ + ENDM + +;Remove head quickly +; Useful when a scratch register is available, and +; list is known to contain at least one node. +REMHEADQ MACRO ; list,=node,scratchReg-(destroyed) + MOVE.L (\1),\2 + MOVE.L (\2),\3 + MOVE.L \3,(\1) + MOVE.L \1,LN_PRED(\3) + ENDM + +;Remove node from tail of list +REMTAIL MACRO ; A0-list A1-(destroyed) D0=node + MOVE.L LH_TAIL+LN_PRED(A0),A1 + MOVE.L LN_PRED(A1),D0 + BEQ.S REMTAIL\@ + MOVE.L D0,LH_TAIL+LN_PRED(A0) + EXG.L D0,A1 + MOVE.L A0,(A1) + ADDQ.L #4,(A1) +REMTAIL\@ + ENDM + + ENDC ; EXEC_LISTS_I diff --git a/extra/rtg_driver/include/exec/macros.i b/extra/rtg_driver/include/exec/macros.i new file mode 100644 index 00000000..81b481e9 --- /dev/null +++ b/extra/rtg_driver/include/exec/macros.i @@ -0,0 +1,154 @@ + IFND EXEC_MACROS_I +EXEC_MACROS_I SET 1 +** +** $VER: macros.i 39.0 (15.10.1991) +** Includes Release 45.1 +** +** Handy macros for assembly language programmers. +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND DEBUG_DETAIL +DEBUG_DETAIL SET 0 ;Detail level of debugging. Zero for none. + ENDC + + +JSRLIB MACRO ;FunctionName + XREF _LVO\1 + jsr _LVO\1(a6) + ENDM + +JMPLIB MACRO ;FunctionName + XREF _LVO\1 + jmp _LVO\1(a6) + ENDM + +BSRSELF MACRO + XREF \1 + bsr \1 + ENDM + +BRASELF MACRO + XREF \1 + bra \1 + ENDM + +BLINK MACRO + IFNE DEBUG_DETAIL + bchg.b #1,$bfe001 ;Toggle the power LED + ENDC + ENDM + +TRIGGER MACRO ; Trigger a hardware state analyzer + IFGE DEBUG_DETAIL-\1 + move.w #$5555,$2fe + ENDC + ENDM + +CLEAR MACRO + moveq.l #0,\1 + ENDM + +CLEARA MACRO + suba.l \1,\1 ;Quick way to put zero in an address register + ENDM + +************************************************************************* + IFND PRINTF +PRINTF MACRO ; level,,... + IFGE DEBUG_DETAIL-\1 + XREF kprint_macro +PUSHCOUNT SET 0 + + IFNC '\9','' + move.l \9,-(sp) +PUSHCOUNT SET PUSHCOUNT+4 + ENDC + + IFNC '\8','' + move.l \8,-(sp) +PUSHCOUNT SET PUSHCOUNT+4 + ENDC + + IFNC '\7','' + move.l \7,-(sp) +PUSHCOUNT SET PUSHCOUNT+4 + ENDC + + IFNC '\6','' + move.l \6,-(sp) +PUSHCOUNT SET PUSHCOUNT+4 + ENDC + + IFNC '\5','' + move.l \5,-(sp) +PUSHCOUNT SET PUSHCOUNT+4 + ENDC + + IFNC '\4','' + move.l \4,-(sp) +PUSHCOUNT SET PUSHCOUNT+4 + ENDC + + IFNC '\3','' + move.l \3,-(sp) +PUSHCOUNT SET PUSHCOUNT+4 + ENDC + + movem.l a0/a1,-(sp) + lea.l PSS\@(pc),A0 + lea.l 4*2(SP),A1 + BSR kprint_macro + movem.l (sp)+,a0/a1 + bra.s PSE\@ + +PSS\@ dc.b \2 + IFEQ (\1&1) ;If even, add CR/LF par... + dc.b 13,10 + ENDC + dc.b 0 + ds.w 0 +PSE\@ + lea.l PUSHCOUNT(sp),sp + ENDC ;IFGE DEBUG_DETAIL-\1 + ENDM ;PRINTF MACRO + ENDC ;IFND PRINTF + + +;---------------------------------------------------------------------------- +;Push a set of registers onto the stack - undo with POPM. This prevents +;the need to update or synchronize two MOVEM instructions. These macros +;assume an optimizing assembler that will convert single register MOVEM +;to MOVE. Because the REG assignment can't be reset, these macros do +;not nest. +; +; PUSHM d2/a2/a5 +; ...code... +; POPM +; RTS +; +PUSHM_COUNT SET 0 +PUSHM MACRO + IFGT NARG-1 + FAIL !!!! TOO MANY ARGUMENTS TO PUSHM !!!! + ENDC +PUSHM_COUNT SET PUSHM_COUNT+1 +PUSHM_\*VALOF(PUSHM_COUNT) REG \1 + movem.l PUSHM_\*VALOF(PUSHM_COUNT),-(sp) + ENDM + +; +;Undo most recent PUSHM. 'POPM NOBUMP' allows multiple exit points. +; +POPM MACRO + movem.l (sp)+,PUSHM_\*VALOF(PUSHM_COUNT) + IFNC '\1','NOBUMP' +PUSHM_COUNT SET PUSHM_COUNT+1 ;error if re-used + ENDC + ENDM +;---------------------------------------------------------------------------- + + + ENDC ; EXEC_MACROS_I diff --git a/extra/rtg_driver/include/exec/memory.i b/extra/rtg_driver/include/exec/memory.i new file mode 100644 index 00000000..d4d11d02 --- /dev/null +++ b/extra/rtg_driver/include/exec/memory.i @@ -0,0 +1,117 @@ + IFND EXEC_MEMORY_I +EXEC_MEMORY_I SET 1 +** +** $VER: memory.i 39.3 (20.5.1992) +** Includes Release 45.1 +** +** Definitions and structures used by the memory allocation system +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_NODES_I + INCLUDE "exec/nodes.i" + ENDC ; EXEC_NODES_I + + +*--------------------------------------------------------------------- +* +* Memory List Structures +* +*--------------------------------------------------------------------- +* +* A memory list appears in two forms: One is a requirements list +* the other is a list of already allocated memory. The format is +* the same, with the reqirements/address field occupying the same +* position. +* +* The format is a linked list of ML structures each of which has +* an array of ME entries. +* +*--------------------------------------------------------------------- + + STRUCTURE ML,LN_SIZE + UWORD ML_NUMENTRIES ; The number of ME structures that follow + LABEL ML_ME ; where the ME structures begin + LABEL ML_SIZE ;Note: does NOT include any "ME" structures. + + + STRUCTURE ME,0 + LABEL ME_REQS ; the AllocMem requirements + APTR ME_ADDR ; the address of this block (an alias + ; for the same location as ME_REQS) + ULONG ME_LENGTH ; the length of this region + LABEL ME_SIZE + + +*------ memory options: +*------ see the AllocMem() documentation for details------* + +MEMF_ANY EQU 0 ;Any type of memory will do + BITDEF MEM,PUBLIC,0 + BITDEF MEM,CHIP,1 + BITDEF MEM,FAST,2 + BITDEF MEM,LOCAL,8 ;Memory that does not go away at RESET + BITDEF MEM,24BITDMA,9 ;DMAable memory within 24 bits of address + BITDEF MEM,KICK,10 ;Memory that can be used for KickTag stuff + + BITDEF MEM,CLEAR,16 ;AllocMem: NULL out area before return + BITDEF MEM,LARGEST,17 ;AvailMem: return the largest chunk size + BITDEF MEM,REVERSE,18 ;AllocMem: allocate from the top down + BITDEF MEM,TOTAL,19 ;AvailMem: return total size of memory + + BITDEF MEM,NO_EXPUNGE,31 ;AllocMem: Do not cause expunge on failure + +*----- Current alignment rules for memory blocks (may increase) ----- +MEM_BLOCKSIZE EQU 8 +MEM_BLOCKMASK EQU (MEM_BLOCKSIZE-1) + + +*--------------------------------------------------------------------- +* +* Low memory handler data structure +* +* Note: This structure is *READ ONLY* and only EXEC can create it! +*--------------------------------------------------------------------- + STRUCTURE MemHandlerData,0 + ULONG memh_RequestSize ; Requested allocation size + ULONG memh_RequestFlags ; Requested allocation flags + ULONG memh_Flags ; Flags (see blow) + LABEL memh_SIZEOF + +* Flag definitions: + BITDEF MEMH,RECYCLE,0 ; 0==First time, 1==recycle + +*------ Low Memory handler return values +MEM_DID_NOTHING EQU 0 ; Nothing we could do... +MEM_ALL_DONE EQU -1 ; We did all we could do +MEM_TRY_AGAIN EQU 1 ; We did some, try the allocation again + +*--------------------------------------------------------------------- +* +* Memory Region Header +* +*--------------------------------------------------------------------- + + STRUCTURE MH,LN_SIZE ; (LN_TYPE will be set to NT_MEMORY) + UWORD MH_ATTRIBUTES ; characteristics of this region + APTR MH_FIRST ; first free region + APTR MH_LOWER ; lower memory bound + APTR MH_UPPER ; upper memory bound+1 + ULONG MH_FREE ; number of free bytes + LABEL MH_SIZE + + +*--------------------------------------------------------------------- +* +* Memory Chunk +* +*--------------------------------------------------------------------- + + STRUCTURE MC,0 + APTR MC_NEXT ; ptr to next chunk + ULONG MC_BYTES ; chunk byte size + APTR MC_SIZE + + ENDC ; EXEC_MEMORY_I diff --git a/extra/rtg_driver/include/exec/nodes.i b/extra/rtg_driver/include/exec/nodes.i new file mode 100644 index 00000000..2b7966f3 --- /dev/null +++ b/extra/rtg_driver/include/exec/nodes.i @@ -0,0 +1,67 @@ + IFND EXEC_NODES_I +EXEC_NODES_I SET 1 +** +** $VER: nodes.i 39.0 (15.10.1991) +** Includes Release 45.1 +** +** Nodes & Node type identifiers. +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC ; EXEC_TYPES_I + + +* +* List Node Structure. Each member in a list starts with a Node +* + STRUCTURE LN,0 ; List Node + APTR LN_SUCC ; Pointer to next (successor) + APTR LN_PRED ; Pointer to previous (predecessor) + UBYTE LN_TYPE + BYTE LN_PRI ; Priority, for sorting + APTR LN_NAME ; ID string, null terminated + LABEL LN_SIZE ; Note: word aligned + +; minimal node -- no type checking possible + STRUCTURE MLN,0 ; Minimal List Node + APTR MLN_SUCC + APTR MLN_PRED + LABEL MLN_SIZE + + +** +** Note: Newly initialized IORequests, and software interrupt structures +** used with Cause(), should have type NT_UNKNOWN. The OS will assign a type +** when they are first used. +** +;------ Node Types for LN_TYPE + +NT_UNKNOWN EQU 0 +NT_TASK EQU 1 ; Exec task +NT_INTERRUPT EQU 2 +NT_DEVICE EQU 3 +NT_MSGPORT EQU 4 +NT_MESSAGE EQU 5 ; Indicates message currently pending +NT_FREEMSG EQU 6 +NT_REPLYMSG EQU 7 ; Message has been replied +NT_RESOURCE EQU 8 +NT_LIBRARY EQU 9 +NT_MEMORY EQU 10 +NT_SOFTINT EQU 11 ; Internal flag used by SoftInts +NT_FONT EQU 12 +NT_PROCESS EQU 13 ; AmigaDOS Process +NT_SEMAPHORE EQU 14 +NT_SIGNALSEM EQU 15 ; signal semaphores +NT_BOOTNODE EQU 16 +NT_KICKMEM EQU 17 +NT_GRAPHICS EQU 18 +NT_DEATHMESSAGE EQU 19 + +NT_USER EQU 254 ; User node types work down from here +NT_EXTENDED EQU 255 + + ENDC ;EXEC_NODES_I diff --git a/extra/rtg_driver/include/exec/ports.i b/extra/rtg_driver/include/exec/ports.i new file mode 100644 index 00000000..427f7a68 --- /dev/null +++ b/extra/rtg_driver/include/exec/ports.i @@ -0,0 +1,59 @@ + IFND EXEC_PORTS_I +EXEC_PORTS_I SET 1 +** +** $VER: ports.i 39.0 (15.10.1991) +** Includes Release 45.1 +** +** Message ports and Messages. +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_NODES_I + INCLUDE "exec/nodes.i" + ENDC ; EXEC_NODES_I + + IFND EXEC_LISTS_I + INCLUDE "exec/lists.i" + ENDC ; EXEC_LISTS_I + + +*---------------------------------------------------------------- +* +* Message Port Structure +* +*---------------------------------------------------------------- + + STRUCTURE MP,LN_SIZE + UBYTE MP_FLAGS + UBYTE MP_SIGBIT ; signal bit number + APTR MP_SIGTASK ; object to be signalled + STRUCT MP_MSGLIST,LH_SIZE ; message linked list + LABEL MP_SIZE + + +*------ unions: +MP_SOFTINT EQU MP_SIGTASK + + +*------ MP_FLAGS: Port arrival actions (PutMsg) +PF_ACTION EQU 3 ; Mask +PA_SIGNAL EQU 0 ; Signal task in MP_SIGTASK +PA_SOFTINT EQU 1 ; Signal SoftInt in MP_SOFTINT/MP_SIGTASK +PA_IGNORE EQU 2 ; Ignore arrival + + +*---------------------------------------------------------------- +* +* Message Structure +* +*---------------------------------------------------------------- + + STRUCTURE MN,LN_SIZE + APTR MN_REPLYPORT ; message reply port + UWORD MN_LENGTH ; total message length in bytes + ; (include MN_SIZE in the length) + LABEL MN_SIZE + + ENDC ; EXEC_PORTS_I diff --git a/extra/rtg_driver/include/exec/resident.i b/extra/rtg_driver/include/exec/resident.i new file mode 100644 index 00000000..f97b8bc1 --- /dev/null +++ b/extra/rtg_driver/include/exec/resident.i @@ -0,0 +1,55 @@ + IFND EXEC_RESIDENT_I +EXEC_RESIDENT_I SET 1 +** +** $VER: resident.i 39.0 (15.10.1991) +** Includes Release 45.1 +** +** Resident/ROMTag stuff. Used to identify and initialize code modules. +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC ; EXEC_TYPES_I + + +*---------------------------------------------------------------- +* +* Resident Module Tag +* +*---------------------------------------------------------------- + + STRUCTURE RT,0 + UWORD RT_MATCHWORD ; word to match on (ILLEGAL) + APTR RT_MATCHTAG ; pointer to the above (RT_MATCHWORD) + APTR RT_ENDSKIP ; address to continue scan + UBYTE RT_FLAGS ; various tag flags + UBYTE RT_VERSION ; release version number + UBYTE RT_TYPE ; type of module (NT_XXXXXX) + BYTE RT_PRI ; initialization priority + APTR RT_NAME ; pointer to node name + APTR RT_IDSTRING ; pointer to identification string + APTR RT_INIT ; pointer to init code + LABEL RT_SIZE + + +;------ Match word definition: + +RTC_MATCHWORD EQU $4AFC ; The 68000 "ILLEGAL" instruction + + +;------ RT_FLAGS bit and field definitions: + + BITDEF RT,COLDSTART,0 + BITDEF RT,SINGLETASK,1 + BITDEF RT,AFTERDOS,2 + BITDEF RT,AUTOINIT,7 ; RT_INIT points to data structure + +; Compatibility: (obsolete) +;RTM_WHEN EQU 1 ; field position in RT_FLAGS +RTW_NEVER EQU 0 ; never ever init +RTW_COLDSTART EQU 1 ; init at coldstart time + + ENDC ; EXEC_RESIDENT_I diff --git a/extra/rtg_driver/include/exec/semaphores.i b/extra/rtg_driver/include/exec/semaphores.i new file mode 100644 index 00000000..351e0b9d --- /dev/null +++ b/extra/rtg_driver/include/exec/semaphores.i @@ -0,0 +1,68 @@ + IFND EXEC_SEMAPHORES_I +EXEC_SEMAPHORES_I SET 1 +** +** $VER: semaphores.i 39.1 (7.2.1992) +** Includes Release 45.1 +** +** Definitions for locking functions. +** +** (C) Copyright 1986-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_NODES_I + INCLUDE "exec/nodes.i" + ENDC ; EXEC_NODES_I + + IFND EXEC_LISTS_I + INCLUDE "exec/lists.i" + ENDC ; EXEC_LISTS_I + + IFND EXEC_PORTS_I + INCLUDE "exec/ports.i" + ENDC ; EXEC_PORTS_I + + +*---------------------------------------------------------------- +* +* Signal Semaphore Structure +* +*---------------------------------------------------------------- + +** Private structure used by ObtainSemaphore() + STRUCTURE SSR,MLN_SIZE + APTR SSR_WAITER + LABEL SSR_SIZE + +** Signal Semaphore data structure + STRUCTURE SS,LN_SIZE + WORD SS_NESTCOUNT + STRUCT SS_WAITQUEUE,MLH_SIZE + STRUCT SS_MULTIPLELINK,SSR_SIZE + APTR SS_OWNER + WORD SS_QUEUECOUNT + LABEL SS_SIZE + +** Semaphore procure message (for use in V39 Procure/Vacate ****/ + STRUCTURE SemaphoreMessage,MN_SIZE + APTR SSM_SEMAPHORE + LABEL SSM_SIZEOF + + +*---------------------------------------------------------------- +* +* Semaphore Structure (Old Procure/Vacate type, not reliable) +* +*---------------------------------------------------------------- + + + STRUCTURE SM,MP_SIZE ; Do not use these semaphores! + WORD SM_BIDS ; number of bids for lock + LABEL SM_SIZE + +*------ unions: + +SM_LOCKMSG EQU MP_SIGTASK + + + ENDC ; EXEC_SEMAPHORES_I diff --git a/extra/rtg_driver/include/exec/strings.i b/extra/rtg_driver/include/exec/strings.i new file mode 100644 index 00000000..4dfadf4b --- /dev/null +++ b/extra/rtg_driver/include/exec/strings.i @@ -0,0 +1,59 @@ + IFND EXEC_STRINGS_I +EXEC_STRINGS_I SET 1 +** +** $VER: strings.i 39.0 (15.10.1991) +** Includes Release 45.1 +** +** Macros for defining old style CR/LF terminated string constants +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + +*------ Terminal Control: + +EOS EQU 0 +BELL EQU 7 +LF EQU 10 +CR EQU 13 +BS EQU 8 +DEL EQU $7F +NL EQU LF + + +*---------------------------------------------------------------- +* +* String Support Macros +* +*---------------------------------------------------------------- + +STRING MACRO + dc.b \1 + dc.b 0 + CNOP 0,2 + ENDM + + +STRINGL MACRO + dc.b 13,10 + dc.b \1 + dc.b 0 + CNOP 0,2 + ENDM + + +STRINGR MACRO + dc.b \1 + dc.b 13,10,0 + CNOP 0,2 + ENDM + + +STRINGLR MACRO + dc.b 13,10 + dc.b \1 + dc.b 13,10,0 + CNOP 0,2 + ENDM + + ENDC ; EXEC_STRINGS_I diff --git a/extra/rtg_driver/include/exec/tasks.i b/extra/rtg_driver/include/exec/tasks.i new file mode 100644 index 00000000..a3642422 --- /dev/null +++ b/extra/rtg_driver/include/exec/tasks.i @@ -0,0 +1,129 @@ + IFND EXEC_TASKS_I +EXEC_TASKS_I SET 1 +** +** $VER: tasks.i 39.1 (18.9.1992) +** Includes Release 45.1 +** +** Task Control Block, Signals, and Task flags. +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_NODES_I + INCLUDE "exec/nodes.i" + ENDC ; EXEC_NODES_I + + IFND EXEC_LISTS_I + INCLUDE "exec/lists.i" + ENDC ; EXEC_LISTS_I + + IFND EXEC_PORTS_I + INCLUDE "exec/ports.i" + ENDC ; EXEC_PORTS_I + + +*---------------------------------------------------------------- +* +* Task Control Structure +* +* Please use Exec functions to modify task structure fields, +* where available. +* +*---------------------------------------------------------------- + + STRUCTURE TC_Struct,LN_SIZE ; was "TC" + UBYTE TC_FLAGS + UBYTE TC_STATE + BYTE TC_IDNESTCNT ; intr disabled nesting + BYTE TC_TDNESTCNT ; task disabled nesting + ULONG TC_SIGALLOC ; sigs allocated + ULONG TC_SIGWAIT ; sigs we are waiting for + ULONG TC_SIGRECVD ; sigs we have received + ULONG TC_SIGEXCEPT ; sigs we take as exceptions + ;* Pointer to an extended task structure. This structure is allocated + ;* by V36 Exec if the proper flags in tc_ETaskFlags are set. This + ;* field was formerly defined as: + ;* UWORD TC_TRAPALLOC ; traps allocated + ;* UWORD TC_TRAPABLE ; traps enabled + ;* Please see the Exec AllocTrap() and FreeTrap() calls. + ;* + APTR tc_ETask ; pointer to extended task structure + APTR TC_EXCEPTDATA ; data for except proc + APTR TC_EXCEPTCODE ; exception procedure + APTR TC_TRAPDATA ; data for proc trap proc + APTR TC_TRAPCODE ; proc trap procedure + APTR TC_SPREG ; stack pointer + APTR TC_SPLOWER ; stack lower bound + APTR TC_SPUPPER ; stack upper bound + 2 + FPTR TC_SWITCH ; task losing CPU (function pointer) + FPTR TC_LAUNCH ; task getting CPU (function pointer) + STRUCT TC_MEMENTRY,LH_SIZE ; Allocated memory list. Freed by RemTask() + APTR TC_Userdata ; For use by the task; no restrictions! + LABEL TC_SIZE + + +;Don't even _think_ about allocating one of these yourself. + STRUCTURE ETask,MN_SIZE + APTR et_Parent ;Pointer to task (TC) + ULONG et_UniqueID ;ID unique to this task + STRUCT et_Children,MLH_SIZE ;List of children + UWORD et_TRAPALLOC + UWORD et_TRAPABLE + ULONG et_Result1 ;First result + APTR et_Result2 ;Result data pointer (AllocVec) + STRUCT et_TaskMsgPort,MP_SIZE + LABEL ETask_SIZEOF ;_never_ depend on this size! + + +CHILD_NOTNEW EQU 1 ;function not called from a new style task +CHILD_NOTFOUND EQU 2 ;child not found +CHILD_EXITED EQU 3 ;child has exited +CHILD_ACTIVE EQU 4 ;child has exited + + +;Stack swap structure as passed to StackSwap() +; + STRUCTURE StackSwapStruct,0 + APTR stk_Lower ;Lowest byte of stack + ULONG stk_Upper ;Upper end of stack (size + Lowest) + APTR stk_Pointer ;Stack pointer at switch point + LABEL StackSwapStruct_SIZEOF + + +;------ TC_FLAGS Bits: + + BITDEF T,PROCTIME,0 + BITDEF T,ETASK,3 + BITDEF T,STACKCHK,4 + BITDEF T,EXCEPT,5 + BITDEF T,SWITCH,6 ;Enable TC_SWITCH point + BITDEF T,LAUNCH,7 ;Enable TC_LAUNCH point + + +;------ Task States: + +TS_INVALID EQU 0 +TS_ADDED EQU TS_INVALID+1 +TS_RUN EQU TS_ADDED+1 +TS_READY EQU TS_RUN+1 +TS_WAIT EQU TS_READY+1 +TS_EXCEPT EQU TS_WAIT+1 +TS_REMOVED EQU TS_EXCEPT+1 + + +;------ System Task Signals: + + BITDEF SIG,ABORT,0 + BITDEF SIG,CHILD,1 + BITDEF SIG,BLIT,4 ; Note: same as SINGLE + BITDEF SIG,SINGLE,4 ; "single-threaded". Note: same as BLIT + BITDEF SIG,INTUITION,5 + BITDEF SIG,NET,7 + BITDEF SIG,DOS,8 + + +SYS_SIGALLOC EQU $0FFFF ; pre-allocated signals +SYS_TRAPALLOC EQU $08000 ; pre-allocated traps + + ENDC ; EXEC_TASKS_I diff --git a/extra/rtg_driver/include/exec/types.i b/extra/rtg_driver/include/exec/types.i new file mode 100644 index 00000000..52e02462 --- /dev/null +++ b/extra/rtg_driver/include/exec/types.i @@ -0,0 +1,168 @@ + IFND EXEC_TYPES_I +EXEC_TYPES_I SET 1 +** +** $VER: types.i 39.1 (24.2.1993) +** Includes Release 45.1 +** +** Data storage macros. Must be included before any other Amiga include. +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + +INCLUDE_VERSION EQU 40 ;Version of the include files in use. (Do not + ;use this label for OpenLibrary() calls!) + + +EXTERN_LIB MACRO + XREF _LVO\1 + ENDM + +** +** Structure Building Macros +** +STRUCTURE MACRO ; structure name, initial offset +\1 EQU 0 +SOFFSET SET \2 + ENDM + +FPTR MACRO ; function pointer (32 bits - all bits valid) +\1 EQU SOFFSET +SOFFSET SET SOFFSET+4 + ENDM + +BOOL MACRO ; boolean (16 bits) +\1 EQU SOFFSET +SOFFSET SET SOFFSET+2 + ENDM + +BYTE MACRO ; byte (8 bits) +\1 EQU SOFFSET +SOFFSET SET SOFFSET+1 + ENDM + +UBYTE MACRO ; unsigned byte (8 bits) +\1 EQU SOFFSET +SOFFSET SET SOFFSET+1 + ENDM + +WORD MACRO ; word (16 bits) +\1 EQU SOFFSET +SOFFSET SET SOFFSET+2 + ENDM + +UWORD MACRO ; unsigned word (16 bits) +\1 EQU SOFFSET +SOFFSET SET SOFFSET+2 + ENDM + +SHORT MACRO ; obsolete - use WORD +\1 EQU SOFFSET +SOFFSET SET SOFFSET+2 + ENDM + +USHORT MACRO ; obsolete - use UWORD +\1 EQU SOFFSET +SOFFSET SET SOFFSET+2 + ENDM + +LONG MACRO ; long (32 bits) +\1 EQU SOFFSET +SOFFSET SET SOFFSET+4 + ENDM + +ULONG MACRO ; unsigned long (32 bits) +\1 EQU SOFFSET +SOFFSET SET SOFFSET+4 + ENDM + +FLOAT MACRO ; C float (32 bits) +\1 EQU SOFFSET +SOFFSET SET SOFFSET+4 + ENDM + +DOUBLE MACRO ; C double (64 bits) +\1 EQU SOFFSET +SOFFSET SET SOFFSET+8 + ENDM + +APTR MACRO ; untyped pointer (32 bits - all bits valid) +\1 EQU SOFFSET +SOFFSET SET SOFFSET+4 + ENDM + +CPTR MACRO ; obsolete +\1 EQU SOFFSET +SOFFSET SET SOFFSET+4 + ENDM + +RPTR MACRO ; unsigned relative pointer (16 bits) +\1 EQU SOFFSET +SOFFSET SET SOFFSET+2 + ENDM + +LABEL MACRO ; Define a label without bumping the offset +\1 EQU SOFFSET + ENDM + +STRUCT MACRO ; Define a sub-structure +\1 EQU SOFFSET +SOFFSET SET SOFFSET+\2 + ENDM + +ALIGNWORD MACRO ; Align structure offset to nearest word +SOFFSET SET (SOFFSET+1)&$fffffffe + ENDM + +ALIGNLONG MACRO ; Align structure offset to nearest longword +SOFFSET SET (SOFFSET+3)&$fffffffc + ENDM + +** +** Enumerated variables. Use ENUM to set a base number, and EITEM to assign +** incrementing values. ENUM can be used to set a new base at any time. +** +ENUM MACRO ;[new base] + IFC '\1','' +EOFFSET SET 0 ; Default to zero + ENDC + IFNC '\1','' +EOFFSET SET \1 + ENDC + ENDM + +EITEM MACRO ;label +\1 EQU EOFFSET +EOFFSET SET EOFFSET+1 + ENDM + +** +** Bit Definition Macro +** +** Given: +** BITDEF MEM,CLEAR,16 +** +** Yields: +** MEMB_CLEAR EQU 16 ; Bit number +** MEMF_CLEAR EQU 1<<16 ; Bit mask +** + +BITDEF MACRO ; prefix,&name,&bitnum + BITDEF0 \1,\2,B_,\3 +\@BITDEF SET 1<<\3 + BITDEF0 \1,\2,F_,\@BITDEF + ENDM + +BITDEF0 MACRO ; prefix,&name,&type,&value +\1\3\2 EQU \4 + ENDM + +** +** LIBRARY_VERSION is now obsolete. Please use LIBRARY_MINIMUM or code +** the specific minimum library version you require. +** LIBRARY_VERSION EQU 36 +** +LIBRARY_MINIMUM EQU 33 ;Lowest version supported + + ENDC ; EXEC_TYPES_I diff --git a/extra/rtg_driver/include/graphics/clip.i b/extra/rtg_driver/include/graphics/clip.i new file mode 100644 index 00000000..96a38ec0 --- /dev/null +++ b/extra/rtg_driver/include/graphics/clip.i @@ -0,0 +1,93 @@ + IFND GRAPHICS_CLIP_I +GRAPHICS_CLIP_I SET 1 +** +** $VER: clip.i 39.0 (2.12.1991) +** Includes Release 45.1 +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + include 'exec/types.i' + ENDC + + IFND GRAPHICS_GFX_I + include "graphics/gfx.i" + ENDC + + IFND EXEC_SEMAPHORES_I + include "exec/semaphores.i" + ENDC + +NEWLOCKS equ 1 + + STRUCTURE Layer,0 + LONG lr_front + LONG lr_back + LONG lr_ClipRect + LONG lr_rp + WORD lr_MinX + WORD lr_MinY + WORD lr_MaxX + WORD lr_MaxY + STRUCT lr_reserved,4 + WORD lr_priority + WORD lr_Flags + LONG lr_SuperBitMap + LONG lr_SuperClipRect + APTR lr_Window + WORD lr_Scroll_X + WORD lr_Scroll_Y + APTR lr_cr + APTR lr_cr2 + APTR lr_crnew + APTR lr_SuperSaverClipRects + APTR lr__cliprects + APTR lr_LayerInfo +* just by lucky coincidence +* this is not confused with simplesprites + STRUCT lr_Lock,SS_SIZE + APTR lr_BackFill + ULONG lr_reserved1 + APTR lr_ClipRegion + APTR lr_saveClipRects + STRUCT lr_reserved2,22 + APTR lr_DamageList + LABEL lr_SIZEOF + + STRUCTURE ClipRect,0 + LONG cr_Next * Point to next cliprect + LONG cr_prev * Layers private use!!! + LONG cr_lobs * Layers private use!!! + LONG cr_BitMap * Bitmap for this cliprect (system private!!!) + WORD cr_MinX * Bounds of the cliprect + WORD cr_MinY * " + WORD cr_MaxX * " + WORD cr_MaxY * " + APTR cr__p1 * Layers private use!!! + APTR cr__p2 * Layers private use!!! + LONG cr_reserved * Layers private use!!! + LONG cr_Flags * Layers private use!!! + LABEL cr_SIZEOF + +* internal cliprect flags +CR_NEEDS_NO_CONCEALED_RASTERS equ 1 +CR_NEEDS_NO_LAYERBLIT_DAMAGE equ 2 + +* defines for clipping +ISLESSX equ 1 +ISLESSY equ 2 +ISGRTRX equ 4 +ISGRTRY equ 8 + +* for ancient history reasons + IFND lr_Front +lr_Front equ lr_front +lr_Back equ lr_back +lr_RastPort equ lr_rp +cr_Prev equ cr_prev +cr_LObs equ cr_lobs + ENDC + + ENDC ; GRAPHICS_CLIP_I diff --git a/extra/rtg_driver/include/graphics/coerce.i b/extra/rtg_driver/include/graphics/coerce.i new file mode 100644 index 00000000..a35d1931 --- /dev/null +++ b/extra/rtg_driver/include/graphics/coerce.i @@ -0,0 +1,19 @@ + IFND GRAPHICS_COERCE_I +** +** $VER: coerce.i 39.3 (15.2.1993) +** Includes Release 45.1 +** +** mode coercion definitions +** +** (C) Copyright 1992-2001 Amiga, Inc. +** All Rights Reserved +** + +GRAPHICS_COERCE_I SET 1 + +PRESERVE_COLORS EQU 1 +AVOID_FLICKER EQU 2 +IGNORE_MCOMPAT EQU 4 + + ENDC + diff --git a/extra/rtg_driver/include/graphics/copper.i b/extra/rtg_driver/include/graphics/copper.i new file mode 100644 index 00000000..81af18ee --- /dev/null +++ b/extra/rtg_driver/include/graphics/copper.i @@ -0,0 +1,92 @@ + IFND GRAPHICS_COPPER_I +GRAPHICS_COPPER_I SET 1 +** +** $VER: copper.i 39.14 (11.8.1993) +** Includes Release 45.1 +** +** graphics copper list intruction definitions +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + include 'exec/types.i' + ENDC + +COPPER_MOVE equ 0 * pseude opcode for move #XXXX,dir +COPPER_WAIT equ 1 * pseudo opcode for wait y,x +CPRNXTBUF equ 2 * continue processing with next buffer +CPR_NT_LOF equ $8000 * copper instruction only for short frames +CPR_NT_SHT equ $4000 * copper instruction only for long frames +CPR_NT_SYS equ $2000 * copper user instruction only + + STRUCTURE CopIns,0 + WORD ci_OpCode * 0 = move, 1 = wait + STRUCT ci_nxtlist,0 * UNION + STRUCT ci_VWaitPos,0 + STRUCT ci_DestAddr,2 + + STRUCT ci_HWaitPos,0 + STRUCT ci_DestData,2 + + LABEL ci_SIZEOF + +* structure of cprlist that points to list that hardware actually executes + STRUCTURE cprlist,0 + APTR crl_Next + APTR crl_start + WORD crl_MaxCount + LABEL crl_SIZEOF + + STRUCTURE CopList,0 + APTR cl_Next * next block for this copper list + APTR cl__CopList * system use + APTR cl__ViewPort * system use + APTR cl_CopIns * start of this block + APTR cl_CopPtr * intermediate ptr + APTR cl_CopLStart * mrgcop fills this in for Long Frame + APTR cl_CopSStart * mrgcop fills this in for Short Frame + WORD cl_Count * intermediate counter + WORD cl_MaxCount * max # of copins for this block + WORD cl_DyOffset * offset this copper list vertical waits + IFD V1_3 + APTR cl_Cop2Start + APTR cl_Cop3Start + APTR cl_Cop4Start + APTR cl_Cop5Start + ENDC + WORD cl_SLRepeat + WORD cl_PrivateFlags ; NB - this was cl_Flags, but has been + ; changed to avoid conflict with intuition's + ; IClass structure. This field is private + ; anyway, and no one should be affected. + LABEL cl_SIZEOF + +EXACT_LINE EQU 1 +HALF_LINE EQU 2 + + STRUCTURE UCopList,0 + APTR ucl_Next + APTR ucl_FirstCopList * head node of this copper list + APTR ucl_CopList * node in use + LABEL ucl_SIZEOF + +* private graphics data structure +* hands off! + STRUCTURE copinit,0 + STRUCT copinit_vsync_hblank,4 + STRUCT copinit_diagstrt,24 + STRUCT copinit_fm0,4 + STRUCT copinit_diwstart,20 + STRUCT copinit_bplcon2,4 + STRUCT copinit_sprfix,8*2*2 + STRUCT copinit_sprstrtup,2*(2*8*2) + STRUCT copinit_wait14,2*2 + STRUCT copinit_norm_hblank,2*2 + STRUCT copinit_jump,2*2 + STRUCT copinit_wait_forever,6*2 + STRUCT copinit_sprstop,8*2 + LABEL copinit_SIZEOF + + ENDC ; GRAPHICS_COPPER_I diff --git a/extra/rtg_driver/include/graphics/display.i b/extra/rtg_driver/include/graphics/display.i new file mode 100644 index 00000000..becb8af9 --- /dev/null +++ b/extra/rtg_driver/include/graphics/display.i @@ -0,0 +1,40 @@ + IFND GRAPHICS_DISPLAY_I +GRAPHICS_DISPLAY_I SET 1 +** +** $VER: display.i 39.0 (21.8.1991) +** Includes Release 45.1 +** +** include define file for display control registers +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + +* bplcon0 defines +MODE_640 equ $8000 +PLNCNTMSK equ $7 * how many bit planes? +* * 0 = none, 1->6 = 1->6, 7 = reserved +PLNCNTSHFT equ 12 * bits to shift for bplcon0 +PF2PRI equ $40 * bplcon2 bit +COLORON equ $0200 * disable color burst +DBLPF equ $400 +HOLDNMODIFY equ $800 +INTERLACE equ 4 * interlace mode for 400 + +* bplcon1 defines +PFA_FINE_SCROLL equ $F +PFB_FINE_SCROLL_SHIFT equ 4 +PF_FINE_SCROLL_MASK equ $F + +* display window start and stop defines +DIW_HORIZ_POS equ $7F * horizontal start/stop +DIW_VRTCL_POS equ $1FF * vertical start/stop +DIW_VRTCL_POS_SHIFT equ 7 + +* Data fetch start/stop horizontal position +DFTCH_MASK equ $FF + +* vposr bits +VPOSRLOF equ $8000 + + ENDC ; GRAPHICS_DISPLAY_I diff --git a/extra/rtg_driver/include/graphics/displayinfo.i b/extra/rtg_driver/include/graphics/displayinfo.i new file mode 100644 index 00000000..0f930dd2 --- /dev/null +++ b/extra/rtg_driver/include/graphics/displayinfo.i @@ -0,0 +1,161 @@ + IFND GRAPHICS_DISPLAYINFO_I +GRAPHICS_DISPLAYINFO_I SET 1 +** +** $VER: displayinfo.i 39.15 (31.5.1993) +** Includes Release 45.1 +** +** include define file for display control registers +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + include 'exec/types.i' + ENDC + + IFND GRAPHICS_GFX_I + include 'graphics/gfx.i' + ENDC + + +* 'graphics/modeid.i' is included at the end of the file. + + IFND UTILITY_TAGITEM_I + include 'utility/tagitem.i' + ENDC + +* datachunk type identifiers + +DTAG_DISP equ $80000000 +DTAG_DIMS equ $80001000 +DTAG_MNTR equ $80002000 +DTAG_NAME equ $80003000 +DTAG_VEC equ $80004000 ; internal use only + + + STRUCTURE QueryHeader,0 + ULONG qh_StructID ; datachunk type identifier + ULONG qh_DisplayID ; copy of display record key + ULONG qh_SkipID ; TAG_SKIP -- see tagitems.h + ULONG qh_Length ; length of data in double-longwords + LABEL qh_SIZEOF + + STRUCTURE DisplayInfo,qh_SIZEOF + UWORD dis_NotAvailable ; if NULL available, else see defines + ULONG dis_PropertyFlags ; Properties of this mode see defines + STRUCT dis_Resolution,tpt_SIZEOF ; ticks-per-pixel X/Y + UWORD dis_PixelSpeed ; aproximation in nanoseconds + UWORD dis_NumStdSprites ; number of standard amiga sprites + UWORD dis_PaletteRange ; distinguishable shades available + STRUCT dis_SpriteResolution,tpt_SIZEOF ; sprite ticks-per-pixel X/Y + STRUCT dis_pad,4 + UBYTE RedBits ; number of Red bits this display supports (V39) + UBYTE GreenBits; ; number of Green bits this display supports (V39) + UBYTE BlueBits; ; number of Blue bits this display supports (V39) + STRUCT dis_pad2,5 + STRUCT dis_reserved,8 + LABEL dis_SIZEOF + +* availability + +DI_AVAIL_NOCHIPS equ $0001 +DI_AVAIL_NOMONITOR equ $0002 +DI_AVAIL_NOTWITHGENLOCK equ $0004 + +* mode properties + +DIPF_IS_LACE equ $00000001 +DIPF_IS_DUALPF equ $00000002 +DIPF_IS_PF2PRI equ $00000004 +DIPF_IS_HAM equ $00000008 + +DIPF_IS_ECS equ $00000010 ; note: ECS modes (SHIRES, VGA, and + ; PRODUCTIVITY) do not support + ; attached sprites. + +DIPF_IS_AA equ $00010000 +DIPF_IS_PAL equ $00000020 +DIPF_IS_SPRITES equ $00000040 +DIPF_IS_GENLOCK equ $00000080 + +DIPF_IS_WB equ $00000100 +DIPF_IS_DRAGGABLE equ $00000200 +DIPF_IS_PANELLED equ $00000400 +DIPF_IS_BEAMSYNC equ $00000800 +DIPF_IS_EXTRAHALFBRITE equ $00001000 + +; The following DIPF_IS_... flags are new for V39 +DIPF_IS_SPRITES_ATT equ $00002000 ; supports attached sprites +DIPF_IS_SPRITES_CHNG_RES equ $00004000 ; supports variable sprite resolution +DIPF_IS_SPRITES_BORDER equ $00008000 ; sprites can be displayed in borders +DIPF_IS_SCANDBL equ $00020000 ; scan-doubled? +DIPF_IS_SPRITES_CHNG_BASE equ $00040000 ; can change the sprite base color +DIPF_IS_SPRITES_CHNG_PRI equ $00080000 ; can change sprite priority +DIPF_IS_DBUFFER equ $00100000 ; can support double buffering +DIPF_IS_PROGBEAM equ $00200000 ; programmed beam-sync mode +DIPF_IS_FOREIGN equ $80000000 ; non-amiga mode? + + + STRUCTURE DimensionInfo,qh_SIZEOF + UWORD dim_MaxDepth ; log2( max number of colors + UWORD dim_MinRasterWidth ; minimum width in pixels + UWORD dim_MinRasterHeight ; minimum height in pixels + UWORD dim_MaxRasterWidth ; maximum width in pixels + UWORD dim_MaxRasterHeight ; maximum height in pixels + STRUCT dim_Nominal,ra_SIZEOF ; "standard" dimensions + STRUCT dim_MaxOScan,ra_SIZEOF ; fixed, hardware dependent + STRUCT dim_VideoOScan,ra_SIZEOF ; fixed, hardware dependent + STRUCT dim_TxtOScan,ra_SIZEOF ; editable via preferences + STRUCT dim_StdOScan,ra_SIZEOF ; editable via preferences + STRUCT dim_pad,14 + STRUCT dim_reserved,8 ; terminator + LABEL dim_SIZEOF + + STRUCTURE MonitorInfo,qh_SIZEOF + APTR mtr_Mspc ; pointer to monitor specification + STRUCT mtr_ViewPosition,tpt_SIZEOF ; editable via preferences + STRUCT mtr_ViewResolution,tpt_SIZEOF ; monitor ticks-per-pixel + STRUCT mtr_ViewPositionRange,ra_SIZEOF ; fixed, hardware dependent + UWORD mtr_TotalRows ; display height in scanlines + UWORD mtr_TotalColorClocks ; scanline width in 280 ns units + UWORD mtr_MinRow ; absolute minimum active scanline + WORD mtr_Compatibility ; how this coexists with others + STRUCT mtr_pad,32 + STRUCT mtr_MouseTicks,tpt_SIZEOF + STRUCT mtr_DefaultViewPosition,tpt_SIZEOF ; original, never changes + ULONG mtr_PreferredModeID ; for preferences + STRUCT mtr_reserved,8 ; terminator + LABEL mtr_SIZEOF + +* monitor compatibility + +MCOMPAT_MIXED equ 0 ; can share display with other MCOMPAT_MIXED +MCOMPAT_SELF equ 1 ; can share only within same monitor +MCOMPAT_NOBODY equ -1 ; only one viewport at a time + +DISPLAYNAMELEN equ 32 + + STRUCTURE NameInfo,qh_SIZEOF + STRUCT nif_Name,DISPLAYNAMELEN + STRUCT nif_reserved,8 ; terminator + LABEL nif_SIZEOF + + +; The following VecInfo structure is PRIVATE, for our use only +; Touch these, and burn! (V39) +; + + STRUCTURE VecInfo,qh_SIZEOF + APTR vec_Vec + APTR vec_Data + UWORD vec_Type + STRUCT vec_pad,6 + STRUCT vec_reserved,8 + LABEL vec_SIZEOF + + IFND GRAPHICS_MODEID_I + include 'graphics/modeid.i' + ENDC + + ENDC ; GRAPHICS_DISPLAYINFO_I diff --git a/extra/rtg_driver/include/graphics/gels.i b/extra/rtg_driver/include/graphics/gels.i new file mode 100644 index 00000000..bf693982 --- /dev/null +++ b/extra/rtg_driver/include/graphics/gels.i @@ -0,0 +1,208 @@ + IFND GRAPHICS_GELS_I +GRAPHICS_GELS_I SET 1 +** +** $VER: gels.i 39.0 (21.8.1991) +** Includes Release 45.1 +** +** include file for AMIGA GELS (Graphics Elements) +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + include 'exec/types.i' + ENDC + +*------ VS_vSflags --------------------------------------------------- + +* ;-- user-set vSprite flags -- +SUSERFLAGS EQU $00FF ; mask of all user-settable vSprite-flags + BITDEF VS,VSPRITE,0 ; set if vSprite, clear if bob + BITDEF VS,SAVEBACK,1 ; set if background is to be saved/restored + BITDEF VS,OVERLAY,2 ; set to mask image of bob onto background + BITDEF VS,MUSTDRAW,3 ; set if vSprite absolutely must be drawn +* ;-- system-set vSprite flags -- + BITDEF VS,BACKSAVED,8 ; this bob's background has been saved + BITDEF VS,BOBUPDATE,9 ; temporary flag, useless to outside world + BITDEF VS,GELGONE,10 ; set if gel is completely clipped (offscreen) + BITDEF VS,VSOVERFLOW,11 ; vSprite overflow (if MUSTDRAW set we draw!) + + +*------ B_flags ------------------------------------------------------ +* ;-- these are the user flag bits -- +BUSERFLAGS EQU $00FF ; mask of all user-settable bob-flags + BITDEF B,SAVEBOB,0 ; set to not erase bob + BITDEF B,BOBISCOMP,1 ; set to identify bob as animComp +* ;-- these are the system flag bits -- + BITDEF B,BWAITING,8 ; set while bob is waiting on 'after' + BITDEF B,BDRAWN,9 ; set when bob is drawn this DrawG pass + BITDEF B,BOBSAWAY,10 ; set to initiate removal of bob + BITDEF B,BOBNIX,11 ; set when bob is completely removed + BITDEF B,SAVEPRESERVE,12 ; for back-restore during double-buffer + BITDEF B,OUTSTEP,13 ; for double-clearing if double-buffer + + +*------ defines for the animation procedures ------------------------- + +ANFRACSIZE EQU 6 +ANIMHALF EQU $0020 +RINGTRIGGER EQU $0001 + +*------ macros -------------------------------------------------------- +* these are GEL functions that are currently simple enough to exist as a +* definition. It should not be assumed that this will always be the case + +InitAnimate MACRO * &animKey + CLR.L \1 + ENDM + + +RemBob MACRO * &b + OR.W #BF_BOBSAWAY,b_BobFlags+\1 + ENDM + +*------ VS : vSprite ------------------------------------------------- + STRUCTURE VS,0 ; vSprite +* -- SYSTEM VARIABLES -- +* GEL linked list forward/backward pointers sorted by y,x value + APTR vs_NextVSprite ; struct *vSprite + APTR vs_PrevVSprite ; struct *vSprite +* GEL draw list constructed in the order the bobs are actually drawn, then +* list is copied to clear list +* must be here in vSprite for system boundary detection + APTR vs_DrawPath ; struct *vSprite: pointer of overlay drawing + APTR vs_ClearPath ; struct *vSprite: pointer for overlay clearing +* the vSprite positions are defined in (y,x) order to make sorting +* sorting easier, since (y,x) as a long integer + WORD vs_Oldy ; previous position + WORD vs_Oldx ; +* -- COMMON VARIABLES -- + WORD vs_VSFlags ; vSprite flags +* -- USER VARIABLES -- +* the vSprite positions are defined in (y,x) order to make sorting +* easier, since (y,x) as a long integer + WORD vs_Y ; screen position + WORD vs_X + WORD vs_Height + WORD vs_Width ; number of words per row of image data + WORD vs_Depth ; number of planes of data + WORD vs_MeMask ; which types can collide with this vSprite + WORD vs_HitMask ; which types this vSprite can collide with + APTR vs_ImageData ; *WORD pointer to vSprite image +* borderLine is the one-dimensional logical OR of all +* the vSprite bits, used for fast collision detection of edge + APTR vs_BorderLine ; *WORD: logical OR of all vSprite bits + APTR vs_CollMask ; *WORD: similar to above except this is a +* matrix pointer to this vSprite's color definitions (not used by bobs) + APTR vs_SprColors ; *WORD + APTR vs_VSBob ; struct *bob: points home if this vSprite is + ; part of a bob +* planePick flag: set bit selects a plane from image, clear bit selects +* use of shadow mask for that plane +* OnOff flag: if using shadow mask to fill plane, this bit (corresponding +* to bit in planePick) describes whether to fill with 0's or 1's +* There are two uses for these flags: +* - if this is the vSprite of a bob, these flags describe how +* the bob is to be drawn into memory +* - if this is a simple vSprite and the user intends on setting +* the MUSTDRAW flag of the vSprite, these flags must be set +* too to describe which color registers the user wants for +* the image + BYTE vs_PlanePick + BYTE vs_PlaneOnOff + LABEL vs_SUserExt ; user definable + LABEL vs_SIZEOF + + +*------ BOB : bob ------------------------------------------------------ + + STRUCTURE BOB,0 ; bob: blitter object +* -- COMMON VARIABLES -- + WORD bob_BobFlags ; general purpose flags (see definitions below) +* -- USER VARIABLES -- + APTR bob_SaveBuffer ; *WORD pointer to the buffer for background +* save used by bobs for "cookie-cutting" and multi-plane masking + APTR bob_ImageShadow ; *WORD +* pointer to BOBs for sequenced drawing of bobs +* for correct overlaying of multiple component animations + APTR bob_Before ; struct *bob: draw this bob before bob pointed + ; to by before + APTR bob_After ; struct *bob: draw this bob after bob pointed + ; to by after + APTR bob_BobVSprite ; struct *vSprite: this bob's vSprite definition + APTR bob_BobComp ; struct *animComp: pointer to this bob's + ; animComp def + APTR bob_DBuffer ; struct dBufPacket: pointer to this bob's + ; dBuf packet + LABEL bob_BUserExt ; bob user extension + LABEL bob_SIZEOF + +*------ AC : animComp ------------------------------------------------ + + STRUCTURE AC,0 ; animComp +* -- COMMON VARIABLES -- + WORD ac_CompFlags ; animComp flags for system & user +* timer defines how long to keep this component active: +* if set non-zero, timer decrements to zero then switches to nextSeq +* if set to zero, animComp never switches + WORD ac_Timer +* -- USER VARIABLES -- +* initial value for timer when the animComp is activated by the system + WORD ac_TimeSet +* pointer to next and previous components of animation object + APTR ac_NextComp ; struct *animComp + APTR ac_PrevComp ; struct *animComp +* pointer to component component definition of next image in sequence + APTR ac_NextSeq ; struct *animComp + APTR ac_PrevSeq ; struct *animComp + APTR ac_AnimCRoutine ; address of special animation procedure + WORD ac_YTrans ; initial y translation (if this is a component) + WORD ac_XTrans ; initial x translation (if this is a component) + APTR ac_HeadOb ; struct *animOb + APTR ac_AnimBob ; struct *bob + LABEL ac_SIZE + +*------ AO : animOb -------------------------------------------------- + + STRUCTURE AO,0 ; animOb +* -- SYSTEM VARIABLES -- + APTR ao_NextOb ; struct *animOb + APTR ao_PrevOb ; struct *animOb +* number of calls to Animate this animOb has endured + LONG ao_Clock + WORD ao_AnOldY ; old y,x coordinates + WORD ao_AnOldX ; +* -- COMMON VARIABLES -- + WORD ao_AnY ; y,x coordinates of the animOb + WORD ao_AnX ; +* -- USER VARIABLES -- + WORD ao_YVel ; velocities of this object + WORD ao_XVel ; + WORD ao_XAccel ; accelerations of this object + WORD ao_YAccel ; !!! backwards !!! + WORD ao_RingYTrans ; ring translation values + WORD ao_RingXTrans ; + APTR ao_AnimORoutine ; address of special animation procedure + APTR ao_HeadComp ; struct *animComp: pointer to first component + LABEL ao_AUserExt ; animOb user extension + LABEL ao_SIZEOF + + +*------ DBP : dBufPacket --------------------------------------------- +* dBufPacket defines the values needed to be saved across buffer to buffer +* when in double-buffer mode + + STRUCTURE DBP,0 ; dBufPacket + WORD dbp_BufY ; save the other buffers screen coordinates + WORD dbp_BufX ; + APTR dbp_BufPath ; struct *vSprite: carry the draw path over + ; the gap +* these pointers must be filled in by the user +* pointer to other buffer's background save buffer + APTR dbp_BufBuffer ; *WORD +* pointer to other buffer's background plane pointers + APTR dbp_BufPlanes ; **WORD + LABEL dbp_SIZEOF + + ENDC ; GRAPHICS_GELS_I diff --git a/extra/rtg_driver/include/graphics/gfx.i b/extra/rtg_driver/include/graphics/gfx.i new file mode 100644 index 00000000..de63a99e --- /dev/null +++ b/extra/rtg_driver/include/graphics/gfx.i @@ -0,0 +1,61 @@ + IFND GRAPHICS_GFX_I +GRAPHICS_GFX_I SET 1 +** +** $VER: gfx.i 39.3 (20.2.1992) +** Includes Release 45.1 +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + include 'exec/types.i' + ENDC + +BITSET equ $8000 +BITCLR equ 0 +AGNUS equ 1 +DENISE equ 1 + + STRUCTURE BitMap,0 + WORD bm_BytesPerRow + WORD bm_Rows + BYTE bm_Flags + BYTE bm_Depth + WORD bm_Pad + STRUCT bm_Planes,8*4 + LABEL bm_SIZEOF + + STRUCTURE Rectangle,0 + WORD ra_MinX + WORD ra_MinY + WORD ra_MaxX + WORD ra_MaxY + LABEL ra_SIZEOF + + STRUCTURE Rect32,0 + LONG r32_MinX + LONG r32_MinY + LONG r32_MaxX + LONG r32_MaxY + LABEL r32_SIZEOF + + STRUCTURE tPoint,0 + WORD tpt_x + WORD tpt_y + LABEL tpt_SIZEOF + + BITDEF BM,CLEAR,0 + BITDEF BM,DISPLAYABLE,1 + BITDEF BM,INTERLEAVED,2 + BITDEF BM,STANDARD,3 + BITDEF BM,MINPLANES,4 + + + +BMA_HEIGHT equ 0 +BMA_DEPTH equ 4 +BMA_WIDTH equ 8 +BMA_FLAGS equ 12 + + ENDC ; GRAPHICS_GFX_I diff --git a/extra/rtg_driver/include/graphics/gfxbase.i b/extra/rtg_driver/include/graphics/gfxbase.i new file mode 100644 index 00000000..2dde0f91 --- /dev/null +++ b/extra/rtg_driver/include/graphics/gfxbase.i @@ -0,0 +1,201 @@ + IFND GRAPHICS_GFXBASE_I +GRAPHICS_GFXBASE_I SET 1 +** +** $VER: gfxbase.i 39.33 (21.4.1993) +** Includes Release 45.1 +** +** graphics base definitions +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_LISTS_I + include 'exec/lists.i' + ENDC + IFND EXEC_LIBRARIES_I + include 'exec/libraries.i' + ENDC + IFND EXEC_INTERRUPTS_I + include 'exec/interrupts.i' + ENDC + IFND GRAPHICS_MONITOR_I + include 'graphics/monitor.i' + ENDC + + STRUCTURE GfxBase,LIB_SIZE + APTR gb_ActiView ; struct *View + APTR gb_copinit ; struct *copinit; ptr to copper start up list + APTR gb_cia ; for 6526 resource use + APTR gb_blitter ; for blitter resource use + APTR gb_LOFlist ; current copper list being run + APTR gb_SHFlist ; current copper list being run + APTR gb_blthd ; struct *bltnode + APTR gb_blttl + APTR gb_bsblthd + APTR gb_bsblttl + STRUCT gb_vbsrv,IS_SIZE + STRUCT gb_timsrv,IS_SIZE + STRUCT gb_bltsrv,IS_SIZE + STRUCT gb_TextFonts,LH_SIZE + APTR gb_DefaultFont + UWORD gb_Modes ; copy of bltcon0 + BYTE gb_VBlank + BYTE gb_Debug + UWORD gb_BeamSync + WORD gb_system_bplcon0 + BYTE gb_SpriteReserved + BYTE gb_bytereserved + + WORD gb_Flags + WORD gb_BlitLock + WORD gb_BlitNest + STRUCT gb_BlitWaitQ,LH_SIZE + APTR gb_BlitOwner + STRUCT gb_TOF_WaitQ,LH_SIZE + + WORD gb_DisplayFlags + APTR gb_SimpleSprites + WORD gb_MaxDisplayRow + WORD gb_MaxDisplayColumn + WORD gb_NormalDisplayRows + WORD gb_NormalDisplayColumns + WORD gb_NormalDPMX + WORD gb_NormalDPMY + + APTR gb_LastChanceMemory + APTR gb_LCMptr + + WORD gb_MicrosPerLine ; usecs per line times 256 + WORD gb_MinDisplayColumn + + UBYTE gb_ChipRevBits0 ; agnus/denise new features + UBYTE gb_MemType + STRUCT gb_crb_reserved,4 + + STRUCT gb_monitor_id,2 ; normally null + STRUCT gb_hedley,4*8 + STRUCT gb_hedley_sprites,4*8 + STRUCT gb_hedley_sprites1,4*8 + WORD gb_hedley_count + WORD gb_hedley_flags + WORD gb_hedley_tmp + APTR gb_hash_table + UWORD gb_current_tot_rows + UWORD gb_current_tot_cclks + UBYTE gb_hedley_hint + UBYTE gb_hedley_hint2 + STRUCT gb_nreserved,4*4 + APTR gb_a2024_sync_raster + UWORD gb_control_delta_pal + UWORD gb_control_delta_ntsc + APTR gb_current_monitor + STRUCT gb_MonitorList,LH_SIZE + APTR gb_default_monitor + APTR gb_MonitorListSemaphore + APTR gb_DisplayInfoDataBase + UWORD gb_TopLine + APTR gb_ActiViewCprSemaphore + APTR gb_UtilBase + APTR gb_ExecBase + APTR gb_bwshifts + APTR gb_StrtFetchMasks + APTR gb_StopFetchMasks + APTR gb_Overrun + APTR gb_RealStops + WORD gb_SpriteWidth + WORD gb_SpriteFMode + BYTE gb_SoftSprites + BYTE gb_arraywidth ; need 2 more bytes to be lword aligned + WORD gb_DefaultSpriteWidth ; what sprite width intuiton wants. + BYTE gb_SprMoveDisable + BYTE gb_WantChips + UBYTE gb_BoardMemType + UBYTE gb_Bugs + ULONG gb_LayersBase + ULONG gb_ColorMask + APTR gb_IVector + APTR gb_IData + ULONG gb_SpecialCounter + APTR gb_DBList + UWORD gb_MonitorFlags + BYTE gb_ScanDoubledSprites + BYTE gb_BP3Bits + STRUCT gb_MonitorVBlank,asi_SIZEOF + APTR gb_natural_monitor + APTR gb_ProgData + BYTE gb_ExtSprites + UBYTE gb_pad3 + WORD gb_GfxFlags + ULONG gb_VBCounter + APTR gb_HashTableSemaphore + STRUCT gb_HWEmul,9*4 + LABEL gb_SIZE + +gb_ChunkyToPlanarPtr equ gb_HWEmul + +* bits for dalestuff, which may go away when blitter becomes a resource +OWNBLITTERn equ 0 * blitter owned bit +QBOWNERn equ 1 * blitter owned by blit queuer +BLITMSG_FAULTn equ 2 + +BLITMSG_FAULT equ 1< 2 us/bit (mfm), 2 -> 4 us/bit (gcr) +ADKB_USE3PN EQU 7 ; use aud chan 3 to modulate period of ?? +ADKB_USE2P3 EQU 6 ; use aud chan 2 to modulate period of 3 +ADKB_USE1P2 EQU 5 ; use aud chan 1 to modulate period of 2 +ADKB_USE0P1 EQU 4 ; use aud chan 0 to modulate period of 1 +ADKB_USE3VN EQU 3 ; use aud chan 3 to modulate volume of ?? +ADKB_USE2V3 EQU 2 ; use aud chan 2 to modulate volume of 3 +ADKB_USE1V2 EQU 1 ; use aud chan 1 to modulate volume of 2 +ADKB_USE0V1 EQU 0 ; use aud chan 0 to modulate volume of 1 + +ADKF_SETCLR EQU (1<<15) +ADKF_PRECOMP1 EQU (1<<14) +ADKF_PRECOMP0 EQU (1<<13) +ADKF_MFMPREC EQU (1<<12) +ADKF_UARTBRK EQU (1<<11) +ADKF_WORDSYNC EQU (1<<10) +ADKF_MSBSYNC EQU (1<<9) +ADKF_FAST EQU (1<<8) +ADKF_USE3PN EQU (1<<7) +ADKF_USE2P3 EQU (1<<6) +ADKF_USE1P2 EQU (1<<5) +ADKF_USE0P1 EQU (1<<4) +ADKF_USE3VN EQU (1<<3) +ADKF_USE2V3 EQU (1<<2) +ADKF_USE1V2 EQU (1<<1) +ADKF_USE0V1 EQU (1<<0) + +ADKF_PRE000NS EQU 0 ; 000 ns of precomp +ADKF_PRE140NS EQU (ADKF_PRECOMP0) ; 140 ns of precomp +ADKF_PRE280NS EQU (ADKF_PRECOMP1) ; 280 ns of precomp +ADKF_PRE560NS EQU (ADKF_PRECOMP0!ADKF_PRECOMP1) ; 560 ns of precomp + + ENDC ; HARDWARE_ADKBITS_I diff --git a/extra/rtg_driver/include/hardware/blit.i b/extra/rtg_driver/include/hardware/blit.i new file mode 100644 index 00000000..b42a54bd --- /dev/null +++ b/extra/rtg_driver/include/hardware/blit.i @@ -0,0 +1,104 @@ + IFND HARDWARE_BLIT_I +HARDWARE_BLIT_I SET 1 +** +** $VER: blit.i 39.2 (12.8.1993) +** Includes Release 45.1 +** +** Defines for direct hardware use of the blitter. +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC ;EXEC_TYPES_I + + + + STRUCTURE bltnode,0 + LONG bn_n + LONG bn_function + BYTE bn_stat + BYTE bn_dummy + WORD bn_blitsize + WORD bn_beamsync + LONG bn_cleanup + LABEL bn_SIZEOF + +* bit defines used by blit queuer +CLEANMEn equ 6 +CLEANME equ 1<bright) +CIAB_OVERLAY EQU (0) * memory overlay bit + +* ciaa port B (0xbfe101) -- parallel port + +* ciab port A (0xbfd000) -- serial and printer control +CIAB_COMDTR EQU (7) * serial Data Terminal Ready* +CIAB_COMRTS EQU (6) * serial Request to Send* +CIAB_COMCD EQU (5) * serial Carrier Detect* +CIAB_COMCTS EQU (4) * serial Clear to Send* +CIAB_COMDSR EQU (3) * serial Data Set Ready* +CIAB_PRTRSEL EQU (2) * printer SELECT +CIAB_PRTRPOUT EQU (1) * printer paper out +CIAB_PRTRBUSY EQU (0) * printer busy + +* ciab port B (0xbfd100) -- disk control +CIAB_DSKMOTOR EQU (7) * disk motorr* +CIAB_DSKSEL3 EQU (6) * disk select unit 3* +CIAB_DSKSEL2 EQU (5) * disk select unit 2* +CIAB_DSKSEL1 EQU (4) * disk select unit 1* +CIAB_DSKSEL0 EQU (3) * disk select unit 0* +CIAB_DSKSIDE EQU (2) * disk side select* +CIAB_DSKDIREC EQU (1) * disk direction of seek* +CIAB_DSKSTEP EQU (0) * disk step heads* + +* ciaa port A (0xbfe001) +CIAF_GAMEPORT1 EQU (1<<7) +CIAF_GAMEPORT0 EQU (1<<6) +CIAF_DSKRDY EQU (1<<5) +CIAF_DSKTRACK0 EQU (1<<4) +CIAF_DSKPROT EQU (1<<3) +CIAF_DSKCHANGE EQU (1<<2) +CIAF_LED EQU (1<<1) +CIAF_OVERLAY EQU (1<<0) + +* ciaa port B (0xbfe101) -- parallel port + +* ciab port A (0xbfd000) -- serial and printer control +CIAF_COMDTR EQU (1<<7) +CIAF_COMRTS EQU (1<<6) +CIAF_COMCD EQU (1<<5) +CIAF_COMCTS EQU (1<<4) +CIAF_COMDSR EQU (1<<3) +CIAF_PRTRSEL EQU (1<<2) +CIAF_PRTRPOUT EQU (1<<1) +CIAF_PRTRBUSY EQU (1<<0) + +* ciab port B (0xbfd100) -- disk control +CIAF_DSKMOTOR EQU (1<<7) +CIAF_DSKSEL3 EQU (1<<6) +CIAF_DSKSEL2 EQU (1<<5) +CIAF_DSKSEL1 EQU (1<<4) +CIAF_DSKSEL0 EQU (1<<3) +CIAF_DSKSIDE EQU (1<<2) +CIAF_DSKDIREC EQU (1<<1) +CIAF_DSKSTEP EQU (1<<0) + + ENDC ; HARDWARE_CIA_I diff --git a/extra/rtg_driver/include/hardware/custom.i b/extra/rtg_driver/include/hardware/custom.i new file mode 100644 index 00000000..b137989c --- /dev/null +++ b/extra/rtg_driver/include/hardware/custom.i @@ -0,0 +1,153 @@ + IFND HARDWARE_CUSTOM_I +HARDWARE_CUSTOM_I SET 1 +** +** $VER: custom.i 39.1 (18.9.1992) +** Includes Release 45.1 +** +** Offsets of Amiga custom chip registers +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + +* +* do this to get base of custom registers: +* XREF _custom; +* + +bltddat EQU $000 +dmaconr EQU $002 +vposr EQU $004 +vhposr EQU $006 +dskdatr EQU $008 +joy0dat EQU $00A +joy1dat EQU $00C +clxdat EQU $00E + +adkconr EQU $010 +pot0dat EQU $012 +pot1dat EQU $014 +potinp EQU $016 +serdatr EQU $018 +dskbytr EQU $01A +intenar EQU $01C +intreqr EQU $01E + +dskpt EQU $020 +dsklen EQU $024 +dskdat EQU $026 +refptr EQU $028 +vposw EQU $02A +vhposw EQU $02C +copcon EQU $02E +serdat EQU $030 +serper EQU $032 +potgo EQU $034 +joytest EQU $036 +strequ EQU $038 +strvbl EQU $03A +strhor EQU $03C +strlong EQU $03E + +bltcon0 EQU $040 +bltcon1 EQU $042 +bltafwm EQU $044 +bltalwm EQU $046 +bltcpt EQU $048 +bltbpt EQU $04C +bltapt EQU $050 +bltdpt EQU $054 +bltsize EQU $058 +bltcon0l EQU $05B ; note: byte access only +bltsizv EQU $05C +bltsizh EQU $05E + +bltcmod EQU $060 +bltbmod EQU $062 +bltamod EQU $064 +bltdmod EQU $066 + +bltcdat EQU $070 +bltbdat EQU $072 +bltadat EQU $074 + +deniseid EQU $07C +dsksync EQU $07E + +cop1lc EQU $080 +cop2lc EQU $084 +copjmp1 EQU $088 +copjmp2 EQU $08A +copins EQU $08C +diwstrt EQU $08E +diwstop EQU $090 +ddfstrt EQU $092 +ddfstop EQU $094 +dmacon EQU $096 +clxcon EQU $098 +intena EQU $09A +intreq EQU $09C +adkcon EQU $09E + +aud EQU $0A0 +aud0 EQU $0A0 +aud1 EQU $0B0 +aud2 EQU $0C0 +aud3 EQU $0D0 + +* AudChannel +ac_ptr EQU $00 ; ptr to start of waveform data +ac_len EQU $04 ; length of waveform in words +ac_per EQU $06 ; sample period +ac_vol EQU $08 ; volume +ac_dat EQU $0A ; sample pair +ac_SIZEOF EQU $10 + +bplpt EQU $0E0 + +bplcon0 EQU $100 +bplcon1 EQU $102 +bplcon2 EQU $104 +bplcon3 EQU $106 +bpl1mod EQU $108 +bpl2mod EQU $10A +bplcon4 EQU $10C +clxcon2 EQU $10E + +bpldat EQU $110 + +sprpt EQU $120 + +spr EQU $140 + +* SpriteDef +sd_pos EQU $00 +sd_ctl EQU $02 +sd_dataa EQU $04 +sd_dataB EQU $06 +sd_SIZEOF EQU $08 + +color EQU $180 + +htotal EQU $1c0 +hsstop EQU $1c2 +hbstrt EQU $1c4 +hbstop EQU $1c6 +vtotal EQU $1c8 +vsstop EQU $1ca +vbstrt EQU $1cc +vbstop EQU $1ce +sprhstrt EQU $1d0 +sprhstop EQU $1d2 +bplhstrt EQU $1d4 +bplhstop EQU $1d6 +hhposw EQU $1d8 +hhposr EQU $1da +beamcon0 EQU $1dc +hsstrt EQU $1de +vsstrt EQU $1e0 +hcenter EQU $1e2 +diwhigh EQU $1e4 +fmode EQU $1fc + + ENDC !HARDWARE_CUSTOM_I diff --git a/extra/rtg_driver/include/hardware/dmabits.i b/extra/rtg_driver/include/hardware/dmabits.i new file mode 100644 index 00000000..02d8fac2 --- /dev/null +++ b/extra/rtg_driver/include/hardware/dmabits.i @@ -0,0 +1,49 @@ + IFND HARDWARE_DMABITS_I +HARDWARE_DMABITS_I SET 1 +** +** $VER: dmabits.i 39.1 (18.9.1992) +** Includes Release 45.1 +** +** include file for defining dma control stuff +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + +* write definitions for dmaconw +DMAF_SETCLR EQU $8000 +DMAF_AUDIO EQU $000F * 4 bit mask +DMAF_AUD0 EQU $0001 +DMAF_AUD1 EQU $0002 +DMAF_AUD2 EQU $0004 +DMAF_AUD3 EQU $0008 +DMAF_DISK EQU $0010 +DMAF_SPRITE EQU $0020 +DMAF_BLITTER EQU $0040 +DMAF_COPPER EQU $0080 +DMAF_RASTER EQU $0100 +DMAF_MASTER EQU $0200 +DMAF_BLITHOG EQU $0400 +DMAF_ALL EQU $01FF * all dma channels + +* read definitions for dmaconr +* bits 0-8 correspnd to dmaconw definitions +DMAF_BLTDONE EQU $4000 +DMAF_BLTNZERO EQU $2000 + +DMAB_SETCLR EQU 15 +DMAB_AUD0 EQU 0 +DMAB_AUD1 EQU 1 +DMAB_AUD2 EQU 2 +DMAB_AUD3 EQU 3 +DMAB_DISK EQU 4 +DMAB_SPRITE EQU 5 +DMAB_BLITTER EQU 6 +DMAB_COPPER EQU 7 +DMAB_RASTER EQU 8 +DMAB_MASTER EQU 9 +DMAB_BLITHOG EQU 10 +DMAB_BLTDONE EQU 14 +DMAB_BLTNZERO EQU 13 + + ENDC ; HARDWARE_DMABITS_I diff --git a/extra/rtg_driver/include/hardware/intbits.i b/extra/rtg_driver/include/hardware/intbits.i new file mode 100644 index 00000000..9f17005b --- /dev/null +++ b/extra/rtg_driver/include/hardware/intbits.i @@ -0,0 +1,51 @@ + IFND HARDWARE_INTBITS_I +HARDWARE_INTBITS_I SET 1 +** +** $VER: intbits.i 39.1 (18.9.1992) +** Includes Release 45.1 +** +** bits in the interrupt enable (and interrupt request) register +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + +INTB_SETCLR EQU (15) ;Set/Clear control bit. Determines if bits + ;written with a 1 get set or cleared. Bits + ;written with a zero are allways unchanged. +INTB_INTEN EQU (14) ;Master interrupt (enable only ) +INTB_EXTER EQU (13) ;External interrupt +INTB_DSKSYNC EQU (12) ;Disk re-SYNChronized +INTB_RBF EQU (11) ;serial port Receive Buffer Full +INTB_AUD3 EQU (10) ;Audio channel 3 block finished +INTB_AUD2 EQU (9) ;Audio channel 2 block finished +INTB_AUD1 EQU (8) ;Audio channel 1 block finished +INTB_AUD0 EQU (7) ;Audio channel 0 block finished +INTB_BLIT EQU (6) ;Blitter finished +INTB_VERTB EQU (5) ;start of Vertical Blank +INTB_COPER EQU (4) ;Coprocessor +INTB_PORTS EQU (3) ;I/O Ports and timers +INTB_SOFTINT EQU (2) ;software interrupt request +INTB_DSKBLK EQU (1) ;Disk Block done +INTB_TBE EQU (0) ;serial port Transmit Buffer Empty + + + +INTF_SETCLR EQU (1<<15) +INTF_INTEN EQU (1<<14) +INTF_EXTER EQU (1<<13) +INTF_DSKSYNC EQU (1<<12) +INTF_RBF EQU (1<<11) +INTF_AUD3 EQU (1<<10) +INTF_AUD2 EQU (1<<9) +INTF_AUD1 EQU (1<<8) +INTF_AUD0 EQU (1<<7) +INTF_BLIT EQU (1<<6) +INTF_VERTB EQU (1<<5) +INTF_COPER EQU (1<<4) +INTF_PORTS EQU (1<<3) +INTF_SOFTINT EQU (1<<2) +INTF_DSKBLK EQU (1<<1) +INTF_TBE EQU (1<<0) + + ENDC ; HARDWARE_INTBITS_I diff --git a/extra/rtg_driver/include/intuition/cghooks.i b/extra/rtg_driver/include/intuition/cghooks.i new file mode 100644 index 00000000..56158930 --- /dev/null +++ b/extra/rtg_driver/include/intuition/cghooks.i @@ -0,0 +1,64 @@ + IFND INTUITION_CGHOOKS_I +INTUITION_CGHOOKS_I SET 1 +** +** $VER: cghooks.i 38.1 (11.11.1991) +** Includes Release 45.1 +** +** Custom gadget processing +** +** (C) Copyright 1988-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND INTUITION_INTUITION_I + INCLUDE "intuition/intuition.i" + ENDC + +; ======================================================================== +; === Gadget Info ========================================================= +; ======================================================================== + +; Package of information passed to custom and 'boopsi' +; gadget "hook" functions. This structure is READ ONLY. + + STRUCTURE GadgetInfo,0 +; APTR ggi_Gadget + + APTR ggi_Screen + APTR ggi_Window ; null for screen gadgets + APTR ggi_Requester ; null if not GTYP_REQGADGET + + ; rendering information: + ; don't use these without cloning/locking. + ; Official way is to call ObtainRPort() + APTR ggi_RastPort + APTR ggi_Layer + + ; copy of dimensions of screen/window/g00/req/group + ; that gadget resides in. Left/Top of this box is + ; offset from window mouse coordinates to gadget coordinates + ; screen gadgets: 0,0 (from screen coords) + ; window gadgets (no g00): 0,0 + ; GZZGADGETs (borderlayer): 0,0 + ; GZZ innerlayer gadget: borderleft, bordertop + ; Requester gadgets: reqleft, reqtop + STRUCT ggi_Domain,ibox_SIZEOF + + ; these are the pens for the window or screen + STRUCT ggi_Pens,2 ; detail and block pen UBYTE's + + ; the Detail and Block pens in ggi_DrInfo->dri_Pens[] are + ; for the screen. Use the above for window-sensitive + ; colors. + APTR ggi_DrInfo + + ; the size of this struct is not defined, since it is allocated + ; ONLY by Intuition. + ; LABEL ggi_SIZEOF + + + ENDC diff --git a/extra/rtg_driver/include/intuition/classes.i b/extra/rtg_driver/include/intuition/classes.i new file mode 100644 index 00000000..032138ff --- /dev/null +++ b/extra/rtg_driver/include/intuition/classes.i @@ -0,0 +1,94 @@ + IFND INTUITION_CLASSES_I +INTUITION_CLASSES_I SET 1 +** +** $VER: classes.i 40.0 (15.2.1994) +** Includes Release 45.1 +** +** Only used by class implementors +** +** (C) Copyright 1989-2001 Amiga, Inc. +** All Rights Reserved +** + +;****************************************************************************** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND EXEC_LIBRARIES_I + INCLUDE "exec/libraries.i" + ENDC + + IFND UTILITY_HOOKS_I + INCLUDE "utility/hooks.i" + ENDC + + IFND INTUITION_CLASSUSR_I + INCLUDE "intuition/classusr.i" + ENDC + +;****************************************************************************** +;***************** "White Box" access to struct IClass ************************ +;****************************************************************************** + + STRUCTURE ICLASS,0 + STRUCT cl_Dispatcher,h_SIZEOF ; Class dispatcher + ULONG cl_Reserved ; Must be 0 + APTR cl_Super ; Pointer to superclass + APTR cl_ID ; Class ID + + UWORD cl_InstOffset ; Offset of instance data + UWORD cl_InstSize ; Size of instance data + + ULONG cl_UserData ; Class global data + ULONG cl_SubclassCount ; Number of subclasses + ULONG cl_ObjectCount ; Number of objects + ULONG cl_Flags + + ; no iclass_SIZEOF because only Intuition allocates these + +;****************************************************************************** + +; defined values of cl_Flags +CLB_INLIST EQU 0 +CLF_INLIST EQU $00000001 ; class in in public class list + +; see classes.h for common calculations (sorry, no macros yet) + +;***************************************************************************** +;***************** "White box" access to struct _Object ********************** +;***************************************************************************** + +; We have this, the instance data of the root class, PRECEDING the "object". +; This is so that Gadget objects are Gadget pointers, and so on. If this +; structure grows, it will always have o_Class at the end, so the macro +; OCLASS(o) will always have the same offset back from the pointer returned +; from NewObject(). +; +; This data structure is subject to change. Do not use the o_Node embedded +; structure. + + STRUCTURE _Object,0 + STRUCT o_Node,MLN_SIZE + APTR o_Class + + ; this value may change but difference between it and offset of o_Class + ; will remain constant + LABEL _object_SIZEOF + +;****************************************************************************** + +; BOOPSI class libraries should use this structure as the base for their +; library data. This allows developers to obtain the class pointer for +; performing object-less inquiries. + + STRUCTURE ClassLibrary,0 + STRUCT cl_Lib,LIB_SIZE ; Embedded library + UWORD cl_Pad ; Align the structure + APTR cl_Class ; Class pointer + LABEL ClassLibrary_SIZEOF + +;****************************************************************************** + + ENDC diff --git a/extra/rtg_driver/include/intuition/classusr.i b/extra/rtg_driver/include/intuition/classusr.i new file mode 100644 index 00000000..a3347879 --- /dev/null +++ b/extra/rtg_driver/include/intuition/classusr.i @@ -0,0 +1,91 @@ + IFND INTUITION_CLASSUSR_I +INTUITION_CLASSUSR_I SET 1 +** +** $VER: classusr.i 38.1 (11.11.1991) +** Includes Release 45.1 +** +** For application users of Intuition object classes +** +** (C) Copyright 1989-2001 Amiga, Inc. +** All Rights Reserved +** + + + + IFND UTILITY_HOOKS_I + INCLUDE "utility/hooks.i" + ENDC + +* beginning of "method message" passed to class dispatchers + STRUCTURE Msg,0 + ULONG msg_MethodID + ; method-specific data follows, some examples below + +* For now, see the class id's for Intuition basic classes +* defined in classusr.h. Sorry there aren't macros for the strings yet. + +* dispatched method ID's +* NOTE: Applications should use Intuition entry points, not these, +* for NewObject, DisposeObject, SetAttrs, SetGadgetAttrs, and GetAttr. + + ENUM $101 + EITEM OM_NEW ; 'object' parameter is "true class" + EITEM OM_DISPOSE ; delete self (no parameters) + EITEM OM_SET ; set attribute (list) + EITEM OM_GET ; return single attribute value + EITEM OM_ADDTAIL ; add self to a List + EITEM OM_REMOVE ; remove self from list (no parameters) + EITEM OM_NOTIFY ; send to self: notify dependents + EITEM OM_UPDATE ; notification message from someone + EITEM OM_ADDMEMBER ; used by various classes with lists + EITEM OM_REMMEMBER ; used by various classes with lists + +* Parameter "Messages" passed to methods. +* NOTE: All of these parameter packets +* start off by the longword MethodID, but +* we don't redefine it for each structure. + +* OM_NEW and OM_SET + STRUCTURE opSet,4 + ; ULONG MethodID + APTR ops_AttrList ; new attributes + APTR ops_GInfo ; always there for gadgets, + ; but will be NULL for OM_NEW + +* OM_NOTIFY, and OM_UPDATE + STRUCTURE opUpdate,4 + ; ULONG MethodID + APTR opu_AttrList ; new attributes + APTR opu_GInfo ; always there for gadgets, + ; but will be NULL for OM_NEW + ULONG opu_Flags ; defined below + +* this flag means that the update message is being issued from +* something like an active gadget, ala GACT_FOLLOWMOUSE. When +* the gadget goes inactive, it will issue a final update +* message with this bit cleared. Examples of use are for +* GACT_FOLLOWMOUSE equivalents for propgadclass, and repeat strobes +* for buttons. + +OPUB_INTERIM EQU 0 +OPUF_INTERIM EQU 1 + +* OM_GET + STRUCTURE opGet,4 + ; ULONG MethodID + ULONG opg_AttrID + APTR opg_Storage ; may be other types, but "int" + ; types are all ULONG + +* OM_ADDTAIL + STRUCTURE opAddTail,4 + ; ULONG MethodID + APTR opat_List + +* OM_ADDMEMBER, OM_REMMEMBER + + STRUCTURE opMember,4 + ; ULONG MethodID + APTR opam_Object + + ENDC ; IFND INTUITION_CLASSUSR_I diff --git a/extra/rtg_driver/include/intuition/gadgetclass.i b/extra/rtg_driver/include/intuition/gadgetclass.i new file mode 100644 index 00000000..03f1f05d --- /dev/null +++ b/extra/rtg_driver/include/intuition/gadgetclass.i @@ -0,0 +1,363 @@ + IFND INTUITION_GADGETCLASS_I +INTUITION_GADGETCLASS_I SET 1 +** +** $VER: gadgetclass.i 44.1 (19.10.1999) +** Includes Release 45.1 +** +** Custom and 'boopsi' gadget class interface +** +** (C) Copyright 1989-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND INTUITION_INTUITION_I + INCLUDE "intuition/intuition.i" + ENDC + + IFND UTILITY_TAGITEM_I + INCLUDE "utility/tagitem.i" + ENDC + + +* +* NOTE: intuition/iobsolete.i is included at the END of this file! +* + +; Gadget Class attributes + +GA_Dummy EQU (TAG_USER+$30000) +GA_Left EQU (GA_Dummy+$0001) +GA_RelRight EQU (GA_Dummy+$0002) +GA_Top EQU (GA_Dummy+$0003) +GA_RelBottom EQU (GA_Dummy+$0004) +GA_Width EQU (GA_Dummy+$0005) +GA_RelWidth EQU (GA_Dummy+$0006) +GA_Height EQU (GA_Dummy+$0007) +GA_RelHeight EQU (GA_Dummy+$0008) +GA_Text EQU (GA_Dummy+$0009) ; ti_Data is (UBYTE *) +GA_Image EQU (GA_Dummy+$000A) +GA_Border EQU (GA_Dummy+$000B) +GA_SelectRender EQU (GA_Dummy+$000C) +GA_Highlight EQU (GA_Dummy+$000D) +GA_Disabled EQU (GA_Dummy+$000E) +GA_GZZGadget EQU (GA_Dummy+$000F) +GA_ID EQU (GA_Dummy+$0010) +GA_UserData EQU (GA_Dummy+$0011) +GA_SpecialInfo EQU (GA_Dummy+$0012) +GA_Selected EQU (GA_Dummy+$0013) +GA_EndGadget EQU (GA_Dummy+$0014) +GA_Immediate EQU (GA_Dummy+$0015) +GA_RelVerify EQU (GA_Dummy+$0016) +GA_FollowMouse EQU (GA_Dummy+$0017) +GA_RightBorder EQU (GA_Dummy+$0018) +GA_LeftBorder EQU (GA_Dummy+$0019) +GA_TopBorder EQU (GA_Dummy+$001A) +GA_BottomBorder EQU (GA_Dummy+$001B) +GA_ToggleSelect EQU (GA_Dummy+$001C) + +* internal use only, until further notice, please +GA_SysGadget EQU (GA_Dummy+$001D) +* bool, sets GTYP_SYSGADGET field in type +GA_SysGType EQU (GA_Dummy+$001E) +* e.g., GTYP_WUPFRONT, ... + +GA_Previous EQU (GA_Dummy+$001F) +* previous gadget (or (struct Gadget **)) in linked list +* NOTE: This attribute CANNOT be used to link new gadgets +* into the gadget list of an open window or requester. +* You must use AddGList(). + +GA_Next EQU (GA_Dummy+$0020) +* not implemented + +GA_DrawInfo EQU (GA_Dummy+$0021) +* some fancy gadgets need to see a DrawInfo +* when created or for layout + +* You should use at most ONE of GA_Text, GA_IntuiText, and GA_LabelImage +GA_IntuiText EQU (GA_Dummy+$0022) +* ti_Data is (struct IntuiText *) + +GA_LabelImage EQU (GA_Dummy+$0023) +* ti_Data is an image (object), used in place of +* GadgetText + +GA_TabCycle EQU (GA_Dummy+$0024) +* New for V37: +* Boolean indicates that this gadget is to participate in +* cycling activation with Tab or Shift-Tab. + +GA_GadgetHelp EQU (GA_Dummy+$0025) +* New for V39: +* Boolean indicates that this gadget sends gadget-help + +GA_Bounds EQU (GA_Dummy+$0026) +* New for V39: +* ti_Data is a pointer to an IBox structure which is +* to be copied into the extended gadget's bounds. + +GA_RelSpecial EQU (GA_Dummy+$0027) +* New for V39: +* Boolean indicates that this gadget has the "special relativity" +* property, which is useful for certain fancy relativity +* operations through the GM_LAYOUT method. + +GA_TextAttr EQU (GA_Dummy+40) +GA_ReadOnly EQU (GA_Dummy+41) +GA_Underscore EQU (GA_Dummy+42) +GA_ActivateKey EQU (GA_Dummy+43) +GA_BackFill EQU (GA_Dummy+44) +GA_GadgetHelpText EQU (GA_Dummy+45) +GA_UserInput EQU (GA_Dummy+46) + +* PROPGCLASS attributes + +PGA_Dummy EQU (TAG_USER+$31000) +PGA_Freedom EQU (PGA_Dummy+$0001) +* either or both of FREEVERT and FREEHORIZ +PGA_Borderless EQU (PGA_Dummy+$0002) +PGA_HorizPot EQU (PGA_Dummy+$0003) +PGA_HorizBody EQU (PGA_Dummy+$0004) +PGA_VertPot EQU (PGA_Dummy+$0005) +PGA_VertBody EQU (PGA_Dummy+$0006) +PGA_Total EQU (PGA_Dummy+$0007) +PGA_Visible EQU (PGA_Dummy+$0008) +PGA_Top EQU (PGA_Dummy+$0009) +; New for V37: +PGA_NewLook EQU (PGA_Dummy+$000A) + +* STRGCLASS attributes + +STRINGA_Dummy EQU (TAG_USER+$32000) +STRINGA_MaxChars EQU (STRINGA_Dummy+$0001) +* Note: There is a minor problem with Intuition when using boopsi integer +* gadgets (which are requested by using STRINGA_LongInt). Such gadgets +* must not have a STRINGA_MaxChars to be bigger than 15. Setting +* STRINGA_MaxChars for a boopsi integer gadget will cause a mismatched +* FreeMem() to occur. + +STRINGA_Buffer EQU (STRINGA_Dummy+$0002) +STRINGA_UndoBuffer EQU (STRINGA_Dummy+$0003) +STRINGA_WorkBuffer EQU (STRINGA_Dummy+$0004) +STRINGA_BufferPos EQU (STRINGA_Dummy+$0005) +STRINGA_DispPos EQU (STRINGA_Dummy+$0006) +STRINGA_AltKeyMap EQU (STRINGA_Dummy+$0007) +STRINGA_Font EQU (STRINGA_Dummy+$0008) +STRINGA_Pens EQU (STRINGA_Dummy+$0009) +STRINGA_ActivePens EQU (STRINGA_Dummy+$000A) +STRINGA_EditHook EQU (STRINGA_Dummy+$000B) +STRINGA_EditModes EQU (STRINGA_Dummy+$000C) + +* booleans +STRINGA_ReplaceMode EQU (STRINGA_Dummy+$000D) +STRINGA_FixedFieldMode EQU (STRINGA_Dummy+$000E) +STRINGA_NoFilterMode EQU (STRINGA_Dummy+$000F) + +STRINGA_Justification EQU (STRINGA_Dummy+$0010) +* GACT_STRINGCENTER, GACT_STRINGLEFT, GACT_STRINGRIGHT +STRINGA_LongVal EQU (STRINGA_Dummy+$0011) +STRINGA_TextVal EQU (STRINGA_Dummy+$0012) + +STRINGA_ExitHelp EQU (STRINGA_Dummy+$0013) +* STRINGA_ExitHelp is new for V37, and ignored by V36. +* Set this if you want the gadget to exit when Help is +* pressed. Look for a code of 0x5F, the rawkey code for Help + +SG_DEFAULTMAXCHARS EQU (128) + +* Gadget Layout related attributes + +LAYOUTA_Dummy EQU (TAG_USER+$38000) +LAYOUTA_LayoutObj EQU (LAYOUTA_Dummy+$0001) +LAYOUTA_Spacing EQU (LAYOUTA_Dummy+$0002) +LAYOUTA_Orientation EQU (LAYOUTA_Dummy+$0003) +LAYOUTA_ChildMaxWidth EQU (LAYOUTA_Dummy+$0004) +LAYOUTA_ChildMaxHeight EQU (LAYOUTA_Dummy+$0005) + +* orientation values +LORIENT_NONE EQU 0 +LORIENT_HORIZ EQU 1 +LORIENT_VERT EQU 2 + +; Custom gadget hook command ID's +; (gadget class method/message ID's) + +GM_HITTEST EQU 0 ; return GMR_GADGETHIT if you are clicked + ; (whether or not you are disabled) +GM_RENDER EQU 1 ; draw yourself, in the appropriate state +GM_GOACTIVE EQU 2 ; you are now going to be fed input +GM_HANDLEINPUT EQU 3 ; handle that input +GM_GOINACTIVE EQU 4 ; whether or not by choice, you are done +GM_HELPTEST EQU 5 ; Will you send gadget help if the mouse is + ; at the specified coordinates? See below + ; for possible GMR_ values. +GM_LAYOUT EQU 6 ; re-evaluate your size based on the GadgetInfo + ; Domain. Do NOT re-render yourself yet, you + ; will be called when it is time... +GM_DOMAIN EQU 7 +GM_KEYTEST EQU 8 +GM_KEYGOACTIVE EQU 9 +GM_KEYGOINACTIVE EQU 10 + +; Parameter "Messages" passed to gadget class methods + +; All parameter structure begin with a MethodID field +; This definition of an abstract generic "message" is +; equivalent to a better one in intuition/classusr.i, but +; it's left here for historic reasons + STRUCTURE MsgHeader,0 + ULONG MethodID + LABEL methodid_SIZEOF + +; GM_HITTEST and GM_HELPTEST send this message. +; For GM_HITTEST, gpht_Mouse are coordinates relative to the gadget +; select box. For GM_HELPTEST, the coordinates are relative to +; the gadget bounding box (which defaults to the select box). + STRUCTURE gpHitTest,methodid_SIZEOF + APTR gpht_GInfo + WORD gpht_MouseX + WORD gpht_MouseY + +; For GM_HITTEST, return GMR_GADGETHIT if you were indeed hit, +; otherwise return zero. +; +; For GM_HELPTEST, return GMR_NOHELPHIT (zero) if you were not hit. +; Typically, return GMR_HELPHIT if you were hit. +; It is possible to pass a UWORD to the application via the Code field +; of the IDCMP_GADGETHELP message. Return GMR_HELPCODE or'd with +; the UWORD-sized result you wish to return. +; +; GMR_HELPHIT yields a Code value of ((UWORD) ~0), which should +; mean "nothing particular" to the application. + +GMR_GADGETHIT EQU $00000004 ; GM_HITTEST hit + +GMR_NOHELPHIT EQU $00000000 ; GM_HELPTEST didn't hit +GMR_HELPHIT EQU $FFFFFFFF ; GM_HELPTEST hit, return code = ~0 +GMR_HELPCODE EQU $00010000 ; GM_HELPTEST hit, return low word as code + +; GM_RENDER + STRUCTURE gpRender,methodid_SIZEOF + APTR gpr_GInfo ; gadget context + APTR gpr_RPort ; all ready for use + LONG gpr_Redraw ; might be a "highlight pass" + +; values of gpr_Redraw +GREDRAW_UPDATE EQU 2 ; update for change in attributesvalues +GREDRAW_REDRAW EQU 1 ; redraw gadget +GREDRAW_TOGGLE EQU 0 ; toggle highlight, if applicable + +; GM_GOACTIVE, GM_HANDLEINPUT + STRUCTURE gpInput,methodid_SIZEOF + APTR gpi_GInfo + APTR gpi_IEvent + APTR gpi_Termination + WORD gpi_MouseX + WORD gpi_MouseY + + ; (V39) Pointer to TabletData structure, if this event originated + ; from a tablet which sends IESUBCLASS_NEWTABLET events, or NULL if + ; not. + ; + ; DO NOT ATTEMPT TO READ THIS FIELD UNDER INTUITION PRIOR TO V39! + ; IT WILL BE INVALID! + APTR gpi_TabletData + +; GM_HANDLEINPUT and GM_GOACTIVE return code flags +; return GMR_MEACTIVE (0) alone if you want more input. +; Otherwise, return ONE of GMR_NOREUSE and GMR_REUSE, and optionally +; GMR_VERIFY. + +; here are the original constant "equates" +GMR_MEACTIVE EQU $0000 ; (bugfix: was $0001 during beta) +GMR_NOREUSE EQU $0002 +GMR_REUSE EQU $0004 +GMR_VERIFY EQU $0008 ; you MUST set gpi_Termination + +* New for V37: +* You can end activation with one of GMR_NEXTACTIVE and GMR_PREVACTIVE, +* which instructs Intuition to activate the next or previous gadget +* that has GFLG_TABCYCLE set. +* +GMR_NEXTACTIVE EQU $0010 +GMR_PREVACTIVE EQU $0020 + +; here are standard bit/flag pairs +GMRB_NOREUSE EQU 1 +GMRB_REUSE EQU 2 +GMRB_VERIFY EQU 3 +GMRB_NEXTACTIVE EQU 4 +GMRB_PREVACTIVE EQU 5 + +GMRF_NOREUSE EQU $0002 +GMRF_REUSE EQU $0004 +GMRF_VERIFY EQU $0008 +GMRF_NEXTACTIVE EQU $0010 +GMRF_PREVACTIVE EQU $0020 + +; GM_GOINACTIVE + STRUCTURE gpGoInactive,methodid_SIZEOF + APTR gpgi_GInfo + +* V37 field only! DO NOT attempt to read under V36! + ULONG gpgi_Abort ; gpgi_Abort=1 if gadget was aborted + ; by Intuition and 0 if gadget went + ; inactive at its own request + +* New for V39: Intuition sends GM_LAYOUT to any GREL_ gadget when +* the window opens, or when the gadget is activated, or when the +* window is sized. Your gadget can set the GA_RelSpecial property +* to get GM_LAYOUT events without Intuition changing the interpretation +* of your gadget select box. + +; GM_LAYOUT + STRUCTURE gpLayout,methodid_SIZEOF + APTR gpl_GInfo + APTR gpl_Initial ; non-zero if this method was invoked + ; during AddGList() or OpenWindow() + ; time. zero if this method was invoked + ; during window resizing. + +; GM_DOMAIN + STRUCTURE gpDomain,methodid_SIZEOF + APTR gpd_GInfo + APTR gpd_RPort + LONG gpd_Which + STRUCT gpd_Domain,ibox_SIZEOF + APTR gpd_Attrs + +GDOMAIN_MINIMUM EQU 0 +GDOMAIN_NOMINAL EQU 1 +GDOMAIN_MAXIMUM EQU 2 + +; GM_KEYTEST + STRUCTURE gpKeyTest,methodid_SIZEOF + APTR gpkt_GInfo + APTR gpkt_IMsg + ULONG gpkt_VanillaKey + +; GM_KEYGOACTIVE + STRUCTURE gpKeyInput,methodid_SIZEOF + APTR gpk_GInfo + APTR gpk_IEvent + APTR gpk_Termination + +GMR_KEYACTIVE EQU $0010 +GMR_KEYVERIFY EQU $0020 + +; GM_KEYGOINACTIVE + STRUCTURE gpKeyGoInactive,methodid_SIZEOF + APTR gpki_GInfo + ULONG gpki_Abort + + +* Include obsolete identifiers: + IFND INTUITION_IOBSOLETE_I + INCLUDE "intuition/iobsolete.i" + ENDC + + ENDC diff --git a/extra/rtg_driver/include/intuition/icclass.i b/extra/rtg_driver/include/intuition/icclass.i new file mode 100644 index 00000000..2d81ce3d --- /dev/null +++ b/extra/rtg_driver/include/intuition/icclass.i @@ -0,0 +1,45 @@ + IFND INTUITION_ICCLASS_I +INTUITION_ICCLASS_I SET 1 +** +** $VER: icclass.i 38.2 (7.6.1993) +** Includes Release 45.1 +** +** Gadget/object interconnection classes +** +** (C) Copyright 1989-2001 Amiga, Inc. +** All Rights Reserved +** + + + IFND UTILITY_TAGITEM_I + INCLUDE "utility/tagitem.i" + ENDC + +ICM_SETLOOP EQU $402 ; set/increment loop counter +ICM_CLEARLOOP EQU $403 ; clear/decrement loop counter +ICM_CHECKLOOP EQU $404 ; set/increment loop + +* no arguments for ICM_SETLOOP, ICM_CLEARLOOP, ICM_CHECKLOOP + +* interconnection attributes used by icclass, modelclass, and gadgetclass + +ICA_Dummy EQU TAG_USER+$40000 +ICA_TARGET EQU (ICA_Dummy+1) ; interconnection target +ICA_MAP EQU (ICA_Dummy+2) ; interconnection map tagitem list +ICSPECIAL_CODE EQU (ICA_Dummy+3) ; a "pseudo-attribute", see below. + +* Normally, the value for ICA_TARGET is some object pointer, +* but if you specify the special value ICTARGET_IDCMP, notification +* will be send as an IDCMP_IDCMPUPDATE message to the appropriate window's +* IDCMP port. See the definition of IDCMP_IDCMPUPDATE. +* +* When you specify ICTARGET_IDCMP for ICA_TARGET, the map you +* specify will be applied to derive the attribute list that is +* sent with the IDCMP_IDCMPUPDATE message. If you specify a map list +* which results in the attribute tag id ICSPECIAL_CODE, the +* lower sixteen bits of the corresponding ti_Data value will +* be copied into the Code field of the IDCMP_IDCMPUPDATE IntuiMessage. + +ICTARGET_IDCMP EQU $ffffffff + + ENDC diff --git a/extra/rtg_driver/include/intuition/imageclass.i b/extra/rtg_driver/include/intuition/imageclass.i new file mode 100644 index 00000000..db122812 --- /dev/null +++ b/extra/rtg_driver/include/intuition/imageclass.i @@ -0,0 +1,232 @@ + IFND INTUITION_IMAGECLASS_I +INTUITION_IMAGECLASS_I SET 1 +** +** $VER: imageclass.i 44.1 (19.10.1999) +** Includes Release 45.1 +** +** Definitions for the image classes +** +** (C) Copyright 1989-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND INTUITION_INTUITION_I + INCLUDE "intuition/intuition.i" + ENDC + +* +* NOTE: intuition/iobsolete.i is included at the END of this file! +* + +CUSTOMIMAGEDEPTH EQU (-1) +* if image.Depth is this, it's a new Image class object + +****************************************************** +IMAGE_ATTRIBUTES EQU (TAG_USER+$20000) + +IA_Left EQU (IMAGE_ATTRIBUTES+$0001) +IA_Top EQU (IMAGE_ATTRIBUTES+$0002) +IA_Width EQU (IMAGE_ATTRIBUTES+$0003) +IA_Height EQU (IMAGE_ATTRIBUTES+$0004) +IA_FGPen EQU (IMAGE_ATTRIBUTES+$0005) + ; IA_FGPen also means "PlanePick" +IA_BGPen EQU (IMAGE_ATTRIBUTES+$0006) + ; IA_BGPen also means "PlaneOnOff" +IA_Data EQU (IMAGE_ATTRIBUTES+$0007) + ; bitplanes, for classic image, + ; other image classes may use it for other things +IA_LineWidth EQU (IMAGE_ATTRIBUTES+$0008) +IA_Pens EQU (IMAGE_ATTRIBUTES+$000E) + ; pointer to UWORD pens[], + ; ala DrawInfo.Pens, MUST be + ; terminated by ~0. Some classes can + ; choose to have this, or SYSIA_DrawInfo, + ; or both. +IA_Resolution EQU (IMAGE_ATTRIBUTES+$000F) + ; packed uwords for x/y resolution into a longword + ; ala DrawInfo.Resolution + +* see class documentation to learn which +* classes recognize these +IA_APattern EQU (IMAGE_ATTRIBUTES+$0010) +IA_APatSize EQU (IMAGE_ATTRIBUTES+$0011) +IA_Mode EQU (IMAGE_ATTRIBUTES+$0012) +IA_Font EQU (IMAGE_ATTRIBUTES+$0013) +IA_Outline EQU (IMAGE_ATTRIBUTES+$0014) +IA_Recessed EQU (IMAGE_ATTRIBUTES+$0015) +IA_DoubleEmboss EQU (IMAGE_ATTRIBUTES+$0016) +IA_EdgesOnly EQU (IMAGE_ATTRIBUTES+$0017) + +* "sysiclass" attributes +SYSIA_Size EQU (IMAGE_ATTRIBUTES+$000B) + ; EQU's below +SYSIA_Depth EQU (IMAGE_ATTRIBUTES+$000C) + ; this is unused by Intuition. SYSIA_DrawInfo + ; is used instead for V36 +SYSIA_Which EQU (IMAGE_ATTRIBUTES+$000D) + ; see EQU's below +SYSIA_DrawInfo EQU (IMAGE_ATTRIBUTES+$0018) + ; pass to sysiclass, please + +* obsolete: don't use these, use IA_Pens +SYSIA_Pens EQU IA_Pens +IA_ShadowPen EQU (IMAGE_ATTRIBUTES+$0009) +IA_HighlightPen EQU (IMAGE_ATTRIBUTES+$000A) + +* New for V39: +SYSIA_ReferenceFont EQU (IMAGE_ATTRIBUTES+$0019) + +IA_SupportsDisable EQU (IMAGE_ATTRIBUTES+$001a) + ; By default, Intuition ghosts gadgets itself, + ; instead of relying on IDS_DISABLED or + ; IDS_SELECTEDDISABLED. An imageclass that + ; supports these states should return this attribute + ; as TRUE. You cannot set or clear this attribute, + ; however. + +IA_FrameType EQU (IMAGE_ATTRIBUTES+$001b) + ; Starting with V39, FrameIClass recognizes + ; several standard types of frame. Use one + ; of the FRAME_ specifiers below. Defaults + ; to FRAME_DEFAULT. + + +IA_Underscore EQU (IMAGE_ATTRIBUTES+$001c) +IA_Scalable EQU (IMAGE_ATTRIBUTES+$001d) +IA_ActivateKey EQU (IMAGE_ATTRIBUTES+$001e) +IA_Screen EQU (IMAGE_ATTRIBUTES+$001f) +IA_Precision EQU (IMAGE_ATTRIBUTES+$0020) + +* next attribute: (IMAGE_ATTRIBUTES+$0021) +****************************************************** + +* data values for SYSIA_Size +SYSISIZE_MEDRES EQU (0) +SYSISIZE_LOWRES EQU (1) +SYSISIZE_HIRES EQU (2) + +* +* SYSIA_Which tag data values: +* Specifies which system gadget you want an image for. +* Some numbers correspond to internal Intuition #defines +DEPTHIMAGE EQU ($00) ; Window depth gadget image +ZOOMIMAGE EQU ($01) ; Window zoom gadget image +SIZEIMAGE EQU ($02) ; Window sizing gadget image +CLOSEIMAGE EQU ($03) ; Window close gadget image +SDEPTHIMAGE EQU ($05) ; Screen depth gadget image +LEFTIMAGE EQU ($0A) ; Left-arrow gadget image +UPIMAGE EQU ($0B) ; Up-arrow gadget image +RIGHTIMAGE EQU ($0C) ; Right-arrow gadget image +DOWNIMAGE EQU ($0D) ; Down-arrow gadget image +CHECKIMAGE EQU ($0E) ; GadTools checkbox image +MXIMAGE EQU ($0F) ; GadTools mutual exclude "button" image +* New for V39: +MENUCHECK EQU ($10) +AMIGAKEY EQU ($11) + +* Data values for IA_FrameType (recognized by FrameIClass) +* +* FRAME_DEFAULT: The standard V37-type frame, which has +* thin edges. +* FRAME_BUTTON: Standard button gadget frames, having thicker +* sides and nicely edged corners. +* FRAME_RIDGE: A ridge such as used by standard string gadgets. +* You can recess the ridge to get a groove image. +* FRAME_ICONDROPBOX: A broad ridge which is the standard imagery +* for areas in AppWindows where icons may be dropped. + +FRAME_DEFAULT EQU 0 +FRAME_BUTTON EQU 1 +FRAME_RIDGE EQU 2 +FRAME_ICONDROPBOX EQU 3 + +* image message id's +IM_DRAW EQU ($0202) ; draw yourself, with "state" +IM_HITTEST EQU ($0203) ; return TRUE if click hits image +IM_ERASE EQU ($0204) ; erase yourself +IM_MOVE EQU ($0205) ; draw new and erase old, smoothly + +IM_DRAWFRAME EQU ($0206) ; draw with specified dimensions +IM_FRAMEBOX EQU ($0207) ; get recommended frame around some box +IM_HITFRAME EQU ($0208) ; hittest with dimensions +IM_ERASEFRAME EQU ($0209) ; hittest with dimensions +IM_DOMAINFRAME EQU ($020A) + +* image draw states or styles, for IM_DRAW +* Note that they have no bitwise meanings (unfortunately) +IDS_NORMAL EQU (0) +IDS_SELECTED EQU (1) ; for selected gadgets +IDS_DISABLED EQU (2) ; for disabled gadgets +IDS_BUSY EQU (3) ; for future functionality +IDS_INDETERMINATE EQU (4) ; for future functionality +IDS_INACTIVENORMAL EQU (5) ; normal, in inactive window border +IDS_INACTIVESELECTED EQU (6) ; selected, in inactive border +IDS_INACTIVEDISABLED EQU (7) ; disabled, in inactive border +IDS_SELECTEDDISABLED EQU (8) + +* oops, please forgive spelling error by jimm +IDS_INDETERMINANT EQU IDS_INDETERMINATE + +* IM_FRAMEBOX + STRUCTURE impFrameBox,4 ; starts with ULONG MethodID + APTR impf_ContentsBox ; input: relative box of contents + APTR impf_FrameBox ; output: rel. box of encl frame + APTR impf_DrInfo ; NB: May be NULL + LONG impf_FrameFlags + +; Make do with the dimensions of FrameBox provided. +FRAMEB_SPECIFY EQU (0) +FRAMEF_SPECIFY EQU (1) + + +* IM_DRAW, IM_DRAWFRAME + STRUCTURE impDraw,4 ; starts with ULONG MethodID + APTR impd_RPort + WORD impd_OffsetX + WORD impd_OffsetY + ULONG impd_State + APTR impd_DrInfo ; NB: May be NULL + ; these parameters only valid for IM_DRAWFRAME + WORD impd_DimensionsWidth + WORD impd_DimensionsHeight + +* IM_ERASE, IM_ERASEFRAME +* NOTE: This is a subset of impDraw + STRUCTURE impErase,4 ; starts with ULONG MethodID + APTR impe_RPort + WORD impe_OffsetX + WORD impe_OffsetY + ; these parameters only valid for IM_ERASEFRAME + WORD impe_DimensionsWidth + WORD impe_DimensionsHeight + +* IM_HITTEST, IM_HITFRAME + STRUCTURE impHitTest,4 ; starts with ULONG MethodID + ; these parameters only valid for IM_ERASEFRAME + WORD imph_PointX + WORD imph_PointY + ; these parameters only valid for IM_HITFRAME + WORD imph_DimensionsWidth + WORD imph_DimensionsHeight + + +* IM_DOMAINFRAME + STRUCTURE impDomainFrame,4 + APTR impdo_DrInfo + APTR impdo_RPort + LONG impdo_Which + STRUCT impdo_Domain,ibox_SIZEOF + APTR impdo_Attrs + +IDOMAIN_MINIMUM EQU 0 +IDOMAIN_NOMINAL EQU 1 +IDOMAIN_MAXIMUM EQU 2 + + + +* Include obsolete identifiers: + IFND INTUITION_IOBSOLETE_I + INCLUDE "intuition/iobsolete.i" + ENDC + + ENDC diff --git a/extra/rtg_driver/include/intuition/intuition.i b/extra/rtg_driver/include/intuition/intuition.i new file mode 100644 index 00000000..74714987 --- /dev/null +++ b/extra/rtg_driver/include/intuition/intuition.i @@ -0,0 +1,1634 @@ + IFND INTUITION_INTUITION_I +INTUITION_INTUITION_I SET 1 +** +** $VER: intuition.i 38.26 (11.8.1993) +** Includes Release 45.1 +** +** Interface definitions for Intuition applications +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND GRAPHICS_GFX_I + INCLUDE "graphics/gfx.i" + ENDC + + IFND GRAPHICS_CLIP_I + INCLUDE "graphics/clip.i" + ENDC + + IFND GRAPHICS_VIEW_I + INCLUDE "graphics/view.i" + ENDC + + IFND GRAPHICS_RASTPORT_I + INCLUDE "graphics/rastport.i" + ENDC + + IFND GRAPHICS_LAYERS_I + INCLUDE "graphics/layers.i" + ENDC + + IFND GRAPHICS_TEXT_I + INCLUDE "graphics/text.i" + ENDC + + IFND EXEC_PORTS_I + INCLUDE "exec/ports.i" + ENDC + + IFND DEVICES_TIMER_I + INCLUDE "devices/timer.i" + ENDC + + IFND DEVICES_INPUTEVENT_I + INCLUDE "devices/inputevent.i" + ENDC + + IFND UTILITY_TAGITEM_I + INCLUDE "utility/tagitem.i" + ENDC + +* +* NOTE: intuition/iobsolete.i is included at the END of this file! +* + + +; ========================================================================; +; === Menu ===============================================================; +; ========================================================================; + STRUCTURE Menu,0 + + APTR mu_NextMenu ; menu pointer, same level + WORD mu_LeftEdge ; position of the select box + WORD mu_TopEdge ; position of the select box + WORD mu_Width ; dimensions of the select box + WORD mu_Height ; dimensions of the select box + WORD mu_Flags ; see flag definitions below + APTR mu_MenuName ; text for this Menu Header + APTR mu_FirstItem ; pointer to first in chain + + ; these mysteriously-named variables are for internal use only + WORD mu_JazzX + WORD mu_JazzY + WORD mu_BeatX + WORD mu_BeatY + + LABEL mu_SIZEOF + +;*** FLAGS SET BY BOTH THE APPLIPROG AND INTUITION *** +MENUENABLED EQU $0001 ; whether or not this menu is enabled + +;*** FLAGS SET BY INTUITION *** +MIDRAWN EQU $0100 ; this menu's items are currently drawn + +; ========================================================================; +; === MenuItem ===========================================================; +; ========================================================================; + STRUCTURE MenuItem,0 + + APTR mi_NextItem ; pointer to next in chained list + WORD mi_LeftEdge ; position of the select box + WORD mi_TopEdge ; position of the select box + WORD mi_Width ; dimensions of the select box + WORD mi_Height ; dimensions of the select box + WORD mi_Flags ; see the defines below + + LONG mi_MutualExclude ; set bits mean this item excludes that item + + APTR mi_ItemFill ; points to Image, IntuiText, or NULL + + ; when this item is pointed to by the cursor and the items highlight + ; mode HIGHIMAGE is selected, this alternate image will be displayed + APTR mi_SelectFill ; points to Image, IntuiText, or NULL + + BYTE mi_Command ; only if appliprog sets the COMMSEQ flag + + BYTE mi_KludgeFill00 ; This is strictly for word-alignment + + APTR mi_SubItem ; if non-zero, points to MenuItem for submenu + + ; The NextSelect field represents the menu number of next selected + ; item (when user has drag-selected several items) + WORD mi_NextSelect + + LABEL mi_SIZEOF + +; --- FLAGS SET BY THE APPLIPROG -------------------------------------------- +CHECKIT EQU $0001 ; set to indicate checkmarkable item +ITEMTEXT EQU $0002 ; set if textual, clear if graphical item +COMMSEQ EQU $0004 ; set if there's an command sequence +MENUTOGGLE EQU $0008 ; set for toggling checks (else mut. exclude) +ITEMENABLED EQU $0010 ; set if this item is enabled + +; these are the SPECIAL HIGHLIGHT FLAG state meanings +HIGHFLAGS EQU $00C0 ; see definitions below for these bits +HIGHIMAGE EQU $0000 ; use the user's "select image" +HIGHCOMP EQU $0040 ; highlight by complementing the select box +HIGHBOX EQU $0080 ; highlight by drawing a box around the image +HIGHNONE EQU $00C0 ; don't highlight + +; --- FLAGS SET BY BOTH APPLIPROG AND INTUITION ----------------------------- +CHECKED EQU $0100 ; state of the checkmark + + +; --- FLAGS SET BY INTUITION ------------------------------------------------ +ISDRAWN EQU $1000 ; this item's subs are currently drawn +HIGHITEM EQU $2000 ; this item is currently highlighted +MENUTOGGLED EQU $4000 ; this item was already toggled + + + + + + +; ======================================================================== +; === Requester ========================================================== +; ======================================================================== + STRUCTURE Requester,0 + + APTR rq_OlderRequest + WORD rq_LeftEdge ; dimensions of the entire box + WORD rq_TopEdge ; dimensions of the entire box + WORD rq_Width ; dimensions of the entire box + WORD rq_Height ; dimensions of the entire box + + WORD rq_RelLeft ; get POINTREL Pointer relativity offsets + WORD rq_RelTop ; get POINTREL Pointer relativity offsets + + APTR rq_ReqGadget ; pointer to the first of a list of gadgets + APTR rq_ReqBorder ; the box's border + APTR rq_ReqText ; the box's text + + WORD rq_Flags ; see definitions below + + UBYTE rq_BackFill ; pen number for back-plane fill before draws + + BYTE rq_KludgeFill00 ; This is strictly for word-alignment + + APTR rq_ReqLayer ; layer in which requester rendered + STRUCT rq_ReqPad1,32 ; for backwards compatibility (reserved) + + ; If the BitMap plane pointers are non-zero, this tells the system + ; that the image comes pre-drawn (if the appliprog wants to define + ; its own box, in any shape or size it wants!); this is OK by + ; Intuition as long as there's a good correspondence between the image + ; and the specified Gadgets + APTR rq_ImageBMap ; points to the BitMap of PREDRAWN imagery + + APTR rq_RWindow ; points back to requester's window + APTR rq_ReqImage ; new for V36: drawn if USEREQIMAGE set + STRUCT rq_ReqPad2,32 ; for backwards compatibility (reserved) + + LABEL rq_SIZEOF + +; FLAGS SET BY THE APPLIPROG +POINTREL EQU $0001 ; if POINTREL set, TopLeft is relative to pointer + ; for DMRequester, relative to window center + ; for Request(). +PREDRAWN EQU $0002 ; if ReqBMap points to predrawn Requester imagery +NOISYREQ EQU $0004 ; if you don't want requester to filter input + +; New for V36 +SIMPLEREQ EQU $0010 ; to use SIMPLEREFRESH layer (recommended) +USEREQIMAGE EQU $0020 ; render linked list ReqImage after BackFill + ; but before gadgets and text +NOREQBACKFILL EQU $0040 ; don't bother filling with Requester.BackFill + + +; FLAGS SET BY INTUITION; +REQOFFWINDOW EQU $1000 ; part of one of the Gadgets was offwindow +REQACTIVE EQU $2000 ; this requester is active +SYSREQUEST EQU $4000 ; (unused) this requester caused by system +DEFERREFRESH EQU $8000 ; this Requester stops a Refresh broadcast + + + + + +; ======================================================================== +; === Gadget ============================================================= +; ======================================================================== + STRUCTURE Gadget,0 + + APTR gg_NextGadget ; next gadget in the list + + WORD gg_LeftEdge ; "hit box" of gadget + WORD gg_TopEdge ; "hit box" of gadget + WORD gg_Width ; "hit box" of gadget + WORD gg_Height ; "hit box" of gadget + + WORD gg_Flags ; see below for list of defines + + WORD gg_Activation ; see below for list of defines + + WORD gg_GadgetType ; see below for defines + + ; appliprog can specify that the Gadget be rendered as either as Border + ; or an Image. This variable points to which (or equals NULL if there's + ; nothing to be rendered about this Gadget) + APTR gg_GadgetRender + + ; appliprog can specify "highlighted" imagery rather than algorithmic + ; this can point to either Border or Image data + APTR gg_SelectRender + + APTR gg_GadgetText ; text for this gadget; + + ; MutualExclude, never implemented, is now declared obsolete. + ; There are published examples of implementing a more general + ; and practical exclusion in your applications. + ; + ; Starting V36, this field is used to point to a hook + ; for a custom gadget. + ; + ; Programs using this field for their own processing will + ; continue to work, as long as they don't try the + ; trick with custom gadgets + LONG gg_MutualExclude ; obsolete + + ; pointer to a structure of special data required by Proportional, String + ; and Integer Gadgets + APTR gg_SpecialInfo + + WORD gg_GadgetID ; user-definable ID field + APTR gg_UserData ; ptr to general purpose User data (ignored by Intuit) + + LABEL gg_SIZEOF + + STRUCTURE ExtGadget,0 + + ; The first fields match struct Gadget exactly + APTR egg_NextGadget ; Matches struct Gadget + WORD egg_LeftEdge ; Matches struct Gadget + WORD egg_TopEdge ; Matches struct Gadget + WORD egg_Width ; Matches struct Gadget + WORD egg_Height ; Matches struct Gadget + WORD egg_Flags ; Matches struct Gadget + WORD egg_Activation ; Matches struct Gadget + WORD egg_GadgetType ; Matches struct Gadget + APTR egg_GadgetRender ; Matches struct Gadget + APTR egg_SelectRender ; Matches struct Gadget + APTR egg_GadgetText ; Matches struct Gadget + LONG egg_MutualExclude ; Matches struct Gadget + APTR egg_SpecialInfo ; Matches struct Gadget + WORD egg_GadgetID ; Matches struct Gadget + APTR egg_UserData ; Matches struct Gadget + + ; These fields only exist under V39 and only if GFLG_EXTENDED is set + ULONG egg_MoreFlags ; see GMORE_ flags below + WORD egg_BoundsLeftEdge ; Bounding extent for gadget, valid + WORD egg_BoundsTopEdge ; only if GMORE_BOUNDS is set. The + WORD egg_BoundsWidth ; GFLG_RELxxx flags affect these + WORD egg_BoundsHeight ; coordinates as well. + + LABEL egg_SIZEOF + +; --- Gadget.Flags values --- +; combinations in these bits describe the highlight technique to be used +GFLG_GADGHIGHBITS EQU $0003 +GFLG_GADGHCOMP EQU $0000 ; Complement the select box +GFLG_GADGHBOX EQU $0001 ; Draw a box around the image +GFLG_GADGHIMAGE EQU $0002 ; Blast in this alternate image +GFLG_GADGHNONE EQU $0003 ; don't highlight + +; set this flag if the GadgetRender and SelectRender point to Image imagery, +; clear if it's a Border +GFLG_GADGIMAGE EQU $0004 + +; combinations in these next two bits specify to which corner the gadget's +; Left & Top coordinates are relative. If relative to Top/Left, +; these are "normal" coordinates (everything is relative to something in +; this universe) +GFLG_RELBOTTOM EQU $0008 ; set if rel to bottom, clear if to top +GFLG_RELRIGHT EQU $0010 ; set if rel to right, clear if to left +; set the GFLG_RELWIDTH bit to spec that Width is relative to width of screen +GFLG_RELWIDTH EQU $0020 +; set the GFLG_RELHEIGHT bit to spec that Height is rel to height of screen +GFLG_RELHEIGHT EQU $0040 + +; New for V39: GFLG_RELSPECIAL allows custom gadget implementors to +; make gadgets whose position and size depend in an arbitrary way +; on their window's dimensions. The GM_LAYOUT method will be invoked +; for such a gadget (or any other GREL_xxx gadget) at suitable times, +; such as when the window opens or the window's size changes. +GFLG_RELSPECIAL EQU $4000 ; custom gadget has special relativity. + ; Gadget box values are absolutes, but + ; can be changed via the GM_LAYOUT method. + +; the GFLG_SELECTED flag is initialized by you and set by Intuition. It +; specifies whether or not this Gadget is currently selected/highlighted +GFLG_SELECTED EQU $0080 + + +; the GFLG_DISABLED flag is initialized by you and later set by Intuition +; according to your calls to On/OffGadget(). It specifies whether or not +; this Gadget is currently disabled from being selected +GFLG_DISABLED EQU $0100 + +* These flags specify the type of text field that Gadget.GadgetText +* points to. In all normal (pre-V36) gadgets which you initialize +* this field should always be zero. Some types of gadget objects +* created from classes will use these fields to keep track of +* types of labels/contents that different from IntuiText, but are +* stashed in GadgetText. + +GFLG_LABELMASK EQU $3000 +GFLG_LABELITEXT EQU $0000 ; GadgetText points to IntuiText +GFLG_LABELSTRING EQU $1000 ; GadgetText points to (UBYTE *) +GFLG_LABELIMAGE EQU $2000 ; GadgetText points to Image (object) +; New for V37: GFLG_TABCYCLE +GFLG_TABCYCLE EQU $0200 ; (string or custom) gadget + ; participates in cycling activation with + ; Tab or Shift-Tab + +; New for V37: GFLG_STRINGEXTEND. We discovered that V34 doesn't properly +; ignore the value we had chosen for the Gadget->Activation flag +; GACT_STRINGEXTEND. NEVER SET THAT FLAG WHEN RUNNING UNDER V34. +; The Gadget->Flags bit GFLG_STRINGEXTEND is provided as a synonym which is +; safe under V34, and equivalent to GACT_STRINGEXTEND under V37. +; (Note that the two flags are not numerically equal) +GFLG_STRINGEXTEND EQU $0400 ; this String Gadget has StringExtend + +; New for V39: GFLG_IMAGEDISABLE. This flag is automatically set if +; the custom image of this gadget knows how to do disabled rendering +; (more specifically, if its IA_SupportsDisable attribute is TRUE). +; Intuition uses this to defer the ghosting to the image-class, +; instead of doing it itself (the old compatible way). +; Do not set this flag yourself - Intuition will do it for you. + +GFLG_IMAGEDISABLE EQU $0800 ; Gadget's image knows how to do disabled + ; rendering + +; New for V39: If set, this bit means that the Gadget is actually +; a struct ExtGadget, with new fields and flags. All V39 boopsi +; gadgets are ExtGadgets. Never ever attempt to read the extended +; fields of a gadget if this flag is not set. + +GFLG_EXTENDED EQU $8000 ; Gadget is extended + + + +; --- These are the Activation flag bits ---------------------------------- +; GACT_RELVERIFY is set if you want to verify that the pointer was still over +; the gadget when the select button was released. Will cause +; an IDCMP_GADGETUP message to be sent if so. +GACT_RELVERIFY EQU $0001 + +; the flag GACT_IMMEDIATE, when set, informs the caller that the gadget +; was activated when it was activated. this flag works in conjunction with +; the GACT_RELVERIFY flag +GACT_IMMEDIATE EQU $0002 + +; the flag GACT_ENDGADGET, when set, tells the system that this gadget, when +; selected, causes the Requester or AbsMessage to be ended. Requesters or +; AbsMessages that are ended are erased and unlinked from the system +GACT_ENDGADGET EQU $0004 + +; the GACT_FOLLOWMOUSE flag, when set, specifies that you want to receive +; reports on mouse movements while this gadget is active. +; You probably want to set the GACT_IMMEDIATE flag when using +; GACT_FOLLOWMOUSE, since that's the only reasonable way you have of learning +; why Intuition is suddenly sending you a stream of mouse movement events. +; If you don't set GACT_RELVERIFY, you'll get at least one Mouse Position +; event. +; Note: boolean FOLLOWMOUSE gadgets require GACT_RELVERIFY to get +; _any_ mouse movement events (this unusual behavior is a compatibility +; hold-over from the old days). + +GACT_FOLLOWMOUSE EQU $0008 + +; if any of the BORDER flags are set in a Gadget that's included in the +; Gadget list when a Window is opened, the corresponding Border will +; be adjusted to make room for the Gadget +GACT_RIGHTBORDER EQU $0010 +GACT_LEFTBORDER EQU $0020 +GACT_TOPBORDER EQU $0040 +GACT_BOTTOMBORDER EQU $0080 +GACT_BORDERSNIFF EQU $8000 ; neither set nor rely on this bit + +GACT_TOGGLESELECT EQU $0100 ; this bit for toggle-select mode +GACT_BOOLEXTEND EQU $2000 ; This Boolean Gadget has a BoolInfo + +; should properly be in StringInfo, but aren't +GACT_STRINGLEFT EQU $0000 ; NOTE WELL: that this has value zero +GACT_STRINGCENTER EQU $0200 ; center the String +GACT_STRINGRIGHT EQU $0400 ; right-justify the String +GACT_LONGINT EQU $0800 ; This String Gadget is a Long Integer +GACT_ALTKEYMAP EQU $1000 ; has an alternate keymapping +GACT_STRINGEXTEND EQU $2000 ; this String Gadget has an extension + ; NOTE: NEVER SET GACT_STRINGEXTEND + ; IF YOU ARE RUNNING ON LESS THAN V36! + ; SEE GFLG_STRINGEXTEND (ABOVE) INSTEAD + +GACT_ACTIVEGADGET EQU $4000 ; this gadget is "active". This flag + ; is maintained by Intuition, and you + ; cannot count on its value persisting + ; while you do something on your program's + ; task. It can only be trusted by + ; people implementing custom gadgets + +* note $8000 is used above (GACT_BORDERSNIFF); all Activation flags defined + + + +; --- GADGET TYPES ----------------------------------------------------------- +; These are the Gaget Type definitions for the variable GadgetType. +; Gadget number type MUST start from one. NO TYPES OF ZERO ALLOWED. +; first comes the mask for Gadget flags reserved for Gadget typing +GTYP_GADGETTYPE EQU $FC00 ; all Gadget Global Type flags + ; (padded) +GTYP_SCRGADGET EQU $4000 ; 1 = ScreenGadget, 0 = WindowGadget +GTYP_GZZGADGET EQU $2000 ; 1 = Gadget for WFLG_GIMMEZEROZERO + ; borders +GTYP_REQGADGET EQU $1000 ; 1 = this is a Requester Gadget + +; GTYP_SYSGADGET means that Intuition ALLOCATED the gadget. +; GTYP_SYSTYPEMASK is the mask you can apply to tell what type of +; system-gadget it is. The possible types follow. +GTYP_SYSGADGET EQU $8000 +GTYP_SYSTYPEMASK EQU $00F0 + +; These definitions describe system gadgets in V36 and higher: +GTYP_SIZING EQU $0010 ; Window sizing gadget +GTYP_WDRAGGING EQU $0020 ; Window drag bar +GTYP_SDRAGGING EQU $0030 ; Screen drag bar +GTYP_WDEPTH EQU $0040 ; Window depth gadget +GTYP_SDEPTH EQU $0050 ; Screen depth gadget +GTYP_WZOOM EQU $0060 ; Window zoom gadget +GTYP_SUNUSED EQU $0070 ; Unused screen gadget +GTYP_CLOSE EQU $0080 ; Window close gadget + +; These definitions describe system gadgets prior to V36: +GTYP_WUPFRONT EQU GTYP_WDEPTH ; Window to-front gadget +GTYP_SUPFRONT EQU GTYP_SDEPTH ; Screen to-front gadget +GTYP_WDOWNBACK EQU GTYP_WZOOM ; Window to-back gadget +GTYP_SDOWNBACK EQU GTYP_SUNUSED ; Screen to-back gadget + +; GTYP_GTYPEMASK is a mask you can apply to tell what class +; of gadget this is. The possible classes follow. +GTYP_GTYPEMASK EQU $0007 + +GTYP_BOOLGADGET EQU $0001 +GTYP_GADGET0002 EQU $0002 +GTYP_PROPGADGET EQU $0003 +GTYP_STRGADGET EQU $0004 +GTYP_CUSTOMGADGET EQU $0005 + +; New for V39. Gadgets which have the GFLG_EXTENDED flag set are +; actually ExtGadgets, which have more flags. The GMORE_xxx +; identifiers describe those flags. For GMORE_SCROLLRASTER, see +; important information in the ScrollWindowRaster() autodoc. +; NB: GMORE_SCROLLRASTER must be set before the gadget is +; added to a window. + +GMORE_BOUNDS EQU $00000001 ; ExtGadget has valid Bounds +GMORE_GADGETHELP EQU $00000002 ; This gadget responds to gadget help +GMORE_SCROLLRASTER EQU $00000004 ; This (custom) gadget uses ScrollRaster + + + +; ======================================================================== +; === BoolInfo============================================================ +; ======================================================================== +; This is the special data needed by an Extended Boolean Gadget +; Typically this structure will be pointed to by the Gadget field SpecialInfo + + STRUCTURE BoolInfo,0 + + WORD bi_Flags ; defined below + APTR bi_Mask ; bit mask for highlighting and selecting + ; mask must follow the same rules as an Image + ; plane. Its width and height are determined + ; by the width and height of the gadget's + ; select box. (i.e. Gadget.Width and .Height). + LONG bi_Reserved ; set to 0 + + LABEL bi_SIZEOF + +; set BoolInfo.Flags to this flag bit. +; in the future, additional bits might mean more stuff hanging +; off of BoolInfo.Reserved. + +BOOLMASK EQU $0001 ; extension is for masked gadget + +; ======================================================================== +; === PropInfo =========================================================== +; ======================================================================== +; this is the special data required by the proportional Gadget +; typically, this data will be pointed to by the Gadget variable SpecialInfo + STRUCTURE PropInfo,0 + + WORD pi_Flags ; general purpose flag bits (see defines below) + + ; You initialize the Pot variables before the Gadget is added to + ; the system. Then you can look here for the current settings + ; any time, even while User is playing with this Gadget. To + ; adjust these after the Gadget is added to the System, use + ; ModifyProp(); The Pots are the actual proportional settings, + ; where a value of zero means zero and a value of MAXPOT means + ; that the Gadget is set to its maximum setting. + WORD pi_HorizPot ; 16-bit FixedPoint horizontal quantity percentage; + WORD pi_VertPot ; 16-bit FixedPoint vertical quantity percentage; + + ; the 16-bit FixedPoint Body variables describe what percentage + ; of the entire body of stuff referred to by this Gadget is + ; actually shown at one time. This is used with the AUTOKNOB + ; routines, to adjust the size of the AUTOKNOB according to how + ; much of the data can be seen. This is also used to decide how + ; far to advance the Pots when User hits the Container of the Gadget. + ; For instance, if you were controlling the display of a 5-line + ; Window of text with this Gadget, and there was a total of 15 + ; lines that could be displayed, you would set the VertBody value to + ; (MAXBODY / (TotalLines / DisplayLines)) = MAXBODY / 3. + ; Therefore, the AUTOKNOB would fill 1/3 of the container, and if + ; User hits the Cotainer outside of the knob, the pot would advance + ; 1/3 (plus or minus) If there's no body to show, or the total + ; amount of displayable info is less than the display area, set the + ; Body variables to the MAX. To adjust these after the Gadget is + ; added to the System, use ModifyProp(). + WORD pi_HorizBody ; horizontal Body + WORD pi_VertBody ; vertical Body + + ; these are the variables that Intuition sets and maintains + WORD pi_CWidth ; Container width (with any relativity absoluted) + WORD pi_CHeight ; Container height (with any relativity absoluted) + WORD pi_HPotRes ; pot increments + WORD pi_VPotRes ; pot increments + WORD pi_LeftBorder ; Container borders + WORD pi_TopBorder ; Container borders + LABEL pi_SIZEOF + +; --- FLAG BITS -------------------------------------------------------------- +AUTOKNOB EQU $0001 ; this flag sez: gimme that old auto-knob +FREEHORIZ EQU $0002 ; if set, the knob can move horizontally +FREEVERT EQU $0004 ; if set, the knob can move vertically +PROPBORDERLESS EQU $0008 ; if set, no border will be rendered +KNOBHIT EQU $0100 ; set when this Knob is hit +PROPNEWLOOK EQU $0010 ; set this if you want to get the new + ; V36 look + +KNOBHMIN EQU 6 ; minimum horizontal size of the knob +KNOBVMIN EQU 4 ; minimum vertical size of the knob +MAXBODY EQU $FFFF ; maximum body value +MAXPOT EQU $FFFF ; maximum pot value + + +; ======================================================================== +; === StringInfo ========================================================= +; ======================================================================== +; this is the special data required by the string Gadget +; typically, this data will be pointed to by the Gadget variable SpecialInfo + STRUCTURE StringInfo,0 + + ; you initialize these variables, and then Intuition maintains them + APTR si_Buffer ; the buffer containing the start and final string + APTR si_UndoBuffer ; optional buffer for undoing current entry + WORD si_BufferPos ; character position in Buffer + WORD si_MaxChars ; max number of chars in Buffer (including NULL) + WORD si_DispPos ; Buffer position of first displayed character + + ; Intuition initializes and maintains these variables for you + WORD si_UndoPos ; character position in the undo buffer + WORD si_NumChars ; number of characters currently in Buffer + WORD si_DispCount ; number of whole characters visible in Container + WORD si_CLeft ; topleft offset of the container + WORD si_CTop ; topleft offset of the container + + ; unused field is changed to allow extended specification + ; of string gadget parameters. It is ignored unless the flag + ; GACT_STRINGEXTEND is set in the Gadget's Activation field + ; or the GFLG_STRINGEXTEND flag is set in the Gadget Flags field. + ; (See GFLG_STRINGEXTEND for an important note) + ;APTR si_LayerPtr ; --- obsolete --- + APTR si_Extension + + ; you can initialize this variable before the gadget is submitted to + ; Intuition, and then examine it later to discover what integer + ; the user has entered (if the user never plays with the gadget, + ; the value will be unchanged from your initial setting) + LONG si_LongInt ; the LONG return value of a GACT_LONGINT String Gad. + + ; If you want this Gadget to use your own Console keymapping, you + ; set the GACT_ALTKEYMAP bit in the Activation flags of the Gadget, and + ; then set this variable to point to your keymap. If you don't set the + ; GACT_ALTKEYMAP, you'll get the standard ASCII keymapping. + APTR si_AltKeyMap + + LABEL si_SIZEOF + + + + +; ======================================================================== +; === IntuiText ========================================================== +; ======================================================================== +; IntuiText is a series of strings that start with a location +; (always relative to the upper-left corner of something) and then the +; text of the string. The text is null-terminated. + STRUCTURE IntuiText,0 + + BYTE it_FrontPen ; the pens for rendering the text + BYTE it_BackPen ; the pens for rendering the text + + BYTE it_DrawMode ; the mode for rendering the text + + BYTE it_KludgeFill00 ; This is strictly for word-alignment + + WORD it_LeftEdge ; relative start location for the text + WORD it_TopEdge ; relative start location for the text + + APTR it_ITextFont ; if NULL, you accept the defaults + + APTR it_IText ; pointer to null-terminated text + + APTR it_NextText ; pointer to another IntuiText to render + + LABEL it_SIZEOF + + + + + +; ======================================================================== +; === Border ============================================================= +; ======================================================================== +; Data type Border, used for drawing a series of lines which is intended for +; use as a border drawing, but which may, in fact, be used to render any +; arbitrary vector shape. +; The routine DrawBorder sets up the RastPort with the appropriate +; variables, then does a Move to the first coordinate, then does Draws +; to the subsequent coordinates. +; After all the Draws are done, if NextBorder is non-zero we call DrawBorder +; on NextBorder + STRUCTURE Border,0 + + WORD bd_LeftEdge ; initial offsets from the origin + WORD bd_TopEdge ; initial offsets from the origin + BYTE bd_FrontPen ; pen number for rendering + BYTE bd_BackPen ; pen number for rendering + BYTE bd_DrawMode ; mode for rendering + BYTE bd_Count ; number of XY pairs + APTR bd_XY ; vector coordinate pairs rel to LeftTop + APTR bd_NextBorder ; pointer to any other Border too + + LABEL bd_SIZEOF + + +; ======================================================================== +; === Image ============================================================== +; ======================================================================== +; This is a brief image structure for very simple transfers of +; image data to a RastPort + STRUCTURE Image,0 + + WORD ig_LeftEdge ; starting offset relative to something + WORD ig_TopEdge ; starting offset relative to something + WORD ig_Width ; pixel size (though data is word-aligned) + WORD ig_Height ; pixel size + WORD ig_Depth ; pixel size + APTR ig_ImageData ; pointer to the actual image bits + + ; the PlanePick and PlaneOnOff variables work much the same way as the + ; equivalent GELS Bob variables. It's a space-saving + ; mechanism for image data. Rather than defining the image data + ; for every plane of the RastPort, you need define data only for planes + ; that are not entirely zero or one. As you define your Imagery, you will + ; often find that most of the planes ARE just as color selectors. For + ; instance, if you're designing a two-color Gadget to use colors two and + ; three, and the Gadget will reside in a five-plane display, plane zero + ; of your imagery would be all ones, bit plane one would have data that + ; describes the imagery, and bit planes two through four would be + ; all zeroes. Using these flags allows you to avoid wasting all that + ; memory in this way: + ; first, you specify which planes you want your data to appear + ; in using the PlanePick variable. For each bit set in the variable, the + ; next "plane" of your image data is blitted to the display. For each bit + ; clear in this variable, the corresponding bit in PlaneOnOff is examined. + ; If that bit is clear, a "plane" of zeroes will be used. If the bit is + ; set, ones will go out instead. So, for our example: + ; Gadget.PlanePick = 0x02; + ; Gadget.PlaneOnOff = 0x01; + ; Note that this also allows for generic Gadgets, like the System Gadgets, + ; which will work in any number of bit planes + ; Note also that if you want an Image that is only a filled rectangle, + ; you can get this by setting PlanePick to zero (pick no planes of data) + ; and set PlaneOnOff to describe the pen color of the rectangle. + ; + ; NOTE: Intuition relies on PlanePick to know how many planes + ; of data are found in ImageData. There should be no more + ; '1'-bits in PlanePick than there are planes in ImageData. + BYTE ig_PlanePick + BYTE ig_PlaneOnOff + + ; if the NextImage variable is not NULL, Intuition presumes that + ; it points to another Image structure with another Image to be + ; rendered + APTR ig_NextImage + + + LABEL ig_SIZEOF + + + + +; ======================================================================== +; === IntuiMessage ======================================================= +; ======================================================================== + STRUCTURE IntuiMessage,0 + + STRUCT im_ExecMessage,MN_SIZE + + ; the Class bits correspond directly with the IDCMP Flags, except for the + ; special bit IDCMP_LONELYMESSAGE (defined below) + LONG im_Class + + ; the Code field is for special values like MENU number + WORD im_Code + + ; the Qualifier field is a copy of the current InputEvent's Qualifier + WORD im_Qualifier + + ; IAddress contains particular addresses for Intuition functions, like + ; the pointer to the Gadget or the Screen + APTR im_IAddress + + ; when getting mouse movement reports, any event you get will have the + ; the mouse coordinates in these variables. the coordinates are relative + ; to the upper-left corner of your Window (WFLG_GIMMEZEROZERO + ; notwithstanding) + ; If the DELTAMOVE IDCMP flag is set, these values will be deltas from + ; the last reported position. + WORD im_MouseX + WORD im_MouseY + + ; the time values are copies of the current system clock time. Micros + ; are in units of microseconds, Seconds in seconds. + LONG im_Seconds + LONG im_Micros + + ; the IDCMPWindow variable will always have the address of the Window of + ; this IDCMP + APTR im_IDCMPWindow + + ; system-use variable + APTR im_SpecialLink + + LABEL im_SIZEOF + +* New for V39: +* All IntuiMessages are now slightly extended. The ExtIntuiMessage +* structure has an additional field for tablet data, which is usually +* NULL. If a tablet driver which is sending IESUBCLASS_NEWTABLET +* events is installed in the system, windows with the WA_TabletMessages +* property set will find that eim_TabletData points to the TabletData +* structure. Applications must first check that this field is non-NULL; +* it will be NULL for certain kinds of message, including mouse activity +* generated from other than the tablet (i.e. the keyboard equivalents +* or the mouse itself). +* +* NEVER EVER examine any extended fields when running under pre-V39! +* +* NOTE: This structure is subject to grow in the future. Making +* assumptions about its size is A BAD IDEA. + + STRUCTURE ExtIntuiMessage,0 + + STRUCT eim_IntuiMessage,im_SIZEOF + APTR eim_TabletData + + +; --- IDCMP Classes ------------------------------------------------------ +; Please refer to the Autodoc for OpenWindow() and to the Rom Kernel +; Manual for full details on the IDCMP classes. + +IDCMP_SIZEVERIFY EQU $00000001 +IDCMP_NEWSIZE EQU $00000002 +IDCMP_REFRESHWINDOW EQU $00000004 +IDCMP_MOUSEBUTTONS EQU $00000008 +IDCMP_MOUSEMOVE EQU $00000010 +IDCMP_GADGETDOWN EQU $00000020 +IDCMP_GADGETUP EQU $00000040 +IDCMP_REQSET EQU $00000080 +IDCMP_MENUPICK EQU $00000100 +IDCMP_CLOSEWINDOW EQU $00000200 +IDCMP_RAWKEY EQU $00000400 +IDCMP_REQVERIFY EQU $00000800 +IDCMP_REQCLEAR EQU $00001000 +IDCMP_MENUVERIFY EQU $00002000 +IDCMP_NEWPREFS EQU $00004000 +IDCMP_DISKINSERTED EQU $00008000 +IDCMP_DISKREMOVED EQU $00010000 +IDCMP_WBENCHMESSAGE EQU $00020000 ; System use only +IDCMP_ACTIVEWINDOW EQU $00040000 +IDCMP_INACTIVEWINDOW EQU $00080000 +IDCMP_DELTAMOVE EQU $00100000 +IDCMP_VANILLAKEY EQU $00200000 +IDCMP_INTUITICKS EQU $00400000 +; for notifications from "boopsi" gadgets: +IDCMP_IDCMPUPDATE EQU $00800000 ; new for V36 +; for getting help key report during menu session: +IDCMP_MENUHELP EQU $01000000 ; new for V36 +; for notification of any move/size/zoom/change window: +IDCMP_CHANGEWINDOW EQU $02000000 ; new for V36 +IDCMP_GADGETHELP EQU $04000000 ; new for V39 + +; NOTEZ-BIEN: $80000000 is reserved for internal use by IDCMP + +; the IDCMP Flags do not use this special bit, which is cleared when +; Intuition sends its special message to the Task, and set when Intuition +; gets its Message back from the Task. Therefore, I can check here to +; find out fast whether or not this Message is available for me to send +IDCMP_LONELYMESSAGE EQU $80000000 + + + +; --- IDCMP Codes -------------------------------------------------------- +; This group of codes is for the IDCMP_CHANGEWINDOW message +CWCODE_MOVESIZE EQU $0000 ; Window was moved and/or sized +CWCODE_DEPTH EQU $0001 ; Window was depth-arranged (new for V39) + +; This group of codes is for the IDCMP_MENUVERIFY message +MENUHOT EQU $0001 ; IntuiWants verification or MENUCANCEL +MENUCANCEL EQU $0002 ; HOT Reply of this cancels Menu operation +MENUWAITING EQU $0003 ; Intuition simply wants a ReplyMsg() ASAP + +; These are internal tokens to represent state of verification attempts +; shown here as a clue. +OKOK EQU MENUHOT ; guy didn't care +OKABORT EQU $0004 ; window rendered question moot +OKCANCEL EQU MENUCANCEL ; window sent cancel reply + +; This group of codes is for the IDCMP_WBENCHMESSAGE messages +WBENCHOPEN EQU $0001 +WBENCHCLOSE EQU $0002 + +; A data structure common in V36 Intuition processing + + STRUCTURE IBox,0 + WORD ibox_Left + WORD ibox_Top + WORD ibox_Width + WORD ibox_Height + LABEL ibox_SIZEOF + + +; ======================================================================== +; === Window ============================================================= +; ======================================================================== + STRUCTURE Window,0 + + APTR wd_NextWindow ; for the linked list of a Screen + + WORD wd_LeftEdge ; screen dimensions + WORD wd_TopEdge ; screen dimensions + WORD wd_Width ; screen dimensions + WORD wd_Height ; screen dimensions + + WORD wd_MouseY ; relative top top-left corner + WORD wd_MouseX ; relative top top-left corner + + WORD wd_MinWidth ; minimum sizes + WORD wd_MinHeight ; minimum sizes + WORD wd_MaxWidth ; maximum sizes + WORD wd_MaxHeight ; maximum sizes + + LONG wd_Flags ; see below for definitions + + APTR wd_MenuStrip ; first in a list of menu headers + + APTR wd_Title ; title text for the Window + + APTR wd_FirstRequest ; first in linked list of active Requesters + APTR wd_DMRequest ; the double-menu Requester + WORD wd_ReqCount ; number of Requesters blocking this Window + APTR wd_WScreen ; this Window's Screen + APTR wd_RPort ; this Window's very own RastPort + + ; the border variables describe the window border. If you specify + ; WFLG_GIMMEZEROZERO when you open the window, then the upper-left of the + ; ClipRect for this window will be upper-left of the BitMap (with correct + ; offsets when in SuperBitMap mode; you MUST select WFLG_GIMMEZEROZERO + ; when using SuperBitMap). If you don't specify ZeroZero, then you save + ; memory (no allocation of RastPort, Layer, ClipRect and associated + ; Bitmaps), but you also must offset all your writes by BorderTop, + ; BorderLeft and do your own mini-clipping to prevent writing over the + ; system gadgets + BYTE wd_BorderLeft + BYTE wd_BorderTop + BYTE wd_BorderRight + BYTE wd_BorderBottom + APTR wd_BorderRPort + + ; You supply a linked-list of gadget that you want for your Window. + ; This list DOES NOT include system Gadgets. You get the standard + ; window system Gadgets by setting flag-bits in the variable Flags (see + ; the bit definitions below) + APTR wd_FirstGadget + + ; these are for opening/closing the windows + APTR wd_Parent + APTR wd_Descendant + + ; sprite data information for your own Pointer + ; set these AFTER you Open the Window by calling SetPointer() + APTR wd_Pointer + BYTE wd_PtrHeight + BYTE wd_PtrWidth + BYTE wd_XOffset + BYTE wd_YOffset + + ; the IDCMP Flags and User's and Intuition's Message Ports + ULONG wd_IDCMPFlags + APTR wd_UserPort + APTR wd_WindowPort + APTR wd_MessageKey + + BYTE wd_DetailPen + BYTE wd_BlockPen + + ; the CheckMark is a pointer to the imagery that will be used when + ; rendering MenuItems of this Window that want to be checkmarked + ; if this is equal to NULL, you'll get the default imagery + APTR wd_CheckMark + + ; if non-null, Screen title when Window is active + APTR wd_ScreenTitle + + ; These variables have the mouse coordinates relative to the + ; inner-Window of WFLG_GIMMEZEROZERO Windows. This is compared with the + ; MouseX and MouseY variables, which contain the mouse coordinates + ; relative to the upper-left corner of the Window, WFLG_GIMMEZEROZERO + ; notwithstanding + WORD wd_GZZMouseX + WORD wd_GZZMouseY + ; these variables contain the width and height of the inner-Window of + ; WFLG_GIMMEZEROZERO Windows + WORD wd_GZZWidth + WORD wd_GZZHeight + + APTR wd_ExtData + + ; general-purpose pointer to User data extension + APTR wd_UserData + APTR wd_WLayer ; stash of Window.RPort->Layer + + ; NEW 1.2: need to keep track of the font that OpenWindow opened, + ; in case user SetFont's into RastPort + APTR wd_IFont + + ; (V36) another flag word (the Flags field is used up). + ; At present, all flag values are system private. + ; Until further notice, you may not change nor use this field. + ULONG wd_MoreFlags + + ; ----- subsequent fields are INTUITION PRIVATE --- + + LABEL wd_Size + LABEL wd_SIZEOF ; you should never use this: only Intuition allocates + +; --- Flags requested at OpenWindow() time by the application ------------- +WFLG_SIZEGADGET EQU $0001 ; include sizing system-gadget? +WFLG_DRAGBAR EQU $0002 ; include dragging system-gadget? +WFLG_DEPTHGADGET EQU $0004 ; include depth arrangement gadget? +WFLG_CLOSEGADGET EQU $0008 ; include close-box system-gadget? + +WFLG_SIZEBRIGHT EQU $0010 ; size gadget uses right border +WFLG_SIZEBBOTTOM EQU $0020 ; size gadget uses bottom border + +; --- refresh modes ---------------------------------------------------------- +; combinations of the WFLG_REFRESHBITS select the refresh type +WFLG_REFRESHBITS EQU $00C0 +WFLG_SMART_REFRESH EQU $0000 +WFLG_SIMPLE_REFRESH EQU $0040 +WFLG_SUPER_BITMAP EQU $0080 +WFLG_OTHER_REFRESH EQU $00C0 + +WFLG_BACKDROP EQU $0100 ; this is a backdrop window + +WFLG_REPORTMOUSE EQU $0200 ; set this to hear every mouse move + +WFLG_GIMMEZEROZERO EQU $0400 ; make extra border stuff + +WFLG_BORDERLESS EQU $0800 ; set this to get a Window sans border + +WFLG_ACTIVATE EQU $1000 ; when Window opens, it's the Active + ; one + +; --- Other User Flags ------------------------------------------------------- +WFLG_RMBTRAP EQU $00010000 ; Catch RMB events for your own +WFLG_NOCAREREFRESH EQU $00020000 ; not to be bothered with REFRESH + +; - V36 new Flags which the programmer may specify in NewScreen.Flags +WFLG_NW_EXTENDED EQU $00040000 ; extension data provided + ; see ExtNewWindow structure +; - V39 new Flags which the programmer may specify in NewScreen.Flags +WFLG_NEWLOOKMENUS EQU $00200000 ; window has NewLook menus + + +; These flags are set only by Intuition. YOU MAY NOT SET THEM YOURSELF! +WFLG_WINDOWACTIVE EQU $2000 ; this window is the active one +WFLG_INREQUEST EQU $4000 ; this window is in request mode +WFLG_MENUSTATE EQU $8000 ; this Window is active with its + ; Menus on +WFLG_WINDOWREFRESH EQU $01000000 ; Window is currently refreshing +WFLG_WBENCHWINDOW EQU $02000000 ; WorkBench Window +WFLG_WINDOWTICKED EQU $04000000 ; only one timer tick at a time + +; V36 and higher flags to be set only by Intuition: +WFLG_VISITOR EQU $08000000 ; visitor window (see autodoc for OpenWindow) +WFLG_ZOOMED EQU $10000000 ; identifies "zoom state" +WFLG_HASZOOM EQU $20000000 ; window has a zoom gadget + + +SUPER_UNUSED EQU $FCFC0000 ; OBSOLETE (was bits of Flag unused yet) + + +; --- Other Window Values ---------------------------------------------- +DEFAULTMOUSEQUEUE EQU 5 ; no more mouse messages + + +; --- see struct IntuiMessage for the IDCMP Flag definitions ----------------- + + +; ======================================================================== +; === NewWindow ========================================================== +; ======================================================================== +; NOTE: to use the new features of V36, you may need to use the +; ExtNewWindow structure, below. + STRUCTURE NewWindow,0 + + WORD nw_LeftEdge ; initial Window dimensions + WORD nw_TopEdge ; initial Window dimensions + WORD nw_Width ; initial Window dimensions + WORD nw_Height ; initial Window dimensions + + BYTE nw_DetailPen ; for rendering the detail bits of the Window + BYTE nw_BlockPen ; for rendering the block-fill bits + + LONG nw_IDCMPFlags ; initial IDCMP state + + LONG nw_Flags ; see the Flag definition under Window + + ; You supply a linked-list of Gadgets for your Window. + ; This list DOES NOT include system Gadgets. You get the standard + ; system Window Gadgets by setting flag-bits in the variable Flags (see + ; the bit definitions under the Window structure definition) + APTR nw_FirstGadget + + ; the CheckMark is a pointer to the imagery that will be used when + ; rendering MenuItems of this Window that want to be checkmarked + ; if this is equal to NULL, you'll get the default imagery + APTR nw_CheckMark + + APTR nw_Title ; title text for the Window + + ; the Screen pointer is used only if you've defined a CUSTOMSCREEN and + ; want this Window to open in it. If so, you pass the address of the + ; Custom Screen structure in this variable. Otherwise, this variable + ; is ignored and doesn't have to be initialized. + APTR nw_Screen + + ; WFLG_SUPER_BITMAP Window? If so, put the address of your BitMap + ; structure in this variable. If not, this variable is ignored and + ; doesn't have to be initialized + APTR nw_BitMap + + ; the values describe the minimum and maximum sizes of your Windows. + ; these matter only if you've chosen the WFLG_SIZEGADGET Gadget option, + ; which means that you want to let the User to change the size of + ; this Window. You describe the minimum and maximum sizes that the + ; Window can grow by setting these variables. You can initialize + ; any one these to zero, which will mean that you want to duplicate + ; the setting for that dimension (if MinWidth == 0, MinWidth will be + ; set to the opening Width of the Window). + ; You can change these settings later using SetWindowLimits(). + ; If you haven't asked for a GTYP_SIZING Gadget, you don't have to + ; initialize any of these variables. + WORD nw_MinWidth + WORD nw_MinHeight + WORD nw_MaxWidth + WORD nw_MaxHeight + + ; the type variable describes the Screen in which you want this Window to + ; open. The type value can either be CUSTOMSCREEN or one of the + ; system standard Screen Types such as WBENCHSCREEN. See the + ; type definitions under the Screen structure + ; A new possible value for this field is PUBLICSCREEN, which + ; defines the window as a 'visitor' window. See below for + ; additional information provided. + WORD nw_Type + + LABEL nw_SIZE + LABEL nw_SIZEOF + +; ExtNewWindow -- NewWindow plus extension fields. +; This structure may be extended again, so programs depending on its +; size are incorrect. + + STRUCTURE ExtNewWindow,nw_SIZE + + ; extensions for V36 + ; if the NewWindow Flag WFLG_NW_EXTENDED is set, then + ; this field is assumed to point to an array (or chain of arrays) + ; of TagItem structures. See also ExtNewScreen for another + ; use of TagItems to pass optional data. + ; + ; see below for tag values and the corresponding data + + APTR enw_Extension ; pointer to TagItem array + LABEL enw_SIZEOF + +* The TagItem ID's (ti_Tag values) for OpenWindowTagList() follow. +* They are values in a TagItem array passed as extension/replacement +* values for the data in NewWindow. OpenWindowTagList() can actually +* work well with a NULL NewWindow pointer. + + ENUM TAG_USER+100 + + ; these tags simply override NewWindow parameters + EITEM WA_Left + EITEM WA_Top + EITEM WA_Width + EITEM WA_Height + EITEM WA_DetailPen + EITEM WA_BlockPen + EITEM WA_IDCMP + EITEM WA_Flags ; not implemented at present + EITEM WA_Gadgets + EITEM WA_Checkmark + EITEM WA_Title + EITEM WA_ScreenTitle ; means you don't have to call SetWindowTitles + ; after you open your window + + EITEM WA_CustomScreen + EITEM WA_SuperBitMap ; also implies WFLG_SUPER_BITMAP property + EITEM WA_MinWidth + EITEM WA_MinHeight + EITEM WA_MaxWidth + EITEM WA_MaxHeight + + ; The following are specifications for new features + + EITEM WA_InnerWidth + EITEM WA_InnerHeight ; You can specify the dimensions of the interior + ; region of your window, independent of what + ; the border widths will be. You probably want + ; to also specify WA_AutoAdjust to allow + ; Intuition to move your window or even + ; shrink it so that it is completely on screen. + + EITEM WA_PubScreenName ; declares that you want the window to open as + ; a visitor on the public screen whose name is + ; pointed to by (UBYTE *) ti_Data + + EITEM WA_PubScreen ; open as a visitor window on the public screen + ; whose address is in (struct Screen *) ti_Data. + ; To ensure that this screen remains open, you + ; should either be the screen's owner, have a + ; window open on the screen, or use LockPubScreen(). + + EITEM WA_PubScreenFallBack ; A Boolean, specifies whether a visitor window + ; should "fall back" to the default public screen + ; (or Workbench) if the named public screen isn't + ; available + + EITEM WA_WindowName ; not implemented + EITEM WA_Colors ; a ColorSpec array for colors to be set + ; when this window is active. This is not + ; implemented, and may not be, since the default + ; values to restore would be hard to track. + ; We'd like to at least support per-window colors + ; for the mouse pointer sprite. + + EITEM WA_Zoom ; ti_Data points to an array of four WORD's, + ; the initial Left/Top/Width/Height values of + ; the "alternate" zoom position/dimensions. + ; It also specifies that you want a Zoom gadget + ; for your window, whether or not you have a + ; sizing gadget. + + EITEM WA_MouseQueue ; ti_Data contains initial value for the mouse + ; message backlog limit for this window. + + EITEM WA_BackFill ; provides a "backfill hook" for your window's Layer. + ; See layers.library/CreateUpfrontHookLayer(). + + EITEM WA_RptQueue ; initial value of repeat key backlog limit + + ; These Boolean tag items are alternatives to the NewWindow.Flags + ; boolean flags with similar names. + + EITEM WA_SizeGadget + EITEM WA_DragBar + EITEM WA_DepthGadget + EITEM WA_CloseGadget + EITEM WA_Backdrop + EITEM WA_ReportMouse + EITEM WA_NoCareRefresh + EITEM WA_Borderless + EITEM WA_Activate + EITEM WA_RMBTrap + EITEM WA_WBenchWindow ; PRIVATE!! + EITEM WA_SimpleRefresh ; only specify if TRUE + EITEM WA_SmartRefresh ; only specify if TRUE + EITEM WA_SizeBRight + EITEM WA_SizeBBottom + + ; New Boolean properties + EITEM WA_AutoAdjust ; shift or squeeze the window's position and + ; dimensions to fit it on screen. + + EITEM WA_GimmeZeroZero ; equiv. to NewWindow.Flags WFLG_GIMMEZEROZERO + + ; New for V37: WA_MenuHelp (ignored by V36) + EITEM WA_MenuHelp ; Enables IDCMP_MENUHELP: Pressing HELP during menus + ; will return IDCMP_MENUHELP IDCMP message. + + ; New for V39: (ignored by V37 and earlier) + EITEM WA_NewLookMenus + ; Set to TRUE if you want NewLook menus + + EITEM WA_AmigaKey ; Pointer to image for Amiga-key equiv in menus + + EITEM WA_NotifyDepth + ; Requests IDCMP_CHANGEWINDOW message when + ; window is depth arranged + ; (imsg->Code = CWCODE_DEPTH) + + EITEM WA_Obsolete + + EITEM WA_Pointer + ; Allows you to specify a custom pointer + ; for your window. ti_Data points to a + ; pointer object you obtained via + ; "pointerclass". NULL signifies the + ; default pointer. + ; This tag may be passed to OpenWindowTags() + ; or SetWindowPointer(). + + EITEM WA_BusyPointer + ; ti_Data is boolean. Set to TRUE to + ; request the standard busy pointer. + ; This tag may be passed to OpenWindowTags() + ; or SetWindowPointer(). + + EITEM WA_PointerDelay + ; ti_Data is boolean. Set to TRUE to + ; request that the changing of the + ; pointer be slightly delayed. The change + ; will be called off if you call NewSetPointer() + ; before the delay expires. This allows + ; you to post a busy-pointer even if you think + ; the busy-time may be very short, without + ; fear of a flashing pointer. + ; This tag may be passed to OpenWindowTags() + ; or SetWindowPointer(). + + EITEM WA_TabletMessages + ; ti_Data is a boolean. Set to TRUE to + ; request that tablet information be included + ; in IntuiMessages sent to your window. + ; Requires that something (i.e. a tablet driver) + ; feed IESUBCLASS_NEWTABLET InputEvents into + ; the system. For a pointer to the TabletData, + ; examine the ExtIntuiMessage->eim_TabletData + ; field. It is UNSAFE to check this field + ; when running on pre-V39 systems. It's always + ; safe to check this field under V39 and up, + ; though it may be NULL. + + EITEM WA_HelpGroup + ; When the active window has gadget help enabled, + ; other windows of the same HelpGroup number + ; will also get GadgetHelp. This allows GadgetHelp + ; to work for multi-windowed applications. + ; Use GetGroupID() to get an ID number. Pass + ; this number as ti_Data to all your windows. + ; See also the HelpControl() function. + + EITEM WA_HelpGroupWindow + ; When the active window has gadget help enabled, + ; other windows of the same HelpGroup will also get + ; GadgetHelp. This allows GadgetHelp to work + ; for multi-windowed applications. As an alternative + ; to WA_HelpGroup, you can pass a pointer to any + ; other window of the same group to join its help + ; group. Defaults to NULL, which has no effect. + ; See also the HelpControl() function. + + +*** End of Window attribute enumeration *** + + +* HelpControl() flags: +* +* HC_GADGETHELP - Set this flag to enable Gadget-Help for one or more +* windows. + +HC_GADGETHELP EQU 1 + + + IFND INTUITION_SCREENS_I + INCLUDE "intuition/screens.i" + ENDC + + IFND INTUITION_PREFERENCES_I + INCLUDE "intuition/preferences.i" + ENDC + +; ======================================================================== +; === Remember =========================================================== +; ======================================================================== +; this structure is used for remembering what memory has been allocated to +; date by a given routine, so that a premature abort or systematic exit +; can deallocate memory cleanly, easily, and completely + STRUCTURE Remember,0 + + APTR rm_NextRemember + LONG rm_RememberSize + APTR rm_Memory + + LABEL rm_SIZEOF + +* How to tell Intuition about RGB values for a color table entry. +* NOTE: The way the structure was defined, the color value was +* right-justified within each UWORD. This poses problems for +* extensibility to more bits-per-gun. The SA_Colors32 tag to +* OpenScreenTags() provides an alternate way to specify colors +* with greater precision. + + STRUCTURE ColorSpec,0 + + WORD cs_ColorIndex ; -1 terminates an array of ColorSpec + UWORD cs_Red ; only the _bottom_ 4 bits recognized + UWORD cs_Green ; only the _bottom_ 4 bits recognized + UWORD cs_Blue ; only the _bottom_ 4 bits recognized + LABEL cs_SIZEOF + +* === Easy Requester Specification ======================================= * +* see also autodocs for EasyRequest and BuildEasyRequest +* NOTE: This structure may grow in size in the future + + STRUCTURE EasyStruct,0 + + ULONG es_StructSize ; should be EasyStruct_SIZEOF + ULONG es_Flags ; should be 0 for now + APTR es_Title ; title of requester window + APTR es_TextFormat ; 'printf' style formatting string + APTR es_GadgetFormat ; 'printf' style formatting string + LABEL EasyStruct_SIZEOF ; was es_SIZEOF, but we renamed it due + ; to an unfortunate collision with + ; graphics ExtSprite's es_SIZEOF + + + +; ======================================================================== +; === Miscellaneous ====================================================== +; ======================================================================== + +; = MACROS ============================================================== +;#define MENUNUM(n) (n & 0x1F) +;#define ITEMNUM(n) ((n >> 5) & 0x003F) +;#define SUBNUM(n) ((n >> 11) & 0x001F) +; +;#define SHIFTMENU(n) (n & 0x1F) +;#define SHIFTITEM(n) ((n & 0x3F) << 5) +;#define SHIFTSUB(n) ((n & 0x1F) << 11) +; +;#define SRBNUM(n) (0x08 - (n >> 4)) /* SerRWBits -> read bits per char */ +;#define SWBNUM(n) (0x08 - (n & 0x0F))/* SerRWBits -> write bits per chr */ +;#define SSBNUM(n) (0x01 + (n >> 4)) /* SerStopBuf -> stop bits per chr */ +;#define SPARNUM(n) (n >> 4) /* SerParShk -> parity setting */ +;#define SHAKNUM(n) (n & 0x0F) /* SerParShk -> handshake mode */ +; +; = MENU STUFF =========================================================== +NOMENU EQU $001F +NOITEM EQU $003F +NOSUB EQU $001F +MENUNULL EQU $FFFF + + +; = =RJ='s peculiarities ================================================= +;#define FOREVER for(;;) +;#define SIGN(x) ( ((x) > 0) - ((x) < 0) ) + + +; these defines are for the COMMSEQ and CHECKIT menu stuff. If CHECKIT, +; I'll use a generic Width (for all resolutions) for the CheckMark. +; If COMMSEQ, likewise I'll use this generic stuff +CHECKWIDTH EQU 19 +COMMWIDTH EQU 27 +LOWCHECKWIDTH EQU 13 +LOWCOMMWIDTH EQU 16 + + +; these are the AlertNumber defines. if you are calling DisplayAlert() +; the AlertNumber you supply must have the ALERT_TYPE bits set to one +; of these patterns +ALERT_TYPE EQU $80000000 +RECOVERY_ALERT EQU $00000000 ; the system can recover from this +DEADEND_ALERT EQU $80000000 ; no recovery possible, this is it + + +; When you're defining IntuiText for the Positive and Negative Gadgets +; created by a call to AutoRequest(), these defines will get you +; reasonable-looking text. The only field without a define is the IText +; field; you decide what text goes with the Gadget +AUTOFRONTPEN EQU 0 +AUTOBACKPEN EQU 1 +AUTODRAWMODE EQU RP_JAM2 +AUTOLEFTEDGE EQU 6 +AUTOTOPEDGE EQU 3 +AUTOITEXTFONT EQU 0 +AUTONEXTTEXT EQU 0 + + + +;* --- RAWMOUSE Codes and Qualifiers (Console OR IDCMP) ------------------- +SELECTUP EQU (IECODE_LBUTTON+IECODE_UP_PREFIX) +SELECTDOWN EQU (IECODE_LBUTTON) +MENUUP EQU (IECODE_RBUTTON+IECODE_UP_PREFIX) +MENUDOWN EQU (IECODE_RBUTTON) +MIDDLEUP EQU (IECODE_MBUTTON+IECODE_UP_PREFIX) +MIDDLEDOWN EQU (IECODE_MBUTTON) +ALTLEFT EQU (IEQUALIFIER_LALT) +ALTRIGHT EQU (IEQUALIFIER_RALT) +AMIGALEFT EQU (IEQUALIFIER_LCOMMAND) +AMIGARIGHT EQU (IEQUALIFIER_RCOMMAND) +AMIGAKEYS EQU (AMIGALEFT+AMIGARIGHT) + +CURSORUP EQU $4C +CURSORLEFT EQU $4F +CURSORRIGHT EQU $4E +CURSORDOWN EQU $4D +KEYCODE_Q EQU $10 +KEYCODE_Z EQU $31 +KEYCODE_X EQU $32 +KEYCODE_V EQU $34 +KEYCODE_B EQU $35 +KEYCODE_N EQU $36 +KEYCODE_M EQU $37 +KEYCODE_LESS EQU $38 +KEYCODE_GREATER EQU $39 + + + +* New for V39, Intuition supports the IESUBCLASS_NEWTABLET subclass +* of the IECLASS_NEWPOINTERPOS event. The ie_EventAddress of such +* an event points to a TabletData structure (see +* for the definition.) +* +* The TabletData structure contains certain elements including a taglist. +* The taglist can be used for special tablet parameters. A tablet driver +* should include only those tag-items the tablet supports. An application +* can listen for any tag-items that interest it. Note: an application +* must set the WA_TabletMessages attribute to TRUE to receive this +* extended information in its IntuiMessages. +* +* The definitions given here MUST be followed. Pay careful attention +* to normalization and the interpretation of signs. +* +* TABLETA_TabletZ: the current value of the tablet in the Z direction. +* This unsigned value should typically be in the natural units of the +* tablet. You should also provide TABLETA_RangeZ. +* +* TABLETA_RangeZ: the maximum value of the tablet in the Z direction. +* Normally specified along with TABLETA_TabletZ, this allows the +* application to scale the actual Z value across its range. +* +* TABLETA_AngleX: the angle of rotation or tilt about the X-axis. This +* number should be normalized to fill a signed long integer. Positive +* values imply a clockwise rotation about the X-axis when viewing +* from +X towards the origin. +* +* TABLETA_AngleY: the angle of rotation or tilt about the Y-axis. This +* number should be normalized to fill a signed long integer. Positive +* values imply a clockwise rotation about the Y-axis when viewing +* from +Y towards the origin. +* +* TABLETA_AngleZ: the angle of rotation or tilt about the Z axis. This +* number should be normalized to fill a signed long integer. Positive +* values imply a clockwise rotation about the Z-axis when viewing +* from +Z towards the origin. +* +* Note: a stylus that supports tilt should use the TABLETA_AngleX +* and TABLETA_AngleY attributes. Tilting the stylus so the tip +* points towards increasing or decreasing X is actually a rotation +* around the Y-axis. Thus, if the stylus tip points towards +* positive X, then that tilt is represented as a negative +* TABLETA_AngleY. Likewise, if the stylus tip points towards +* positive Y, that tilt is represented by positive TABLETA_AngleX. +* +* TABLETA_Pressure: the pressure reading of the stylus. The pressure +* should be normalized to fill a signed long integer. Typical devices +* won't generate negative pressure, but the possibility is not precluded. +* The pressure threshold which is considered to cause a button-click is +* expected to be set in a Preferences program supplied by the tablet +* vendor. The tablet driver would send IECODE_LBUTTON-type events as +* the pressure crossed that threshold. +* +* TABLETA_ButtonBits: ti_Data is a long integer whose bits are to +* be interpreted at the state of the first 32 buttons of the tablet. +* +* TABLETA_InProximity: ti_Data is a boolean. For tablets that support +* proximity, they should send the {TABLETA_InProximity,FALSE} tag item +* when the stylus is out of proximity. One possible use we can forsee +* is a mouse-blanking commodity which keys off this to blank the +* mouse. When this tag is absent, the stylus is assumed to be +* in proximity. +* +* TABLETA_ResolutionX: ti_Data is an unsigned long integer which +* is the x-axis resolution in dots per inch. +* +* TABLETA_ResolutionY: ti_Data is an unsigned long integer which +* is the y-axis resolution in dots per inch. + +TABLETA_Dummy EQU TAG_USER+$3A000 +TABLETA_TabletZ EQU TABLETA_Dummy+$01 +TABLETA_RangeZ EQU TABLETA_Dummy+$02 +TABLETA_AngleX EQU TABLETA_Dummy+$03 +TABLETA_AngleY EQU TABLETA_Dummy+$04 +TABLETA_AngleZ EQU TABLETA_Dummy+$05 +TABLETA_Pressure EQU TABLETA_Dummy+$06 +TABLETA_ButtonBits EQU TABLETA_Dummy+$07 +TABLETA_InProximity EQU TABLETA_Dummy+$08 +TABLETA_ResolutionX EQU TABLETA_Dummy+$09 +TABLETA_ResolutionY EQU TABLETA_Dummy+$0A + + +* If your window sets WA_TabletMessages to TRUE, then it will receive +* extended IntuiMessages (struct ExtIntuiMessage) whose eim_TabletData +* field points at a TabletData structure. This structure contains +* additional information about the input event. + + STRUCTURE TabletData,0 + ; Sub-pixel position of tablet, in screen coordinates, + ; scaled to fill a UWORD fraction: + UWORD td_XFraction + UWORD td_YFraction + + ; Current tablet coordinates along each axis: + ULONG td_TabletX + ULONG td_TabletY + + ; Tablet range along each axis. For example, if td_TabletX + ; can take values 0-999, td_RangeX should be 1000. + ULONG td_RangeX + ULONG td_RangeY + + ; Pointer to tag-list of additional tablet attributes. + ; See for the tag values. + APTR td_TagList + + LABEL td_SIZEOF + +* If a tablet driver supplies a hook for ient_CallBack, it will be +* invoked in the standard hook manner. A0 will point to the Hook +* itself, A2 will point to the InputEvent that was sent, and +* A1 will point to a TabletHookData structure. The InputEvent's +* ie_EventAddress field points at the IENewTablet structure that +* the driver supplied. +* +* Based on the thd_Screen, thd_Width, and thd_Height fields, the driver +* should scale the ient_TabletX and ient_TabletY fields and store the +* result in ient_ScaledX, ient_ScaledY, ient_ScaledXFraction, and +* ient_ScaledYFraction. +* +* The tablet hook must currently return NULL. This is the only +* acceptable return-value under V39. + + STRUCTURE TabletHookData,0 + + ; Pointer to the active screen: + ; Note: if there are no open screens, thd_Screen will be NULL. + ; thd_Width and thd_Height will then describe an NTSC 640x400 + ; screen. Please scale accordingly. + APTR thd_Screen + + ; The width and height (measured in pixels of the active screen) + ; that your are to scale to: + ULONG thd_Width + ULONG thd_Height + + ; Non-zero if the screen or something about the screen + ; changed since the last time you were invoked: + LONG thd_ScreenChanged + + LABEL thd_SIZEOF + + IFND INTUITION_INTUITIONBASE_I + INCLUDE "intuition/intuitionbase.i" + ENDC + +* Include obsolete identifiers: + IFND INTUITION_IOBSOLETE_I + INCLUDE "intuition/iobsolete.i" + ENDC + + ENDC diff --git a/extra/rtg_driver/include/intuition/intuitionbase.i b/extra/rtg_driver/include/intuition/intuitionbase.i new file mode 100644 index 00000000..2b01785d --- /dev/null +++ b/extra/rtg_driver/include/intuition/intuitionbase.i @@ -0,0 +1,61 @@ + IFND INTUITION_INTUITIONBASE_I +INTUITION_INTUITIONBASE_I SET 1 +** +** $VER: intuitionbase.i 38.0 (12.6.1991) +** Includes Release 45.1 +** +** The public part of IntuitionBase structure and supporting structures +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND EXEC_LIBRARIES_I + INCLUDE "exec/libraries.i" + ENDC + + IFND GRAPHICS_VIEW_I + INCLUDE "graphics/view.i" + ENDC + +* Be sure to protect yourself against someone modifying these data as +* you look at them. This is done by calling: +* +* lock = LockIBase(0), which returns a ULONG. When done call +* D0 D0 +* UnlockIBase(lock) where lock is what LockIBase() returned. +* A0 +* NOTE: these library functions are simply stubs now, but should be called +* to be compatible with future releases. + +* ======================================================================== * +* === IntuitionBase ====================================================== * +* ======================================================================== * + STRUCTURE IntuitionBase,0 + + STRUCT ib_LibNode,LIB_SIZE + STRUCT ib_ViewLord,v_SIZEOF + APTR ib_ActiveWindow + APTR ib_ActiveScreen + +* the FirstScreen variable points to the frontmost Screen. Screens are +* then maintained in a front to back order using Screen.NextScreen + + APTR ib_FirstScreen + ULONG ib_Flags ; private meaning + WORD ib_MouseY ; these are supposed to be backwards, + WORD ib_MouseX ; but weren't, recently + + ULONG ib_Seconds + ULONG ib_Micros + +* there is not 'sizeof' here because... +* +* + ENDC + + diff --git a/extra/rtg_driver/include/intuition/iobsolete.i b/extra/rtg_driver/include/intuition/iobsolete.i new file mode 100644 index 00000000..121eaa5a --- /dev/null +++ b/extra/rtg_driver/include/intuition/iobsolete.i @@ -0,0 +1,279 @@ + IFND INTUITION_IOBSOLETE_I +INTUITION_IOBSOLETE_I SET 1 +** +** $VER: iobsolete.i 38.0 (12.6.1991) +** Includes Release 45.1 +** +** Obsolete identifiers for Intuition. Use the new ones instead! +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + +* This file contains: +* +* 1. The traditional identifiers for gadget Flags, Activation, and Type, +* and for window Flags and IDCMP classes. They are defined in terms +* of their new versions, which serve to prevent confusion between +* similar-sounding but different identifiers (like IDCMP_WINDOWACTIVE +* and WFLG_ACTIVATE). +* +* 2. Some tag names and constants whose labels were adjusted after V36. +* +* By default, 1 and 2 are enabled. +* +* Set INTUI_V36_NAMES_ONLY to exclude the traditional identifiers and +* the original V36 names of some identifiers. +* + + + IFND INTUITION_INTUITION_I + INCLUDE "intuition/intuition.i" + ENDC + + IFND INTUITION_SCREENS_I + INCLUDE "intuition/screens.i" + ENDC + + IFND INTUITION_GADGETCLASS_I + INCLUDE "intuition/gadgetclass.i" + ENDC + + IFND INTUITION_IMAGECLASS_I + INCLUDE "intuition/imageclass.i" + ENDC + +* Set INTUI_V36_NAMES_ONLY to remove these older names + + IFND INTUI_V36_NAMES_ONLY + + +* V34-style Gadget->Flags names: + +GADGHIGHBITS equ GFLG_GADGHIGHBITS +GADGHCOMP equ GFLG_GADGHCOMP +GADGHBOX equ GFLG_GADGHBOX +GADGHIMAGE equ GFLG_GADGHIMAGE +GADGHNONE equ GFLG_GADGHNONE +GADGIMAGE equ GFLG_GADGIMAGE +GRELBOTTOM equ GFLG_RELBOTTOM +GRELRIGHT equ GFLG_RELRIGHT +GRELWIDTH equ GFLG_RELWIDTH +GRELHEIGHT equ GFLG_RELHEIGHT +SELECTED equ GFLG_SELECTED +GADGDISABLED equ GFLG_DISABLED +LABELMASK equ GFLG_LABELMASK +LABELITEXT equ GFLG_LABELITEXT +LABELSTRING equ GFLG_LABELSTRING +LABELIMAGE equ GFLG_LABELIMAGE + + +* V34-style Gadget->Activation flag names: + +RELVERIFY equ GACT_RELVERIFY +GADGIMMEDIATE equ GACT_IMMEDIATE +ENDGADGET equ GACT_ENDGADGET +FOLLOWMOUSE equ GACT_FOLLOWMOUSE +RIGHTBORDER equ GACT_RIGHTBORDER +LEFTBORDER equ GACT_LEFTBORDER +TOPBORDER equ GACT_TOPBORDER +BOTTOMBORDER equ GACT_BOTTOMBORDER +BORDERSNIFF equ GACT_BORDERSNIFF +TOGGLESELECT equ GACT_TOGGLESELECT +BOOLEXTEND equ GACT_BOOLEXTEND +STRINGLEFT equ GACT_STRINGLEFT +STRINGCENTER equ GACT_STRINGCENTER +STRINGRIGHT equ GACT_STRINGRIGHT +LONGINT equ GACT_LONGINT +ALTKEYMAP equ GACT_ALTKEYMAP +STRINGEXTEND equ GACT_STRINGEXTEND +ACTIVEGADGET equ GACT_ACTIVEGADGET + + +* V34-style Gadget->Type names: + +GADGETTYPE equ GTYP_GADGETTYPE +SYSGADGET equ GTYP_SYSGADGET +SCRGADGET equ GTYP_SCRGADGET +GZZGADGET equ GTYP_GZZGADGET +REQGADGET equ GTYP_REQGADGET +SIZING equ GTYP_SIZING +WDRAGGING equ GTYP_WDRAGGING +SDRAGGING equ GTYP_SDRAGGING +WUPFRONT equ GTYP_WUPFRONT +SUPFRONT equ GTYP_SUPFRONT +WDOWNBACK equ GTYP_WDOWNBACK +SDOWNBACK equ GTYP_SDOWNBACK +CLOSE equ GTYP_CLOSE +BOOLGADGET equ GTYP_BOOLGADGET +GADGET0002 equ GTYP_GADGET0002 +PROPGADGET equ GTYP_PROPGADGET +STRGADGET equ GTYP_STRGADGET +CUSTOMGADGET equ GTYP_CUSTOMGADGET +GTYPEMASK equ GTYP_GTYPEMASK + + +* V34-style IDCMP class names: + +SIZEVERIFY equ IDCMP_SIZEVERIFY +NEWSIZE equ IDCMP_NEWSIZE +REFRESHWINDOW equ IDCMP_REFRESHWINDOW +MOUSEBUTTONS equ IDCMP_MOUSEBUTTONS +MOUSEMOVE equ IDCMP_MOUSEMOVE +GADGETDOWN equ IDCMP_GADGETDOWN +GADGETUP equ IDCMP_GADGETUP +REQSET equ IDCMP_REQSET +MENUPICK equ IDCMP_MENUPICK +CLOSEWINDOW equ IDCMP_CLOSEWINDOW +RAWKEY equ IDCMP_RAWKEY +REQVERIFY equ IDCMP_REQVERIFY +REQCLEAR equ IDCMP_REQCLEAR +MENUVERIFY equ IDCMP_MENUVERIFY +NEWPREFS equ IDCMP_NEWPREFS +DISKINSERTED equ IDCMP_DISKINSERTED +DISKREMOVED equ IDCMP_DISKREMOVED +WBENCHMESSAGE equ IDCMP_WBENCHMESSAGE +ACTIVEWINDOW equ IDCMP_ACTIVEWINDOW +INACTIVEWINDOW equ IDCMP_INACTIVEWINDOW +DELTAMOVE equ IDCMP_DELTAMOVE +VANILLAKEY equ IDCMP_VANILLAKEY +INTUITICKS equ IDCMP_INTUITICKS +IDCMPUPDATE equ IDCMP_IDCMPUPDATE +MENUHELP equ IDCMP_MENUHELP +CHANGEWINDOW equ IDCMP_CHANGEWINDOW +LONELYMESSAGE equ IDCMP_LONELYMESSAGE + + +* V34-style Window->Flags names: + +WINDOWSIZING equ WFLG_SIZEGADGET +WINDOWDRAG equ WFLG_DRAGBAR +WINDOWDEPTH equ WFLG_DEPTHGADGET +WINDOWCLOSE equ WFLG_CLOSEGADGET +SIZEBRIGHT equ WFLG_SIZEBRIGHT +SIZEBBOTTOM equ WFLG_SIZEBBOTTOM +REFRESHBITS equ WFLG_REFRESHBITS +SMART_REFRESH equ WFLG_SMART_REFRESH +SIMPLE_REFRESH equ WFLG_SIMPLE_REFRESH +SUPER_BITMAP equ WFLG_SUPER_BITMAP +OTHER_REFRESH equ WFLG_OTHER_REFRESH +BACKDROP equ WFLG_BACKDROP +REPORTMOUSE equ WFLG_REPORTMOUSE +GIMMEZEROZERO equ WFLG_GIMMEZEROZERO +BORDERLESS equ WFLG_BORDERLESS +ACTIVATE equ WFLG_ACTIVATE +WINDOWACTIVE equ WFLG_WINDOWACTIVE +INREQUEST equ WFLG_INREQUEST +MENUSTATE equ WFLG_MENUSTATE +RMBTRAP equ WFLG_RMBTRAP +NOCAREREFRESH equ WFLG_NOCAREREFRESH +WINDOWREFRESH equ WFLG_WINDOWREFRESH +WBENCHWINDOW equ WFLG_WBENCHWINDOW +WINDOWTICKED equ WFLG_WINDOWTICKED +NW_EXTENDED equ WFLG_NW_EXTENDED +VISITOR equ WFLG_VISITOR +ZOOMED equ WFLG_ZOOMED +HASZOOM equ WFLG_HASZOOM + + +* These are the obsolete tag names for general gadgets, proportional gadgets, +* and string gadgets. Use the mixed-case equivalents from gadgetclass.h +* instead. +* + +GA_LEFT equ GA_Left +GA_RELRIGHT equ GA_RelRight +GA_TOP equ GA_Top +GA_RELBOTTOM equ GA_RelBottom +GA_WIDTH equ GA_Width +GA_RELWIDTH equ GA_RelWidth +GA_HEIGHT equ GA_Height +GA_RELHEIGHT equ GA_RelHeight +GA_TEXT equ GA_Text +GA_IMAGE equ GA_Image +GA_BORDER equ GA_Border +GA_SELECTRENDER equ GA_SelectRender +GA_HIGHLIGHT equ GA_Highlight +GA_DISABLED equ GA_Disabled +GA_GZZGADGET equ GA_GZZGadget +GA_USERDATA equ GA_UserData +GA_SPECIALINFO equ GA_SpecialInfo +GA_SELECTED equ GA_Selected +GA_ENDGADGET equ GA_EndGadget +GA_IMMEDIATE equ GA_Immediate +GA_RELVERIFY equ GA_RelVerify +GA_FOLLOWMOUSE equ GA_FollowMouse +GA_RIGHTBORDER equ GA_RightBorder +GA_LEFTBORDER equ GA_LeftBorder +GA_TOPBORDER equ GA_TopBorder +GA_BOTTOMBORDER equ GA_BottomBorder +GA_TOGGLESELECT equ GA_ToggleSelect +GA_SYSGADGET equ GA_SysGadget +GA_SYSGTYPE equ GA_SysGType +GA_PREVIOUS equ GA_Previous +GA_NEXT equ GA_Next +GA_DRAWINFO equ GA_DrawInfo +GA_INTUITEXT equ GA_IntuiText +GA_LABELIMAGE equ GA_LabelImage + +PGA_FREEDOM equ PGA_Freedom +PGA_BORDERLESS equ PGA_Borderless +PGA_HORIZPOT equ PGA_HorizPot +PGA_HORIZBODY equ PGA_HorizBody +PGA_VERTPOT equ PGA_VertPot +PGA_VERTBODY equ PGA_VertBody +PGA_TOTAL equ PGA_Total +PGA_VISIBLE equ PGA_Visible +PGA_TOP equ PGA_Top + +LAYOUTA_LAYOUTOBJ equ LAYOUTA_LayoutObj +LAYOUTA_SPACING equ LAYOUTA_Spacing +LAYOUTA_ORIENTATION equ LAYOUTA_Orientation + + +* These are the obsolete tag names for image attributes. +* Use the mixed-case equivalents from imageclass.h instead. +* + +IA_LEFT equ IA_Left +IA_TOP equ IA_Top +IA_WIDTH equ IA_Width +IA_HEIGHT equ IA_Height +IA_FGPEN equ IA_FGPen +IA_BGPEN equ IA_BGPen +IA_DATA equ IA_Data +IA_LINEWIDTH equ IA_LineWidth +IA_PENS equ IA_Pens +IA_RESOLUTION equ IA_Resolution +IA_APATTERN equ IA_APattern +IA_APATSIZE equ IA_APatSize +IA_MODE equ IA_Mode +IA_FONT equ IA_Font +IA_OUTLINE equ IA_Outline +IA_RECESSED equ IA_Recessed +IA_DOUBLEEMBOSS equ IA_DoubleEmboss +IA_EDGESONLY equ IA_EdgesOnly +IA_SHADOWPEN equ IA_ShadowPen +IA_HIGHLIGHTPEN equ IA_HighlightPen + + +* These are the obsolete identifiers for the various DrawInfo pens. +* Use the uppercase versions in screens.h instead. +* + +detailPen equ DETAILPEN +blockPen equ BLOCKPEN +textPen equ TEXTPEN +shinePen equ SHINEPEN +shadowPen equ SHADOWPEN +hifillPen equ FILLPEN +hifilltextPen equ FILLTEXTPEN +backgroundPen equ BACKGROUNDPEN +hilighttextPen equ HIGHLIGHTTEXTPEN +numDrIPens equ NUMDRIPENS + + + ENDC * !INTUI_V36_NAMES_ONLY + + ENDC * INTUITION_IOBSOLETE_I diff --git a/extra/rtg_driver/include/intuition/pointerclass.i b/extra/rtg_driver/include/intuition/pointerclass.i new file mode 100644 index 00000000..dab67500 --- /dev/null +++ b/extra/rtg_driver/include/intuition/pointerclass.i @@ -0,0 +1,142 @@ + IFND INTUITION_POINTERCLASS_I +INTUITION_POINTERCLASS_I SET 1 +** +** $VER: pointerclass.i 39.5 (15.2.1993) +** Includes Release 45.1 +** +** 'boopsi' pointer class interface +** +** (C) Copyright 1992-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND INTUITION_INTUITION_I + INCLUDE "intuition/intuition.i" + ENDC + + IFND UTILITY_TAGITEM_I + INCLUDE "utility/tagitem.i" + ENDC + +* The following tags are recognized at NewObject() time by +* pointerclass: +* +* POINTERA_BitMap (struct BitMap *) - Pointer to bitmap to +* get pointer imagery from. Bitplane data need not be +* in chip RAM. +* POINTERA_XOffset (LONG) - X-offset of the pointer hotspot. +* POINTERA_YOffset (LONG) - Y-offset of the pointer hotspot. +* POINTERA_WordWidth (ULONG) - designed width of the pointer in words +* POINTERA_XResolution (ULONG) - one of the POINTERXRESN_ flags below +* POINTERA_YResolution (ULONG) - one of the POINTERYRESN_ flags below +* + +POINTERA_Dummy EQU (TAG_USER+$39000) + +POINTERA_BitMap EQU (POINTERA_Dummy+$01) +POINTERA_XOffset EQU (POINTERA_Dummy+$02) +POINTERA_YOffset EQU (POINTERA_Dummy+$03) +POINTERA_WordWidth EQU (POINTERA_Dummy+$04) +POINTERA_XResolution EQU (POINTERA_Dummy+$05) +POINTERA_YResolution EQU (POINTERA_Dummy+$06) + +* These are the choices for the POINTERA_XResolution attribute which +* will determine what resolution pixels are used for this pointer. +* +* POINTERXRESN_DEFAULT (ECS-compatible pointer width) +* = 70 ns if SUPERHIRES-type mode, 140 ns if not +* +* POINTERXRESN_SCREENRES +* = Same as pixel speed of screen +* +* POINTERXRESN_LORES (pointer always in lores-like pixels) +* = 140 ns in 15kHz modes, 70 ns in 31kHz modes +* +* POINTERXRESN_HIRES (pointer always in hires-like pixels) +* = 70 ns in 15kHz modes, 35 ns in 31kHz modes +* +* POINTERXRESN_140NS (pointer always in 140 ns pixels) +* = 140 ns always +* +* POINTERXRESN_70NS (pointer always in 70 ns pixels) +* = 70 ns always +* +* POINTERXRESN_35NS (pointer always in 35 ns pixels) +* = 35 ns always + +POINTERXRESN_DEFAULT EQU 0 +POINTERXRESN_140NS EQU 1 +POINTERXRESN_70NS EQU 2 +POINTERXRESN_35NS EQU 3 + +POINTERXRESN_SCREENRES EQU 4 +POINTERXRESN_LORES EQU 5 +POINTERXRESN_HIRES EQU 6 + +* These are the choices for the POINTERA_YResolution attribute which +* will determine what vertical resolution is used for this pointer. +* +* POINTERYRESN_DEFAULT +* = In 15 kHz modes, the pointer resolution will be the same +* as a non-interlaced screen. In 31 kHz modes, the pointer +* will be doubled vertically. This means there will be about +* 200-256 pointer lines per screen. +* +* POINTERYRESN_HIGH +* POINTERYRESN_HIGHASPECT +* = Where the hardware/software supports it, the pointer resolution +* will be high. This means there will be about 400-480 pointer +* lines per screen. POINTERYRESN_HIGHASPECT also means that +* when the pointer comes out double-height due to hardware/software +* restrictions, its width would be doubled as well, if possible +* (to preserve aspect). +* +* POINTERYRESN_SCREENRES +* POINTERYRESN_SCREENRESASPECT +* = Will attempt to match the vertical resolution of the pointer +* to the screen's vertical resolution. POINTERYRESN_SCREENASPECT also +* means that when the pointer comes out double-height due to +* hardware/software restrictions, its width would be doubled as well, +* if possible (to preserve aspect). + +POINTERYRESN_DEFAULT EQU 0 +POINTERYRESN_HIGH EQU 2 +POINTERYRESN_HIGHASPECT EQU 3 +POINTERYRESN_SCREENRES EQU 4 +POINTERYRESN_SCREENRESASPECT EQU 5 + + +* Compatibility note: +* +* The AA chipset supports variable sprite width and resolution, but +* the setting of width and resolution is global for all sprites. +* When no other sprites are in use, Intuition controls the sprite +* width and sprite resolution for correctness based on pointerclass +* attributes specified by the creator of the pointer. Intuition +* controls sprite resolution with the VTAG_DEFSPRITERESN_SET tag +* to VideoControl(). Applications can override this on a per-viewport +* basis with the VTAG_SPRITERESN_SET tag to VideoControl(). +* +* If an application uses a sprite other than the pointer sprite, +* Intuition will automatically regenerate the pointer sprite's image in +* a compatible width. This might involve BitMap scaling of the imagery +* you supply. +* +* If any sprites other than the pointer sprite were obtained with the +* old GetSprite() call, Intuition assumes that the owner of those +* sprites is unaware of sprite resolution, hence Intuition will set the +* default sprite resolution (VTAG_DEFSPRITERESN_SET) to ECS-compatible, +* instead of as requested by the various pointerclass attributes. +* +* No resolution fallback occurs when applications use ExtSprites. +* Such applications are expected to use VTAG_SPRITERESN_SET tag if +* necessary. +* +* NB: Under release V39, only sprite width compatibility is implemented. +* Sprite resolution compatibility was added for V40. + + ENDC diff --git a/extra/rtg_driver/include/intuition/preferences.i b/extra/rtg_driver/include/intuition/preferences.i new file mode 100644 index 00000000..3c2794b6 --- /dev/null +++ b/extra/rtg_driver/include/intuition/preferences.i @@ -0,0 +1,301 @@ + IFND INTUITION_PREFERENCES_I +INTUITION_PREFERENCES_I SET 1 +** +** $VER: preferences.i 38.4 (16.9.1992) +** Includes Release 45.1 +** +** Structure definition for old-style preferences +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND DEVICES_TIMER_I + INCLUDE "devices/timer.i" + ENDC + +; ======================================================================== +; === Preferences ======================================================== +; ======================================================================== + +; these are the definitions for the printer configurations +FILENAME_SIZE EQU 30 ; Filename size +DEVNAME_SIZE EQU 16 ; Device-name size + +POINTERSIZE EQU (1+16+1)*2 ; Size of Pointer data buffer + +; These defines are for the default font size. These actually describe the +; height of the defaults fonts. The default font type is the topaz +; font, which is a fixed width font that can be used in either +; eighty-column or sixty-column mode. The Preferences structure reflects +; which is currently selected by the value found in the variable FontSize, +; which may have either of the values defined below. These values actually +; are used to select the height of the default font. By changing the +; height, the resolution of the font changes as well. +TOPAZ_EIGHTY EQU 8 +TOPAZ_SIXTY EQU 9 + +; ------------------------------------------------------------------------ + +* Note: Starting with V36, and continuing with each new version of +* Intuition, an increasing number of fields of struct Preferences +* are ignored by SetPrefs(). (Some fields are obeyed only at the +* initial SetPrefs(), which comes from the devs:system-configuration +* file). Elements are generally superseded as new hardware or software +* features demand more information than fits in struct Preferences. +* Parts of struct Preferences must be ignored so that applications +* calling GetPrefs(), modifying some other part of struct Preferences, +* then calling SetPrefs(), don't end up truncating the extended +* data. +* +* Consult the autodocs for SetPrefs() for further information as +* to which fields are not always respected. + + STRUCTURE Preferences,0 + + ; the default font height + BYTE pf_FontHeight ; height for system default font + + ; constant describing what's hooked up to the port + BYTE pf_PrinterPort ; printer port connection + + ; the baud rate of the port + WORD pf_BaudRate ; baud rate for the serial port + + ; various timing rates + STRUCT pf_KeyRptSpeed,TV_SIZE ; repeat speed for keyboard + STRUCT pf_KeyRptDelay,TV_SIZE ; Delay before keys repeat + STRUCT pf_DoubleClick,TV_SIZE ; Interval allowed between clicks + + ; Intuition Pointer data + STRUCT pf_PointerMatrix,POINTERSIZE*2 ; Definition of pointer sprite + BYTE pf_XOffset ; X-Offset for active 'bit' + BYTE pf_YOffset ; Y-Offset for active 'bit' + WORD pf_color17 ;******************************** + WORD pf_color18 ; Colours for sprite pointer + WORD pf_color19 ;******************************** + WORD pf_PointerTicks ; Sensitivity of the pointer + + ; Workbench Screen colors + WORD pf_color0 ;******************************** + WORD pf_color1 ; Standard default colours + WORD pf_color2 ; Used in the Workbench + WORD pf_color3 ;******************************** + + ; positioning data for the Intuition View + BYTE pf_ViewXOffset ; Offset for top lefthand corner + BYTE pf_ViewYOffset ; X and Y dimensions + WORD pf_ViewInitX ; View initial offsets at startup + WORD pf_ViewInitY ; View initial offsets at startup + + BOOL EnableCLI ; CLI availability switch + + ; printer configurations + WORD pf_PrinterType ; printer type + STRUCT pf_PrinterFilename,FILENAME_SIZE ; file for printer + + ; print format and quality configurations + WORD pf_PrintPitch ; print pitch + WORD pf_PrintQuality ; print quality + WORD pf_PrintSpacing ; number of lines per inch + WORD pf_PrintLeftMargin ; left margin in characters + WORD pf_PrintRightMargin ; right margin in characters + WORD pf_PrintImage ; positive or negative + WORD pf_PrintAspect ; horizontal or vertical + WORD pf_PrintShade ; b&w, half-tone, or color + WORD pf_PrintThreshold ; darkness ctrl for b/w dumps + + + ; print paper description + WORD pf_PaperSize ; paper size + WORD pf_PaperLength ; paper length in lines + WORD pf_PaperType ; continuous or single sheet + + ; Serial device settings: These are six nibble-fields in three bytes + ; (these look a little strange so the defaults will map out to zero) + BYTE pf_SerRWBits ; upper nibble = (8-number of read bits) + ; lower nibble = (8-number of write bits) + BYTE pf_SerStopBuf ; upper nibble = (number of stop bits - 1) + ; lower nibble = (table value for BufSize) + BYTE pf_SerParShk ; upper nibble = (value for Parity setting) + ; lower nibble = (value for Handshake mode) + + BYTE pf_LaceWB ; if workbench is to be interlaced + + STRUCT pf_Pad,12 + + STRUCT pf_PrtDevName,DEVNAME_SIZE ; device used by printer.device + ; (omit the ".device") + UBYTE pf_DefaultPrtUnit ; default unit opened by printer.device + UBYTE pf_DefaultSerUnit ; default serial unit + + BYTE pf_RowSizeChange ; + BYTE pf_ColumnSizeChange ; + + UWORD pf_PrintFlags ; user preference flags + WORD pf_PrintMaxWidth ; max width of printed picture in 10ths/inch + UWORD pf_PrintMaxHeight ; max height of printed picture in 10ths/inch + UBYTE pf_PrintDensity ; print density + UBYTE pf_PrintXOffset ; offset of printed picture in 10ths/inch + + UWORD pf_wb_Width ; override default workbench width + UWORD pf_wb_Height ; override default workbench height + UBYTE pf_wb_Depth ; override default workbench depth + + UBYTE pf_ext_size ; extension information -- do not touch! + ; extension size in blocks of 64 bytes + + LABEL pf_SIZEOF + + +; === Preferences definitions =========================================== + +; Workbench Interlace (use one bit) +LACEWB EQU $01 + + +; Enable_CLI +SCREEN_DRAG EQU $4000 +MOUSE_ACCEL EQU $8000 + +; PrinterPort +PARALLEL_PRINTER EQU $00 +SERIAL_PRINTER EQU $01 + +; BaudRate +BAUD_110 EQU $00 +BAUD_300 EQU $01 +BAUD_1200 EQU $02 +BAUD_2400 EQU $03 +BAUD_4800 EQU $04 +BAUD_9600 EQU $05 +BAUD_19200 EQU $06 +BAUD_MIDI EQU $07 + +; PaperType +FANFOLD EQU $00 +SINGLE EQU $80 + +; PrintPitch +PICA EQU $000 +ELITE EQU $400 +FINE EQU $800 + +; PrintQuality +DRAFT EQU $000 +LETTER EQU $100 + +; PrintSpacing +SIX_LPI EQU $000 +EIGHT_LPI EQU $200 + +; Print Image +IMAGE_POSITIVE EQU $00 +IMAGE_NEGATIVE EQU $01 + +; PrintAspect +ASPECT_HORIZ EQU $00 +ASPECT_VERT EQU $01 + +; PrintShade +SHADE_BW EQU $00 +SHADE_GREYSCALE EQU $01 +SHADE_COLOR EQU $02 + +; PaperSize (all paper sizes have a zero in the lowest nybble) +US_LETTER EQU $00 +US_LEGAL EQU $10 +N_TRACTOR EQU $20 +W_TRACTOR EQU $30 +CUSTOM EQU $40 + +; New PaperSizes for V36: +EURO_A0 EQU $50 ; European size A0: 841 x 1189 +EURO_A1 EQU $60 ; European size A1: 594 x 841 +EURO_A2 EQU $70 ; European size A2: 420 x 594 +EURO_A3 EQU $80 ; European size A3: 297 x 420 +EURO_A4 EQU $90 ; European size A4: 210 x 297 +EURO_A5 EQU $A0 ; European size A5: 148 x 210 +EURO_A6 EQU $B0 ; European size A6: 105 x 148 +EURO_A7 EQU $C0 ; European size A7: 74 x 105 +EURO_A8 EQU $D0 ; European size A8: 52 x 74 + +; PrinterType +CUSTOM_NAME EQU $00 +ALPHA_P_101 EQU $01 +BROTHER_15XL EQU $02 +CBM_MPS1000 EQU $03 +DIAB_630 EQU $04 +DIAB_ADV_D25 EQU $05 +DIAB_C_150 EQU $06 +EPSON EQU $07 +EPSON_JX_80 EQU $08 +OKIMATE_20 EQU $09 +QUME_LP_20 EQU $0A +; new printer entries, 3 October 1985 +HP_LASERJET EQU $0B +HP_LASERJET_PLUS EQU $0C + + +; Serial Input Buffer Sizes +SBUF_512 EQU $00 +SBUF_1024 EQU $01 +SBUF_2048 EQU $02 +SBUF_4096 EQU $03 +SBUF_8000 EQU $04 +SBUF_16000 EQU $05 + +; Serial Bit Masks +SREAD_BITS EQU $F0 ; pf_SerRWBits +SWRITE_BITS EQU $0F + +SSTOP_BITS EQU $F0 ; pf_SerStopBuf +SBUFSIZE_BITS EQU $0F + +SPARITY_BITS EQU $F0 ; pf_SerParShk +SHSHAKE_BITS EQU $0F + +; Serial Parity (high nibble, but here shifted right, as by C-macro SPARNUM) +SPARITY_NONE EQU $00 +SPARITY_EVEN EQU $01 +SPARITY_ODD EQU $02 +; New parity definitions for V36: +SPARITY_MARK EQU $03 +SPARITY_SPACE EQU $04 + +; Serial Handshake Mode (low nibble, mask by SHSHAKE_BITS) +SHSHAKE_XON EQU $00 +SHSHAKE_RTS EQU $01 +SHSHAKE_NONE EQU $02 + +; new defines for PrintFlags +CORRECT_RED EQU $0001 ; color correct red shades +CORRECT_GREEN EQU $0002 ; color correct green shades +CORRECT_BLUE EQU $0004 ; color correct blue shades + +CENTER_IMAGE EQU $0008 ; center image on paper + +IGNORE_DIMENSIONS EQU $0000 ; ignore max width/height settings +BOUNDED_DIMENSIONS EQU $0010 ; use max width/height as boundaries +ABSOLUTE_DIMENSIONS EQU $0020 ; use max width/height as absolutes +PIXEL_DIMENSIONS EQU $0040 ; use max width/height as prt pixels +MULTIPLY_DIMENSIONS EQU $0080 ; use max width/height as multipliers + +INTEGER_SCALING EQU $0100 ; force integer scaling + +ORDERED_DITHERING EQU $0000 ; ordered dithering +HALFTONE_DITHERING EQU $0200 ; halftone dithering +FLOYD_DITHERING EQU $0400 ; floyd-steinberg dithering + +ANTI_ALIAS EQU $0800 ; anti-alias image +GREY_SCALE2 EQU $1000 ; for use with hi-res monitor + +CORRECT_RGB_MASK EQU (CORRECT_RED+CORRECT_GREEN+CORRECT_BLUE) +DIMENSIONS_MASK EQU (BOUNDED_DIMENSIONS+ABSOLUTE_DIMENSIONS+PIXEL_DIMENSIONS+MULTIPLY_DIMENSIONS) +DITHERING_MASK EQU (HALFTONE_DITHERING+FLOYD_DITHERING) + + ENDC diff --git a/extra/rtg_driver/include/intuition/screens.i b/extra/rtg_driver/include/intuition/screens.i new file mode 100644 index 00000000..1d680a34 --- /dev/null +++ b/extra/rtg_driver/include/intuition/screens.i @@ -0,0 +1,565 @@ + IFND INTUITION_SCREENS_I +INTUITION_SCREENS_I SET 1 +** +** $VER: screens.i 38.25 (15.2.1993) +** Includes Release 45.1 +** +** The Screen and NewScreen structures and attributes +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND GRAPHICS_GFX_I + INCLUDE "graphics/gfx.i" + ENDC + + IFND GRAPHICS_CLIP_I + INCLUDE "graphics/clip.i" + ENDC + + IFND GRAPHICS_VIEW_I + INCLUDE "graphics/view.i" + ENDC + + IFND GRAPHICS_RASTPORT_I + INCLUDE "graphics/rastport.i" + ENDC + + IFND GRAPHICS_LAYERS_I + INCLUDE "graphics/layers.i" + ENDC + + IFND UTILITY_TAGITEM_I + INCLUDE "utility/tagitem.i" + ENDC + +* +* NOTE: intuition/iobsolete.i is included at the END of this file! +* + +; ======================================================================== +; === DrawInfo ========================================================= +; ======================================================================== + +* This is a packet of information for graphics rendering. It originates +* with a Screen, and is gotten using GetScreenDrawInfo( screen ); + +* You can use the Intuition version number to tell which fields are +* present in this structure. +* +* DRI_VERSION of 1 corresponds to V37 release. +* DRI_VERSION of 2 corresponds to V39, and includes three new pens +* and the dri_CheckMark and dri_AmigaKey fields. +* +* Note that sometimes applications need to create their own DrawInfo +* structures, in which case the DRI_VERSION won't correspond exactly +* to the OS version!!! + +DRI_VERSION EQU 2 + + STRUCTURE DrawInfo,0 + UWORD dri_Version ; will be DRI_VERSION + UWORD dri_NumPens ; guaranteed to be >= 9 + APTR dri_Pens ; pointer to pen array + APTR dri_Font ; screen default font + UWORD dri_Depth ; (initial) depth of screen bitmap + ; from DisplayInfo database for initial display mode + UWORD dri_ResolutionX + UWORD dri_ResolutionY + ULONG dri_Flags + ; New for V39: dri_CheckMark, dri_AmigaKey + APTR dri_CheckMark ; pointer to scaled checkmark image + ; Will be NULL if DRI_VERSION < 2 + APTR dri_AmigaKey ; pointer to scaled Amiga-key image + ; Will be NULL if DRI_VERSION < 2 + STRUCT dri_longreserved,20 + +DRIF_NEWLOOK EQU $00000001 ; specified SA_Pens, full treatment +DRIB_NEWLOOK EQU 0 + + ; rendering pen number indexes into DrawInfo.dri_Pens[] + ENUM + EITEM DETAILPEN ; compatible Intuition rendering pens + EITEM BLOCKPEN, + EITEM TEXTPEN ; text on background (pen = 0) + EITEM SHINEPEN ; bright edge on bas-relief + EITEM SHADOWPEN ; dark edge + EITEM FILLPEN ; active window fill + EITEM FILLTEXTPEN ; text over FILLPEN + EITEM BACKGROUNDPEN ; may not always be color 0 + EITEM HIGHLIGHTTEXTPEN ; highlighted text, against BACKGROUNDPEN +; New for V39, only present if DRI_VERSION >= 2: + EITEM BARDETAILPEN ; text/detail in screen-bar/menus + EITEM BARBLOCKPEN ; screen-bar/menus fill + EITEM BARTRIMPEN ; trim under menu-bar + + EITEM NUMDRIPENS + +* New for V39: It is sometimes useful to specify that a pen value +* is to be the complement of color zero to three. The "magic" numbers +* serve that purpose: + +PEN_C3 EQU $FEFC ; Complement of color 3 +PEN_C2 EQU $FEFD ; Complement of color 2 +PEN_C1 EQU $FEFE ; Complement of color 1 +PEN_C0 EQU $FEFF ; Complement of color 0 + +; ======================================================================== +; === Screen ============================================================= +; ======================================================================== + +* VERY IMPORTANT NOTE ABOUT Screen->BitMap. In the future, bitmaps +* will need to grow. The embedded instance of a bitmap in the screen +* will no longer be large enough to hold the whole description of +* the bitmap. +* +* YOU ARE STRONGLY URGED to use Screen->RastPort.BitMap in place of +* &Screen->BitMap whenever and whereever possible. + + STRUCTURE Screen,0 + + APTR sc_NextScreen ; linked list of screens + APTR sc_FirstWindow ; linked list Screen's Windows + + WORD sc_LeftEdge ; parameters of the screen + WORD sc_TopEdge ; parameters of the screen + + WORD sc_Width + WORD sc_Height + + WORD sc_MouseY ; position relative to upper-left + WORD sc_MouseX ; position relative to upper-left + + WORD sc_Flags ; see definitions below + + APTR sc_Title ; null-terminated Title text + APTR sc_DefaultTitle ; for Windows without ScreenTitle + + ; Bar sizes for this Screen and all Window's in this Screen + BYTE sc_BarHeight + BYTE sc_BarVBorder + BYTE sc_BarHBorder + BYTE sc_MenuVBorder + BYTE sc_MenuHBorder + BYTE sc_WBorTop + BYTE sc_WBorLeft + BYTE sc_WBorRight + BYTE sc_WBorBottom + + BYTE sc_KludgeFill00 ; This is strictly for word-alignment + + ; the display data structures for this Screen + APTR sc_Font ; this screen's default font + STRUCT sc_ViewPort,vp_SIZEOF ; describing the Screen's display + STRUCT sc_RastPort,rp_SIZEOF ; describing Screen rendering + STRUCT sc_BitMap,bm_SIZEOF ; SEE WARNING ABOVE! + STRUCT sc_LayerInfo,li_SIZEOF ; each screen gets a LayerInfo + + APTR sc_FirstGadget + + BYTE sc_DetailPen ; for bar/border/gadget rendering + BYTE sc_BlockPen ; for bar/border/gadget rendering + + ; the following variable(s) are maintained by Intuition to support the + ; DisplayBeep() color flashing technique + WORD sc_SaveColor0 + + ; This layer is for the Screen and Menu bars + APTR sc_BarLayer ; was "BarLayer" + + APTR sc_ExtData + + APTR sc_UserData ; general-purpose pointer to User data + + LABEL sc_SIZEOF ; actually, you have no business talking about + ; or relying on the size of a screen structure + + +; --- FLAGS SET BY INTUITION ------------------------------------------------- +; The SCREENTYPE bits are reserved for describing various Screen types +; available under Intuition. +SCREENTYPE EQU $000F ; all the screens types available +; --- the definitions for the Screen Type ------------------------------------ +WBENCHSCREEN EQU $0001 ; identifies the Workbench screen +PUBLICSCREEN EQU $0002 ; public shared (custom) screen +CUSTOMSCREEN EQU $000F ; for that special look + +SHOWTITLE EQU $0010 ; this gets set by a call to ShowTitle() + +BEEPING EQU $0020 ; set when Screen is beeping + +CUSTOMBITMAP EQU $0040 ; if you are supplying your own BitMap + +SCREENBEHIND EQU $0080 ; if you want your screen to open behind + ; already open screens + +SCREENQUIET EQU $0100 ; if you do not want Intuition to render + ; into your screen (gadgets, title) + +SCREENHIRES EQU $0200 ; do not use lowres gadgets (set by intuition) + +STDSCREENHEIGHT EQU -1 ; supply in NewScreen.Height +STDSCREENWIDTH EQU -1 ; supply in NewScreen.Width + +NS_EXTENDED EQU $1000 ; means ns_Extenion is valid +AUTOSCROLL EQU $4000 ; automatic scrolling of large raster + +* New for V39: +PENSHARED EQU $0400 ; Screen opener set {SA_SharePens,TRUE} + +* Screen attribute tag ID's. These are used in the ti_Tag field of +* TagItem arrays passed to OpenScreenTagList() (or in the +* ExtNewScreen.Extension field). + +* Screen attribute tags. Please use these versions, not those in +* iobsolete.h. + + ENUM TAG_USER+33 +* +* these items specify items equivalent to fields in NewScreen + EITEM SA_Left ; traditional screen positions and dimensions + EITEM SA_Top + EITEM SA_Width + EITEM SA_Height + EITEM SA_Depth ; screen bitmap depth + EITEM SA_DetailPen ; serves as default for windows, too + EITEM SA_BlockPen + EITEM SA_Title ; default screen title + + EITEM SA_Colors ; ti_Data is an array of struct ColorSpec, + ; terminated by ColorIndex = -1. Specifies + ; initial screen palette colors. + ; Also see SA_Colors32 for use under V39. + + EITEM SA_ErrorCode ; ti_Data points to LONG error code (values below) + EITEM SA_Font ; equiv. to NewScreen.Font + EITEM SA_SysFont ; Selects one of the preferences system fonts: + ; 0 - old DefaultFont, fixed-width + ; 1 - WB Screen preferred font + + + EITEM SA_Type ; ti_Data is PUBLICSCREEN or CUSTOMSCREEN. For other + ; fields of NewScreen.Type, see individual tags, + ; eg. SA_Behind, SA_Quiet. + + EITEM SA_BitMap ; ti_Data is pointer to custom BitMap. This + ; implies type of CUSTOMBITMAP + + EITEM SA_PubName ; presence of this tag means that the screen + ; is to be a public screen. Please specify + ; BEFORE the two tags below + + EITEM SA_PubSig + EITEM SA_PubTask ; Task ID and signal for being notified that + ; the last window has closed on a public screen. + + + EITEM SA_DisplayID ; ti_Data is new extended display ID from + ; (V37) or from + ; (V39 and up) + + EITEM SA_DClip ; ti_Data points to a rectangle which defines + ; screen display clip region + + EITEM SA_Overscan ; Set to one of the OSCAN_ + ; specifiers below to get a system standard + ; overscan region for your display clip, + ; screen dimensions (unless otherwise specified), + ; and automatically centered position (partial + ; support only so far). + + EITEM SA_Obsolete1 ; obsolete S_MONITORNAME + +* booleans * + EITEM SA_ShowTitle ; boolean equivalent to flag SHOWTITLE + EITEM SA_Behind ; boolean equivalent to flag SCREENBEHIND + EITEM SA_Quiet ; boolean equivalent to flag SCREENQUIET + EITEM SA_AutoScroll ; boolean equivalent to flag AUTOSCROLL + EITEM SA_Pens ; array as in DrawInfo, terminated by -1 + EITEM SA_FullPalette ; boolean: initialize color table to entire + ; preferences palette (32 for V36), rather + ; than compatible pens 0-3, 17-19, with + ; remaining palette as returned by GetColorMap() + + + EITEM SA_ColorMapEntries ; New for V39: + ; Allows you to override the number of entries + ; in the ColorMap for your screen. Intuition + ; normally allocates (1<dri_Pens, + ; Intuition obtains them in shared mode (see + ; graphics.library/ObtainPen()). For compatibility, + ; Intuition obtains the other pens of a public + ; screen as PEN_EXCLUSIVE. Screens that wish to + ; manage the pens themselves should generally set + ; this tag to TRUE. This instructs Intuition to + ; leave the other pens unallocated. + + EITEM SA_BackFill ; New for V39: + ; provides a "backfill hook" for your screen's + ; Layer_Info. + ; See layers.library/InstallLayerInfoHook() + + EITEM SA_Interleaved ; New for V39: + ; Boolean tag requesting that the bitmap + ; allocated for you be interleaved. + ; (Defaults to FALSE). + + EITEM SA_Colors32 ; New for V39: + ; Tag to set the screen's initial palette colors + ; at 32 bits-per-gun. ti_Data is a pointer + ; to a table to be passed to the + ; graphics.library/LoadRGB32() function. + ; This format supports both runs of color + ; registers and sparse registers. See the + ; autodoc for that function for full details. + ; Any color set here has precedence over + ; the same register set by SA_Colors. + + EITEM SA_VideoControl ; New for V39: + ; ti_Data is a pointer to a taglist that Intuition + ; will pass to graphics.library/VideoControl(), + ; upon opening the screen. + + EITEM SA_FrontChild ; New for V39: + ; ti_Data is a pointer to an already open screen + ; that is to be the child of the screen being + ; opened. The child screen will be moved to the + ; front of its family. + + EITEM SA_BackChild ; New for V39: + ; ti_Data is a pointer to an already open screen + ; that is to be the child of the screen being + ; opened. The child screen will be moved to the + ; back of its family. + + EITEM SA_LikeWorkbench ; New for V39: + ; Set ti_Data to 1 to request a screen which + ; is just like the Workbench. This gives + ; you the same screen mode, depth, size, + ; colors, etc., as the Workbench screen. + + EITEM SA_Reserved ; Reserved for private Intuition use + + EITEM SA_MinimizeISG ; New for V40: + ; For compatibility, Intuition always ensures + ; that the inter-screen gap is at least three + ; non-interlaced lines. If your application + ; would look best with the smallest possible + ; inter-screen gap, set ti_Data to TRUE. + ; If you use the new graphics VideoControl() + ; VC_NoColorPaletteLoad tag for your screen's + ; ViewPort, you should also set this tag. + + + +* OpenScreen error codes, which are returned in the (optional) LONG +* pointed to by ti_Data for the SA_ErrorCode tag item + +OSERR_NOMONITOR EQU (1) ; named monitor spec not available +OSERR_NOCHIPS EQU (2) ; you need newer custom chips +OSERR_NOMEM EQU (3) ; couldn't get normal memory +OSERR_NOCHIPMEM EQU (4) ; couldn't get chipmem +OSERR_PUBNOTUNIQUE EQU (5) ; public screen name already used +OSERR_UNKNOWNMODE EQU (6) ; don't recognize mode asked for +OSERR_TOODEEP EQU (7) ; Screen deeper than HW supports +OSERR_ATTACHFAIL EQU (8) ; Failed to attach screens +OSERR_NOTAVAILABLE EQU (9) ; Mode not available for other reason + +; ======================================================================== +; === NewScreen ========================================================== +; ======================================================================== +; NOTE: to use Extension field, you need to use ExtNewScreen, below + STRUCTURE NewScreen,0 + + WORD ns_LeftEdge ; initial Screen dimensions + WORD ns_TopEdge ; initial Screen dimensions + WORD ns_Width ; initial Screen dimensions + WORD ns_Height ; initial Screen dimensions + WORD ns_Depth ; initial Screen dimensions + + BYTE ns_DetailPen ; default rendering pens (for Windows too) + BYTE ns_BlockPen ; default rendering pens (for Windows too) + + WORD ns_ViewModes ; display "modes" for this Screen + + WORD ns_Type ; Intuition Screen Type specifier + + APTR ns_Font ; default font for Screen and Windows + + APTR ns_DefaultTitle ; Title when Window doesn't care + + APTR ns_Gadgets ; UNUSED: Leave this NULL + + ; if you are opening a CUSTOMSCREEN and already have a BitMap + ; that you want used for your Screen, you set the flags CUSTOMBITMAP in + ; the Types variable and you set this variable to point to your BitMap + ; structure. The structure will be copied into your Screen structure, + ; after which you may discard your own BitMap if you want + APTR ns_CustomBitMap + LABEL ns_SIZEOF + +; For compatibility reasons, we need a new structure for extending +; NewScreen. Use this structure is you need to use the new Extension +; field. +; NOTE WELL: this structure may be extended again in the future. +;Writing code which depends on its size is not allowed. + + STRUCTURE ExtNewScreen,ns_SIZEOF + + APTR ens_Extension ; struct TagItem * + ; more specification data, scanned if + ; NS_EXTENDED is set in ns_Type + + LABEL ens_SIZEOF + +* === Overscan Types === +OSCAN_TEXT EQU 1 ; entirely visible +OSCAN_STANDARD EQU 2 ; just past edges +OSCAN_MAX EQU 3 ; as much as possible +OSCAN_VIDEO EQU 4 ; even more than is possible + + +* === Public Shared Screen Node === + +* This is the representative of a public shared screen. +* This is an internal data structure, but some functions may +* present a copy of it to the calling application. In that case, +* be aware that the screen pointer of the structure can NOT be +* used safely, since there is no guarantee that the referenced +* screen will remain open and a valid data structure. + + STRUCTURE PubScreenNode,LN_SIZE + APTR psn_Screen ; pointer to screen itself + UWORD psn_Flags ; below + WORD psn_Size ; includes name buffer size + WORD psn_VisitorCount ; how many visitor windows + APTR psn_SigTask ; who to signal when visitors gone + UBYTE psn_SigBit ; which signal + UBYTE psn_Pad1 ; word align + LABEL psn_SIZEOF + +* psn_Flags values +PSNF_PRIVATE EQU $0001 + +* NOTE: Due to a bug in NextPubScreen(), make sure your buffer +* actually has MAXPUBSCREENNAME+1 characters in it! + +MAXPUBSCREENNAME EQU 139 ; names no longer, please + +; pub screen modes +SHANGHAI EQU $0001 ; put workbench windows on pub screen +POPPUBSCREEN EQU $0002 ; pop pub screen to front when visitor opens + +* New for V39: Intuition has new screen depth-arrangement and movement +* functions called ScreenDepth() and ScreenPosition() respectively. +* These functions permit the old behavior of ScreenToFront(), +* ScreenToBack(), and MoveScreen(). ScreenDepth() also allows +* independent depth control of attached screens. ScreenPosition() +* optionally allows positioning screens even though they were opened +* {SA_Draggable,FALSE}. + +* For ScreenDepth(), specify one of SDEPTH_TOFRONT or SDEPTH_TOBACK, +* and optionally also SDEPTH_INFAMILY. +* +* NOTE: ONLY THE OWNER OF THE SCREEN should ever specify +* SDEPTH_INFAMILY. Commodities, "input helper" programs, +* or any other program that did not open a screen should never +* use that flag. (Note that this is a style-behavior +* requirement; there is no technical requirement that the +* task calling this function need be the task which opened +* the screen). + +SDEPTH_TOFRONT EQU 0 ; Bring screen to front +SDEPTH_TOBACK EQU 1 ; Send screen to back +SDEPTH_INFAMILY EQU 2 ; Move an attached screen with + ; respect to other screens of + ; its family + +* Here's an obsolete name equivalent to SDEPTH_INFAMILY: +SDEPTH_CHILDONLY EQU SDEPTH_INFAMILY + + +* For ScreenPosition(), specify one of SPOS_RELATIVE, SPOS_ABSOLUTE, +* or SPOS_MAKEVISIBLE to describe the kind of screen positioning you +* wish to perform: +* +* SPOS_RELATIVE: The x1 and y1 parameters to ScreenPosition() describe +* the offset in coordinates you wish to move the screen by. +* SPOS_ABSOLUTE: The x1 and y1 parameters to ScreenPosition() describe +* the absolute coordinates you wish to move the screen to. +* SPOS_MAKEVISIBLE: (x1,y1)-(x2,y2) describes a rectangle on the +* screen which you would like autoscrolled into view. +* +* You may additionally set SPOS_FORCEDRAG along with any of the +* above. Set this if you wish to reposition an {SA_Draggable,FALSE} +* screen that you opened. +* +* NOTE: ONLY THE OWNER OF THE SCREEN should ever specify +* SPOS_FORCEDRAG. Commodities, "input helper" programs, +* or any other program that did not open a screen should never +* use that flag. + +SPOS_RELATIVE EQU 0 ; Coordinates are relative + +SPOS_ABSOLUTE EQU 1 ; Coordinates are expressed as + ; absolutes, not relatives. + +SPOS_MAKEVISIBLE EQU 2 ; Coordinates describe a box on + ; the screen you wish to be + ; made visible by autoscrolling + +SPOS_FORCEDRAG EQU 4 ; Move non-draggable screen + +* New for V39: Intuition supports double-buffering in screens, +* with friendly interaction with menus and certain gadgets. +* For each buffer, you need to get one of these structures +* from the AllocScreenBuffer() call. Never allocate your +* own ScreenBuffer structures! +* +* The sb_DBufInfo field is for your use. See the graphics.library +* AllocDBufInfo() autodoc for details. + + STRUCTURE ScreenBuffer,0 + APTR sb_BitMap ; BitMap of this buffer + APTR sb_DBufInfo ; DBufInfo for this buffer + LABEL sb_SIZEOF + + +* These are the flags that may be passed to AllocScreenBuffer(). + +SB_SCREEN_BITMAP EQU 1 +SB_COPY_BITMAP EQU 2 + +* Include obsolete identifiers: + IFND INTUITION_IOBSOLETE_I + INCLUDE "intuition/iobsolete.i" + ENDC + + ENDC diff --git a/extra/rtg_driver/include/intuition/sghooks.i b/extra/rtg_driver/include/intuition/sghooks.i new file mode 100644 index 00000000..abab3c0c --- /dev/null +++ b/extra/rtg_driver/include/intuition/sghooks.i @@ -0,0 +1,214 @@ + IFND INTUITION_SGHOOKS_I +INTUITION_SGHOOKS_I SET 1 +** +** $VER: sghooks.i 38.1 (11.11.1991) +** Includes Release 45.1 +** +** String gadget extensions and hooks +** +** (C) Copyright 1988-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + STRUCTURE StringExtend,0 + ; display specifications + APTR sex_Font ; must be an open Font (not TextAttr) + STRUCT sex_Pens,2 ; color of text/background + STRUCT sex_ActivePens,2 ; colors when gadget is active + + ; edit specifications + ULONG sex_InitialModes ; initial mode flags, below + APTR sex_EditHook ; if non-NULL, must supply WorkBuffer + APTR sex_WorkBuffer ; must be as large as StringInfo.Buffer + + STRUCT sex_Reserved,16 ; set to 0 + LABEL sex_SIZEOF + + + STRUCTURE SGWork,0 + ; set up when gadget is first activated + APTR sgw_Gadget ; the contestant itself + APTR sgw_StringInfo ; easy access to sinfo + APTR sgw_WorkBuffer ; intuition's planned result + APTR sgw_PrevBuffer ; what was there before + ULONG sgw_Modes ; current mode + + ; modified for each input event + APTR sgw_IEvent ; actual event: do not change + UWORD sgw_Code ; character code, if one byte + WORD sgw_BufferPos ; cursor position + WORD sgw_NumChars + ULONG sgw_Actions ; what Intuition will do + LONG sgw_LongInt ; temp storage for longint + + APTR sgw_GadgetInfo ; see cghooks.h + UWORD sgw_EditOp ; from constants below + LABEL sgw_SIZEOF ; this may change as the structure is extended + + +* SGWork.EditOp - +* These values indicate what basic type of operation the global +* editing hook has performed on the string before your gadget's custom +* editing hook gets called. You do not have to be concerned with the +* value your custom hook leaves in the sgw_EditOp field, only if you +* write a global editing hook. +* +* For most of these general edit operations, you'll want to compare +* the BufferPos and NumChars of the StringInfo (before global editing) +* and SGWork (after global editing). + +EO_NOOP EQU ($0001) + ; did nothing +EO_DELBACKWARD EQU ($0002) + ; deleted some chars (maybe 0). +EO_DELFORWARD EQU ($0003) + ; deleted some characters under and in front of the cursor +EO_MOVECURSOR EQU ($0004) + ; moved the cursor +EO_ENTER EQU ($0005) + ; "enter" or "return" key, terminate +EO_RESET EQU ($0006) + ; current Intuition-style undo +EO_REPLACECHAR EQU ($0007) + ; replaced one character and (maybe) advanced cursor +EO_INSERTCHAR EQU ($0008) + ; inserted one char into string or added one at end +EO_BADFORMAT EQU ($0009) + ; didn't like the text data, e.g., Bad LONGINT +EO_BIGCHANGE EQU ($000A) ; unused by Intuition + ; complete or major change to the text, e.g. new string +EO_UNDO EQU ($000B) ; unused by Intuition + ; some other style of undo +EO_CLEAR EQU ($000C) + ; clear the string +EO_SPECIAL EQU ($000D) ; unused by Intuition + ; some operation that doesn't fit into the categories here + + +; Mode Flags definitions (ONLY first group allowed as InitialModes) + +SGM_REPLACE EQU 1 +SGMB_REPLACE EQU 0 +SGMF_REPLACE EQU 1 +; please initialize StringInfo with in-range value of BufferPos +; if you are using SGM_REPLACE mode. + +; fixed length buffer, always set SGM_REPLACE, too. +SGM_FIXEDFIELD EQU $00000002 +SGMB_FIXEDFIELD EQU 1 +SGMF_FIXEDFIELD EQU 2 + +; don't filter control chars +SGM_NOFILTER EQU $00000004 +SGMB_NOFILTER EQU 2 +SGMF_NOFILTER EQU 4 + +; SGM_EXITHELP is new for V37, and ignored by V36: +; exit with code = 0x5F if HELP hit +SGM_EXITHELP EQU $00000080 +SGMB_EXITHELP EQU 7 +SGMF_EXITHELP EQU $80 + + +; String Gadget Action Flags (put in SGWork.Actions by EditHook) +SGA_USE EQU $1 ; use contents of SGWork +SGAB_USE EQU 0 +SGAF_USE EQU $1 + +SGA_END EQU $2 ; terminate gadget, code in Code field +SGAB_END EQU 1 +SGAF_END EQU $2 + +SGA_BEEP EQU $4 ; flash the screen for the user +SGAB_BEEP EQU 2 +SGAF_BEEP EQU $4 + +SGA_REUSE EQU $8 ; reuse input event +SGAB_REUSE EQU 3 +SGAF_REUSE EQU $8 + +SGA_REDISPLAY EQU $10 ; gadget visuals changed +SGAB_REDISPLAY EQU 4 +SGAF_REDISPLAY EQU $10 + +; New for V37: +SGA_NEXTACTIVE EQU $20 ; Make next possible gadget active. +SGAB_NEXTACTIVE EQU 5 +SGAF_NEXTACTIVE EQU $20 + +; New for V37: +SGA_PREVACTIVE EQU $40 ; Make previous possible gadget active. +SGAB_PREVACTIVE EQU 6 +SGAF_PREVACTIVE EQU $40 + + +; function id for only existing custom string gadget edit hook +SGH_KEY EQU 1 ; process editing keystroke +SGH_CLICK EQU 2 ; process mouse click cursor position + +* Here's a brief summary of how the custom string gadget edit hook works: +* You provide a hook in StringInfo.Extension.EditHook. +* The hook is called in the standard way with the 'object' +* a pointer to SGWork, and the 'message' a pointer to a command +* block, starting either with (longword) SGH_KEY, SGH_CLICK, +* or something new. +* +* You return 0 if you don't understand the command (SGH_KEY is +* required and assumed). Return non-zero if you implement the +* command. +* +* SGH_KEY: +* There are no parameters following the command longword. +* +* Intuition will put its idea of proper values in the SGWork +* before calling you, and if you leave SGA_USE set in the +* SGWork.Actions field, Intuition will use the values +* found in SGWork fields WorkBuffer, NumChars, BufferPos, +* and LongInt, copying the WorkBuffer back to the StringInfo +* Buffer. +* +* NOTE WELL: You may NOT change other SGWork fields. +* +* If you clear SGA_USE, the string gadget will be unchanged. +* +* If you set SGA_END, Intuition will terminate the activation +* of the string gadget. If you also set SGA_REUSE, Intuition +* will reuse the input event after it deactivates your gadget. +* +* In this case, Intuition will put the value found in SGWork.Code +* into the IntuiMessage.Code field of the IDCMP_GADGETUP message it +* sends to the application. +* +* If you set SGA_BEEP, Intuition will call DisplayBeep(); use +* this if the user has typed in error, or buffer is full. +* +* Set SGA_REDISPLAY if the changes to the gadget warrant a +* gadget redisplay. Note: cursor movement requires a redisplay. +* +* Starting in V37, you may set SGA_PREVACTIVE or SGA_NEXTACTIVE +* when you set SGA_END. This tells Intuition that you want +* the next or previous gadget with GFLG_TABCYCLE to be activated. +* +* SGH_CLICK: +* This hook command is called when Intuition wants to position +* the cursor in response to a mouse click in the string gadget. +* +* Again, here are no parameters following the command longword. +* +* This time, Intuition has already calculated the mouse position +* character cell and put it in SGWork.BufferPos. The previous +* BufferPos value remains in the SGWork.StringInfo.BufferPos. +* +* Intuition will again use the SGWork fields listed above for +* SGH_KEY. One restriction is that you are NOT allowed to set +* SGA_END or SGA_REUSE for this command. Intuition will not +* stand for a gadget which goes inactive when you click in it. +* +* You should always leave the SGA_REDISPLAY flag set, since Intuition +* uses this processing when activating a string gadget. + + ENDC diff --git a/extra/rtg_driver/include/libraries/amigaguide.i b/extra/rtg_driver/include/libraries/amigaguide.i new file mode 100644 index 00000000..19d62138 --- /dev/null +++ b/extra/rtg_driver/include/libraries/amigaguide.i @@ -0,0 +1,248 @@ + IFND LIBRARIES_AMIGAGUIDE_I +LIBRARIES_AMIGAGUIDE_I SET 1 +** +** $VER: amigaguide.i 44.1 (14.3.99) +** Includes Release 45.1 +** +** Interface definitions for AmigaGuide(tm) hypertext system +** +** Copyright © 1990-2001 Amiga, Inc. +** All Rights Reserved +** + +;------------------------------------------------------------------------------ + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC ;* EXEC_TYPES_I + + IFND EXEC_LISTS_I + INCLUDE "exec/lists.i" + ENDC ;* EXEC_LISTS_I + + IFND EXEC_NODES_I + INCLUDE "exec/nodes.i" + ENDC ;* EXEC_NODES_I + + IFND EXEC_SEMAPHORES_I + INCLUDE "exec/semaphores.i" + ENDC + + IFND INTUITION_INTUITION_I + INCLUDE "intuition/intuition.i" + ENDC + + IFND INTUITION_SCREENS_I + INCLUDE "intuition/screens.i" + ENDC + + IFND DO_DOS_I + INCLUDE "dos/dos.i" + ENDC + + IFND UTILITY_TAGITEM_I + INCLUDE "utility/tagitem.i" + ENDC + + IFND UTILITY_HOOKS_I + INCLUDE "utility/hooks.i" + ENDC + +;------------------------------------------------------------------------------ + + IFND APSH_TOOL_ID +APSH_TOOL_ID equ 11000 +StartupMsgID equ (APSH_TOOL_ID+1) ; Startup message +LoginToolID equ (APSH_TOOL_ID+2) ; Login a tool SIPC port +LogoutToolID equ (APSH_TOOL_ID+3) ; Logout a tool SIPC port +ShutdownMsgID equ (APSH_TOOL_ID+4) ; Shutdown message +ActivateToolID equ (APSH_TOOL_ID+5) ; Activate tool +DeactivateToolID equ (APSH_TOOL_ID+6) ; Deactivate tool +ActiveToolID equ (APSH_TOOL_ID+7) ; Tool Active +InactiveToolID equ (APSH_TOOL_ID+8) ; Tool Inactive +ToolStatusID equ (APSH_TOOL_ID+9) ; Status message +ToolCmdID equ (APSH_TOOL_ID+10) ; Tool command message +ToolCmdReplyID equ (APSH_TOOL_ID+11) ; Reply to tool command +ShutdownToolID equ (APSH_TOOL_ID+12) ; Shutdown tool + ENDC + +;------------------------------------------------------------------------------ + +; Attributes accepted by GetAmigaGuideAttr() +AGA_Dummy equ (TAG_USER) +AGA_Path equ (AGA_Dummy+1) +AGA_XRefList equ (AGA_Dummy+2) +AGA_Activate equ (AGA_Dummy+3) +AGA_Context equ (AGA_Dummy+4) + +AGA_HelpGroup equ (AGA_Dummy+5) + ; (ULONG) unique window identifier + +AGA_ARexxPort equ (AGA_Dummy+9) + ; (struct MsgPort *) Pointer to the ARexx message port (V40) + +AGA_ARexxPortName equ (AGA_Dummy+10) + ; (STRPTR) Used to specify the ARexx port name (V40) (not copied) + +AGA_Secure equ (AGA_Dummy+11) + ; (BOOL) Disable "ONOPEN", "ONCLOSE" and "LINK RX", "LINK RXS", "LINK SYSTEM" commands (V41) + +;------------------------------------------------------------------------------ + + STRUCTURE AmigaGuideMsg,0 + STRUCT agm_Msg,MN_SIZE ; Embedded Exec message structure + ULONG agm_Type; ; Type of message + APTR agm_Data; ; Pointer to message data + ULONG agm_DSize; ; Size of message data + ULONG agm_DType; ; Type of message data + ULONG agm_Pri_Ret; ; Primary return value + ULONG agm_Sec_Ret; ; Secondary return value + APTR agm_System1; + APTR agm_System2; + LABEL AmigaGuideMsg_SIZEOF + +;------------------------------------------------------------------------------ + +; Allocation description structure + STRUCTURE NewAmigaGuide,0 + BPTR nag_Lock ; Lock on the document directory + APTR nag_Name ; Name of document file + APTR nag_Screen ; Screen to place windows within + APTR nag_PubScreen ; Public screen name to open on + APTR nag_HostPort ; Application's ARexx port name + APTR nag_ClientPort ; Name to assign to the clients ARexx port + APTR nag_BaseName ; Base name of the application + ULONG nag_Flags ; Flags + APTR nag_Context ; NULL terminated context table + APTR nag_Node ; Node to align on first (defaults to Main) + LONG nag_Line ; Line to align on + APTR nag_Extens ; Tag array extens + APTR nag_Client ; Private! MUST be NULL + LABEL NewAmigaGuide_SIZEOF + +; nag_Flags + BITDEF HT,LOAD_INDEX,0 ; Force load the index at init time + BITDEF HT,LOAD_ALL,1 ; Force load the entire database at init + BITDEF HT,CACHE_NODE,2 ; Cache each node as visited + BITDEF HT,CACHE_DB,3 ; Keep the buffers around until expunge + BITDEF HT,UNIQUE,4 ; Unique ARexx port name + BITDEF HT,NOACTIVATE,5 ; Don't activate window + +;------------------------------------------------------------------------------ + +HTFC_SYSGADS equ $80000000 + +;------------------------------------------------------------------------------ + +; Callback function ID's +HTH_OPEN equ 0 +HTH_CLOSE equ 1 + +;------------------------------------------------------------------------------ + +; Error message ID's +HTERR_NOT_ENOUGH_MEMORY equ 100 +HTERR_CANT_OPEN_DATABASE equ 101 +HTERR_CANT_FIND_NODE equ 102 +HTERR_CANT_OPEN_NODE equ 103 +HTERR_CANT_OPEN_WINDOW equ 104 +HTERR_INVALID_COMMAND equ 105 +HTERR_CANT_COMPLETE equ 106 +HTERR_PORT_CLOSED equ 107 +HTERR_CANT_CREATE_PORT equ 108 +HTERR_KEYWORD_NOT_FOUND equ 113 + +;------------------------------------------------------------------------------ + +; Cross reference node + STRUCTURE XRef,0 + STRUCT xr_Node,LN_SIZE ; Embedded node + UWORD xr_Pad ; Padding + APTR xr_DF ; Document defined in (not used) + APTR xr_File ; Name of document file + APTR xr_Name ; Name of item + LONG xr_Line ; Line defined at + LABEL XRef_SIZEOF + +;------------------------------------------------------------------------------ + +; Types of cross reference nodes +XR_GENERIC equ 0 +XR_FUNCTION equ 1 +XR_COMMAND equ 2 +XR_INCLUDE equ 3 +XR_MACRO equ 4 +XR_STRUCT equ 5 +XR_FIELD equ 6 +XR_TYPEDEF equ 7 +XR_DEFINE equ 8 + +;------------------------------------------------------------------------------ + +; Callback handle + STRUCTURE AmigaGuideHost,0 + STRUCT agh_Dispatcher,h_SIZEOF ; Dispatcher + ULONG agh_Reserved ; Must be 0 + ULONG agh_Flags ; Control flags + ULONG agh_UseCnt ; Number of open nodes + APTR agh_SystemData ; Reserved for system use + APTR agh_UserData ; Application use + LABEL AmigaGuideHost_SIZEOF + +;------------------------------------------------------------------------------ + +; Methods +HM_FINDNODE equ 1 +HM_OPENNODE equ 2 +HM_CLOSENODE equ 3 +HM_EXPUNGE equ 10 ; Expunge DataBase + + +;------------------------------------------------------------------------------ + +; HM_FINDNODE + STRUCTURE opFindHost,0 + ; ULONG MethodID + APTR ofh_Attrs ; R: Additional attributes + APTR ofh_Node ; R: Name of node + APTR ofh_TOC ; W: Table of Contents + APTR ofh_Title ; W: Title to give to the node + APTR ofh_Next ; W: Next node to browse to + APTR ofh_Prev ; W: Previous node to browse to + +;------------------------------------------------------------------------------ + +; HM_OPENNODE, HM_CLOSENODE + STRUCTURE opNodeIO,0 + ; ULONG MethodID + APTR onm_Attrs ; R: Additional attributes + APTR onm_Node ; R: Node name and arguments + APTR onm_FileName ; W: File name buffer + APTR onm_DocBuffer ; W: Node buffer + ULONG onm_BuffLen ; W: Size of buffer + ULONG onm_Flags ; RW: Control flags + +; onm_Flags + BITDEF HTN,KEEP,0 ; Don't flush this node until database is closed. + BITDEF HTN,RESERVED1,1 ; Reserved for system use + BITDEF HTN,RESERVED2,2 ; Reserved for system use + BITDEF HTN,ASCII,3 ; Node is straight ASCII + BITDEF HTN,RESERVED3,4 ; Reserved for system use + BITDEF HTN,CLEAN,5 ; Remove the node from the database + BITDEF HTN,DONE,6 ; Done with node + +; onm_Attrs +HTNA_Screen equ (TAG_USER+1) ; Screen that window resides in +HTNA_Pens equ (TAG_USER+2) ; Pen array (from DrawInfo) +HTNA_Rectangle equ (TAG_USER+3) ; Window box + +;------------------------------------------------------------------------------ + +; HM_EXPUNGE + STRUCTURE opExpungeNode,0 + ; ULONG MethodID + APTR oen_Attrs ; R: Additional attributes + +;------------------------------------------------------------------------------ + + ENDC ;* LIBRARIES_AMIGAGUIDE_I diff --git a/extra/rtg_driver/include/libraries/asl.i b/extra/rtg_driver/include/libraries/asl.i new file mode 100644 index 00000000..f60cd638 --- /dev/null +++ b/extra/rtg_driver/include/libraries/asl.i @@ -0,0 +1,476 @@ + IFND LIBRARIES_ASL_I +LIBRARIES_ASL_I SET 1 +** +** $VER: asl.i 45.2 (18.11.2000) +** Includes Release 45.1 +** +** ASL library structures and constants +** +** Copyright © 1989-2001 Amiga, Inc. +** Copyright © 1989-1990 Charlie Heath +** All Rights Reserved +** + +;--------------------------------------------------------------------------- + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND EXEC_NODES_I + INCLUDE "exec/nodes.i" + ENDC + + IFND EXEC_SEMAPHORES_I + INCLUDE "exec/semaphores.i" + ENDC + + IFND GRAPHICS_TEXT_I + INCLUDE "graphics/text.i" + ENDC + + IFND GRAPHICS_DISPLAYINFO_I + INCLUDE "graphics/displayinfo.i" + ENDC + +;--------------------------------------------------------------------------- + +AslName MACRO + DC.B 'asl.library',0 + ENDM +ASL_TB equ (TAG_USER+$80000) + +;--------------------------------------------------------------------------- + +; Types of requesters known to ASL, used as arguments to AllocAslRequest() +ASL_FileRequest equ 0 +ASL_FontRequest equ 1 +ASL_ScreenModeRequest equ 2 + +;--------------------------------------------------------------------------- +;* +;* ASL File Requester data structures and constants +;* +;* This structure must only be allocated by asl.library amd is READ-ONLY! +;* Control of the various fields is provided via tags when the requester +;* is created with AllocAslRequest() and when it is displayed via +;* AslRequest() +;* + STRUCTURE FileRequester,4 + APTR fr_File ; Contents of File gadget on exit + APTR fr_Drawer ; Contents of Drawer gadget on exit + STRUCT fr_Reserved1,10 + WORD fr_LeftEdge ; Coordinates of requester on exit + WORD fr_TopEdge + WORD fr_Width + WORD fr_Height + STRUCT fr_Reserved2,2 + LONG fr_NumArgs ; Number of files selected + APTR fr_ArgList ; List of files selected + APTR fr_UserData ; You can store your own data here + STRUCT fr_Reserved3,8 + APTR fr_Pattern ; Contents of Pattern gadget on exit + +; File requester tag values, used by AllocAslRequest() and AslRequest() + +; Window control +ASLFR_Window equ ASL_TB+2 ; Parent window +ASLFR_Screen equ ASL_TB+40 ; Screen to open on if no window +ASLFR_PubScreenName equ ASL_TB+41 ; Name of public screen +ASLFR_PrivateIDCMP equ ASL_TB+42 ; Allocate private IDCMP? +ASLFR_IntuiMsgFunc equ ASL_TB+70 ; Function to handle IntuiMessages +ASLFR_SleepWindow equ ASL_TB+43 ; Block input in ASLFR_Window? +ASLFR_UserData equ ASL_TB+52 ; What to put in fr_UserData +ASLFR_PopToFront equ ASL_TB+131 ; Make the requester window visible + ; when it opens (V44) +ASLFR_Activate equ ASL_TB+132 ; Activate the requester window when + ; it opens (V45). + +; Text display +ASLFR_TextAttr equ ASL_TB+51 ; Text font to use for gadget text +ASLFR_Locale equ ASL_TB+50 ; Locale ASL should use for text +ASLFR_TitleText equ ASL_TB+1 ; Title of requester +ASLFR_PositiveText equ ASL_TB+18 ; Positive gadget text +ASLFR_NegativeText equ ASL_TB+19 ; Negative gadget text + +; Initial settings +ASLFR_InitialLeftEdge equ ASL_TB+3 ; Initial requester coordinates +ASLFR_InitialTopEdge equ ASL_TB+4 +ASLFR_InitialWidth equ ASL_TB+5 ; Initial requester dimensions +ASLFR_InitialHeight equ ASL_TB+6 +ASLFR_InitialFile equ ASL_TB+8 ; Initial contents of File gadget +ASLFR_InitialDrawer equ ASL_TB+9 ; Initial contents of Drawer gadget +ASLFR_InitialPattern equ ASL_TB+10 ; Initial contents of Pattern gadget +ASLFR_InitialShowVolumes equ ASL_TB+130 ; Initially, show the volume list + +; Options +ASLFR_Flags1 equ ASL_TB+20 ; Option flags +ASLFR_Flags2 equ ASL_TB+22 ; Additional option flags +ASLFR_DoSaveMode equ ASL_TB+44 ; Being used for saving? +ASLFR_DoMultiSelect equ ASL_TB+45 ; Do multi-select? +ASLFR_DoPatterns equ ASL_TB+46 ; Display a Pattern gadget? + +; Filtering +ASLFR_DrawersOnly equ ASL_TB+47 ; Don't display files? +ASLFR_FilterFunc equ ASL_TB+49 ; Function to filter files +ASLFR_RejectIcons equ ASL_TB+60 ; Display .info files? +ASLFR_RejectPattern equ ASL_TB+61 ; Don't display files matching pattern +ASLFR_AcceptPattern equ ASL_TB+62 ; Accept only files matching pattern +ASLFR_FilterDrawers equ ASL_TB+63 ; Also filter drawers with patterns +ASLFR_HookFunc equ ASL_TB+7 ; Combined callback function + +; Sorting +ASLFR_SetSortBy equ ASL_TB+124 ; Sort criteria (name, date, size) +ASLFR_GetSortBy equ ASL_TB+125 +ASLFR_SetSortDrawers equ ASL_TB+126 ; Placement of drawers in the list +ASLFR_GetSortDrawers equ ASL_TB+127 +ASLFR_SetSortOrder equ ASL_TB+128 ; Order (ascending or descending) +ASLFR_GetSortOrder equ ASL_TB+129 + +; Flag bits for the ASLFR_Flags1 tag + BITDEF FR,DOWILDFUNC,7 + BITDEF FR,DOMSGFUNC,6 + BITDEF FR,DOSAVEMODE,5 + BITDEF FR,PRIVATEIDCMP,4 + BITDEF FR,DOMULTISELECT,3 + BITDEF FR,DOPATTERNS,0 + +; Flag bits for the ASLFR_Flags2 tag + BITDEF FR,DRAWERSONLY,0 + BITDEF FR,FILTERDRAWERS,1 + BITDEF FR,REJECTICONS,2 + +; Sort criteria for the ASLFR_SetSortBy/ASLFR_GetSortBy tags +ASLFRSORTBY_Name equ 0 +ASLFRSORTBY_Date equ 1 +ASLFRSORTBY_Size equ 2 + +; Drawer placement for the ASLFR_SetSortDrawers/ASLFR_GetSortDrawers tags +ASLFRSORTDRAWERS_First equ 0 +ASLFRSORTDRAWERS_Mix equ 1 +ASLFRSORTDRAWERS_Last equ 2 + +; Sort order for the ASLFR_SetSortOrder/ASLFR_GetSortOrder tags +ASLFRSORTORDER_Ascend equ 0 +ASLFRSORTORDER_Descend equ 1 + +;--------------------------------------------------------------------------- +;* +;* ASL Font Requester data structures and constants +;* +;* This structure must only be allocated by asl.library amd is READ-ONLY! +;* Control of the various fields is provided via tags when the requester +;* is created with AllocAslRequest() and when it is displayed via +;* AslRequest() +;* + STRUCTURE FontRequester,8 + STRUCT fo_Attr,ta_SIZEOF ; Returned TextAttr + UBYTE fo_FrontPen ; Returned front pen + UBYTE fo_BackPen ; Returned back pen + UBYTE fo_DrawMode ; Returned drawing mode + UBYTE fo_Reserved1 + APTR fo_UserData ; You can store your own data here + WORD fo_LeftEdge ; Coordinates of requester on exit + WORD fo_TopEdge + WORD fo_Width + WORD fo_Height + STRUCT fo_TAttr,tta_SIZEOF ; Returned TTextAttr + +; Font requester tag values, used by AllocAslRequest() and AslRequest() + +; Window control +ASLFO_Window equ ASL_TB+2 ; Parent window +ASLFO_Screen equ ASL_TB+40 ; Screen to open on if no window +ASLFO_PubScreenName equ ASL_TB+41 ; Name of public screen +ASLFO_PrivateIDCMP equ ASL_TB+42 ; Allocate private IDCMP? +ASLFO_IntuiMsgFunc equ ASL_TB+70 ; Function to handle IntuiMessages +ASLFO_SleepWindow equ ASL_TB+43 ; Block input in ASLFO_Window? +ASLFO_UserData equ ASL_TB+52 ; What to put in fo_UserData +ASLFO_PopToFront equ ASL_TB+131 ; Make the requester window visible + ; when it opens (V44) +ASLFO_Activate equ ASL_TB+132 ; Activate the requester window when + ; it opens (V45). + +; Text display +ASLFO_TextAttr equ ASL_TB+51 ; Text font to use for gadget text +ASLFO_Locale equ ASL_TB+50 ; Locale ASL should use for text +ASLFO_TitleText equ ASL_TB+1 ; Title of requester +ASLFO_PositiveText equ ASL_TB+18 ; Positive gadget text +ASLFO_NegativeText equ ASL_TB+19 ; Negative gadget text + +; Initial settings +ASLFO_InitialLeftEdge equ ASL_TB+3 ; Initial requester coordinates +ASLFO_InitialTopEdge equ ASL_TB+4 +ASLFO_InitialWidth equ ASL_TB+5 ; Initial requester dimensions +ASLFO_InitialHeight equ ASL_TB+6 +ASLFO_InitialName equ ASL_TB+10 ; Initial contents of Name gadget +ASLFO_InitialSize equ ASL_TB+11 ; Initial contents of Size gadget +ASLFO_InitialStyle equ ASL_TB+12 ; Initial font style +ASLFO_InitialFlags equ ASL_TB+13 ; Initial font flags for TextAttr +ASLFO_InitialFrontPen equ ASL_TB+14 ; Initial front pen +ASLFO_InitialBackPen equ ASL_TB+15 ; Initial back pen +ASLFO_InitialDrawMode equ ASL_TB+59 ; Initial draw mode + +; Options +ASLFO_Flags equ ASL_TB+20 ; Option flags +ASLFO_DoFrontPen equ ASL_TB+44 ; Display Front color selector? +ASLFO_DoBackPen equ ASL_TB+45 ; Display Back color selector? +ASLFO_DoStyle equ ASL_TB+46 ; Display Style checkboxes? +ASLFO_DoDrawMode equ ASL_TB+47 ; Display DrawMode cycle gadget? +ASLFO_SampleText equ ASL_TB+133 ; Text to display in font sample area (V45) + +; Filtering +ASLFO_FixedWidthOnly equ ASL_TB+48 ; Only allow fixed-width fonts? +ASLFO_MinHeight equ ASL_TB+16 ; Minimum font height to display +ASLFO_MaxHeight equ ASL_TB+17 ; Maximum font height to display +ASLFO_FilterFunc equ ASL_TB+49 ; Function to filter fonts +ASLFO_HookFunc equ ASL_TB+7 ; Combined callback function +ASLFO_MaxFrontPen equ ASL_TB+66 ; Max # of colors in front palette +ASLFO_MaxBackPen equ ASL_TB+67 ; Max # of colors in back palette + +; Custom additions +ASLFO_ModeList equ ASL_TB+21 ; Substitute list for drawmodes +ASLFO_FrontColors equ ASL_TB+64 ; Color table for front pen palette +ASLFO_BackColors equ ASL_TB+65 ; Color table for back pen palette + +; Flag bits for ASLFO_Flags tag + BITDEF FO,DOFRONTPEN,0 + BITDEF FO,DOBACKPEN,1 + BITDEF FO,DOFONTSTYLE,2 + BITDEF FO,DODRAWMODE,3 + BITDEF FO,FIXEDWIDTHONLY,4 + BITDEF FO,PRIVATE,5 + BITDEF FO,DOMSGFUNC,6 + BITDEF FO,DOWILDFUNC,7 + +;--------------------------------------------------------------------------- +;* +;* ASL ScreenMode Requester data structures and constants +;* +;* This structure must only be allocated by asl.library and is READ-ONLY! +;* Control of the various fields is provided via tags when the requester +;* is created with AllocAslRequest() and when it is displayed via +;* AslRequest() +;* + STRUCTURE ScreenModeRequester,0 + ULONG sm_DisplayID ; Display mode ID + ULONG sm_DisplayWidth ; Width of display in pixels + ULONG sm_DisplayHeight ; Height of display in pixels + UWORD sm_DisplayDepth ; Number of bit-planes of display + UWORD sm_OverscanType ; Type of overscan of display + UWORD sm_AutoScroll ; Display should auto-scroll? + + ULONG sm_BitMapWidth ; Used to create your own BitMap + ULONG sm_BitMapHeight + + WORD sm_LeftEdge ; Coordinates of requester on exit + WORD sm_TopEdge + WORD sm_Width + WORD sm_Height + + BOOL sm_InfoOpened ; Info window opened on exit? + WORD sm_InfoLeftEdge ; Last coordinates of Info window + WORD sm_InfoTopEdge + WORD sm_InfoWidth + WORD sm_InfoHeight + + APTR sm_UserData ; You can store your own data here + +;* An Exec list of custom modes can be added to the list of available modes. +;* The DimensionInfo structure must be completely initialized, including the +;* Header. See . Custom mode ID's must be in the range +;* 0xFFFF0000..0xFFFFFFFF. Regular properties which apply to your custom modes +;* can be added in the dn_PropertyFlags field. Custom properties are not +;* allowed. +;* + STRUCTURE DisplayMode,LN_SIZE ; see ln_Name + STRUCT dm_DimensionInfo,dim_SIZEOF ; mode description + ULONG dm_PropertyFlags ; applicable properties + LABEL DisplayMode_SIZEOF + +; ScreenMode requester tag values, used by AllocAslRequest() and AslRequest() + +; Window control +ASLSM_Window equ ASL_TB+2 ; Parent window +ASLSM_Screen equ ASL_TB+40 ; Screen to open on if no window +ASLSM_PubScreenName equ ASL_TB+41 ; Name of public screen +ASLSM_PrivateIDCMP equ ASL_TB+42 ; Allocate private IDCMP? +ASLSM_IntuiMsgFunc equ ASL_TB+70 ; Function to handle IntuiMessages +ASLSM_SleepWindow equ ASL_TB+43 ; Block input in ASLSM_Window? +ASLSM_UserData equ ASL_TB+52 ; What to put in sm_UserData +ASLSM_PopToFront equ ASL_TB+131 ; Make the requester window visible + ; when it opens (V44) +ASLSM_Activate equ ASL_TB+132 ; Activate the requester window when + ; it opens (V45). + +; Text display +ASLSM_TextAttr equ ASL_TB+51 ; Text font to use for gadget text +ASLSM_Locale equ ASL_TB+50 ; Locale ASL should use for text +ASLSM_TitleText equ ASL_TB+1 ; Title of requester +ASLSM_PositiveText equ ASL_TB+18 ; Positive gadget text +ASLSM_NegativeText equ ASL_TB+19 ; Negative gadget text + +; Initial settings +ASLSM_InitialLeftEdge equ ASL_TB+3 ; Initial requester coordinates +ASLSM_InitialTopEdge equ ASL_TB+4 +ASLSM_InitialWidth equ ASL_TB+5 ; Initial requester dimensions +ASLSM_InitialHeight equ ASL_TB+6 +ASLSM_InitialDisplayID equ ASL_TB+100 ; Initial display mode id +ASLSM_InitialDisplayWidth equ ASL_TB+101 ; Initial display width +ASLSM_InitialDisplayHeight equ ASL_TB+102 ; Initial display height +ASLSM_InitialDisplayDepth equ ASL_TB+103 ; Initial display depth +ASLSM_InitialOverscanType equ ASL_TB+104 ; Initial type of overscan +ASLSM_InitialAutoScroll equ ASL_TB+105 ; Initial autoscroll setting +ASLSM_InitialInfoOpened equ ASL_TB+106 ; Info wndw initially opened? +ASLSM_InitialInfoLeftEdge equ ASL_TB+107 ; Initial Info window coords. +ASLSM_InitialInfoTopEdge equ ASL_TB+108 + +; Options +ASLSM_DoWidth equ ASL_TB+109 ; Display Width gadget? +ASLSM_DoHeight equ ASL_TB+110 ; Display Height gadget? +ASLSM_DoDepth equ ASL_TB+111 ; Display Depth gadget? +ASLSM_DoOverscanType equ ASL_TB+112 ; Display Overscan Type gadget? +ASLSM_DoAutoScroll equ ASL_TB+113 ; Display AutoScroll gadget? + +; Filtering +ASLSM_PropertyFlags equ ASL_TB+114 ; Must have these Property flags +ASLSM_PropertyMask equ ASL_TB+115 ; Only these should be looked at +ASLSM_MinWidth equ ASL_TB+116 ; Minimum display width to allow +ASLSM_MaxWidth equ ASL_TB+117 ; Maximum display width to allow +ASLSM_MinHeight equ ASL_TB+118 ; Minimum display height to allow +ASLSM_MaxHeight equ ASL_TB+119 ; Maximum display height to allow +ASLSM_MinDepth equ ASL_TB+120 ; Minimum display depth +ASLSM_MaxDepth equ ASL_TB+121 ; Maximum display depth +ASLSM_FilterFunc equ ASL_TB+122 ; Function to filter mode id's + +; Custom additions +ASLSM_CustomSMList equ ASL_TB+123 ; Exec list of struct DisplayMode + +;--------------------------------------------------------------------------- + +; This defines the rendezvous data for setting and querying asl.library's +; defaults for the window size and the file requester sort order. The name +; of the semaphore is given below; it exists only with asl.library V45 and +; IPrefs V45 and beyond. +ASL_SEMAPHORE_NAME macro + DC.B 'asl.library',0 + ENDM + + STRUCTURE AslSemaphore + STRUCT as_Semaphore,SS_SIZE + UWORD as_Version ; Must be >= 45 + ULONG as_Size ; Size of this data structure. + + UBYTE as_SortBy ; File requester defaults; name, date or size + UBYTE as_SortDrawers ; File requester defaults; first, mix or last + UBYTE as_SortOrder ; File requester defaults; ascending or descending + + UBYTE as_SizePosition ; See below + + WORD as_RelativeLeft ; Window position offset + WORD as_RelativeTop + + UBYTE as_RelativeWidth ; Window size factor; this is + ; a percentage of the parent + ; window/screen width. + UBYTE as_RelativeHeight + LABEL AslSemaphore_SIZEOF + +; Default position of the ASL window +ASLPOS_DefaultPosition EQU 0 ; Position is calculated according to the builtin rules. +ASLPOS_CenterWindow EQU 1 ; Centred within the bounds of the parent window. +ASLPOS_CenterScreen EQU 2 ; Centred within the bounds of the parent screen. +ASLPOS_WindowPosition EQU 3 ; Relative to the top left corner of the parent window, + ; using the offset values provided in the + ; as_RelativeLeft/as_RelativeTop members. +ASLPOS_ScreenPosition EQU 4 ; Relative to the top left corner of the parent screen, + ; using the offset values provided in the + ; as_RelativeLeft/as_RelativeTop members. +ASLPOS_CenterMouse EQU 5 ; Directly below the mouse pointer. + +ASLPOS_MASK EQU $0F + +; Default size of the ASL window. +ASLSIZE_DefaultSize EQU $00 ; Size is calculated according to the builtin rules. +ASLSIZE_RelativeSize EQU $10 ; Size is relative to the size of the parent + ; window or screen, using the values provided in + ; the as_RelativeWidth/as_RelativeHeight members. + ; The as_RelativeWidth/as_RelativeHeight values are + ; taken as percentage, i.e. a value of "50" stands for + ; 50% of the width/height of the parent window/screen. + +ASLSIZE_MASK EQU $30 + +; Other options. +ASLOPTION_ASLOverrides EQU $40 ; ASL determines placement and size of requester + ; windows; application's choice is ignored. + +;--------------------------------------------------------------------------- +; Obsolete ASL definitions, here for source code compatibility only. +; Please do NOT use in new code. +; +; Set ASL_V38_NAMES_ONLY to remove these older names +; + IFND ASL_V38_NAMES_ONLY +rf_File equ fr_File +rf_Dir equ fr_Drawer +rf_LeftEdge equ fr_LeftEdge +rf_TopEdge equ fr_TopEdge +rf_Width equ fr_Width +rf_Height equ fr_Height +rf_NumArgs equ fr_NumArgs +rf_ArgList equ fr_ArgList +rf_UserData equ fr_UserData +rf_Pat equ fr_Pattern +ASL_Dummy equ TAG_USER+$80000 +ASL_Hail equ ASL_Dummy+1 +ASL_Window equ ASL_Dummy+2 +ASL_LeftEdge equ ASL_Dummy+3 +ASL_TopEdge equ ASL_Dummy+4 +ASL_Width equ ASL_Dummy+5 +ASL_Height equ ASL_Dummy+6 +ASL_HookFunc equ ASL_Dummy+7 +ASL_File equ ASL_Dummy+8 +ASL_Dir equ ASL_Dummy+9 +ASL_Pattern equ ASL_Dummy+10 +ASL_FontName equ ASL_Dummy+10 +ASL_FontHeight equ ASL_Dummy+11 +ASL_FontStyles equ ASL_Dummy+12 +ASL_FontFlags equ ASL_Dummy+13 +ASL_FrontPen equ ASL_Dummy+14 +ASL_BackPen equ ASL_Dummy+15 +ASL_MinHeight equ ASL_Dummy+16 +ASL_MaxHeight equ ASL_Dummy+17 +ASL_OKText equ ASL_Dummy+18 +ASL_CancelText equ ASL_Dummy+19 +ASL_FuncFlags equ ASL_Dummy+20 +ASL_ModeList equ ASL_Dummy+21 +ASL_ExtFlags1 equ ASL_Dummy+22 +; remember what I said up there? Do not use these anymore! + BITDEF FIL,PATGAD,0 + BITDEF FIL,MULTISELECT,3 + BITDEF FIL,NEWIDCMP,4 + BITDEF FIL,SAVE,5 + BITDEF FIL,DOMSGFUNC,6 + BITDEF FIL,DOWILDFUNC,7 + BITDEF FIL1,NOFILES,0 + BITDEF FIL1,MATCHDIRS,1 + BITDEF RF,DOWILDFUNC,7 + BITDEF RF,DOMSGFUNC,6 + BITDEF RF,DOCOLOR,5 + BITDEF RF,NEWIDCMP,4 + BITDEF RF,MULTISELECT,3 + BITDEF RF,PATGAD,0 + BITDEF FON,FRONTCOLOR,0 + BITDEF FON,BACKCOLOR,1 + BITDEF FON,STYLES,2 + BITDEF FON,DRAWMODE,3 + BITDEF FON,FIXEDWIDTH,4 + BITDEF FON,NEWIDCMP,5 + BITDEF FON,DOMSGFUNC,6 + BITDEF FON,DOWILDFUNC,7 + ENDC + +;--------------------------------------------------------------------------- + + ENDC ; LIBRARIES_ASL_I diff --git a/extra/rtg_driver/include/libraries/commodities.i b/extra/rtg_driver/include/libraries/commodities.i new file mode 100644 index 00000000..63ccc510 --- /dev/null +++ b/extra/rtg_driver/include/libraries/commodities.i @@ -0,0 +1,153 @@ + IFND LIBRARIES_COMMODITIES_I +LIBRARIES_COMMODITIES_I SET 1 +** $VER: commodities.i 38.5 (20.10.1992) +** Includes Release 45.1 +** +** Commodities definitions +** +** (C) Copyright 1990-2001 Amiga, Inc. +** All Rights Reserved +** + +;--------------------------------------------------------------------------- + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND DEVICES_INPUTEVENT_I + INCLUDE "devices/inputevent.i" + ENDC + +;--------------------------------------------------------------------------- + + STRUCTURE NewBroker,0 + BYTE nb_Version ; must be set to NB_VERSION + BYTE nb_Reserve1 + APTR nb_Name + APTR nb_Title + APTR nb_Descr + WORD nb_Unique + WORD nb_Flags + BYTE nb_Pri + BYTE nb_Reserve2 + APTR nb_Port + WORD nb_ReservedChannel + LABEL NewBroker_SIZEOF + +; constant for NewBroker.nb_Version +NB_VERSION equ 5 ; Version of NewBroker structure + +; Sizes for various buffers +CBD_NAMELEN equ 24 +CBD_TITLELEN equ 40 +CBD_DESCRLEN equ 40 + +; Flags for NewBroker.nb_Unique +NBU_DUPLICATE equ 0 +NBU_UNIQUE equ 1 ; will not allow duplicates +NBU_NOTIFY equ 2 ; sends CXM_UNIQUE to existing broker + +; Flags for NewBroker.nb_Flags +COF_SHOW_HIDE equ 4 + +;--------------------------------------------------------------------------- + +; Commodities object types +CX_INVALID equ 0 ; not a valid object (probably null) +CX_FILTER equ 1 ; input event messages only +CX_TYPEFILTER equ 2 ; obsolete, do not use +CX_SEND equ 3 ; sends a message +CX_SIGNAL equ 4 ; sends a signal +CX_TRANSLATE equ 5 ; translates input event into chain +CX_BROKER equ 6 ; application representative +CX_DEBUG equ 7 ; dumps info to serial port +CX_CUSTOM equ 8 ; application provides function +CX_ZERO equ 9 ; system terminator node + +;--------------------------------------------------------------------------- + +; Commodities message types +CXM_IEVENT equ $20 +CXM_COMMAND equ $40 + +;* Only CXM_IEVENT messages are passed through the input network. Other types +;* of messages are sent to an optional port in your broker. This means that +;* you must test the message type in your message handling, if input messages +;* an command messages come to the same port. +;* +;* CXM_IEVENT: Messages of this type rattle around the Commodities input +;* network. They are sent to you by a Sender object, and passed +;* to you as a synchronous function call by a Custom object. +;* +;* The message port or function entry point is stored in the +;* object, and the ID fied of the message will be set to what +;* you arrange issuing object. +;* +;* The data section of the message will point to the input event +;* triggering the message. +;* +;* CXM_COMMAND: These messages are sent to a port attached to your Broker. +;* They are sent to you when the controller program ants your +;* program to do something. The ID value identifies the command. +;* + +; ID values associated with a message of type CXM_COMMAND +CXCMD_DISABLE equ 15 ; please disable yourself +CXCMD_ENABLE equ 17 ; please enable yourself +CXCMD_APPEAR equ 19 ; open your window, if you can +CXCMD_DISAPPEAR equ 21 ; go dormant +CXCMD_KILL equ 23 ; go away for good +CXCMD_LIST_CHG equ 27 ; Someone changed the broker list +CXCMD_UNIQUE equ 25 ; someone tried to create a broker ; with your name. Suggest you appear. + +;--------------------------------------------------------------------------- + + STRUCTURE InputXpression,0 + UBYTE ix_Version ; must be set to IX_VERSION + UBYTE ix_Class ; class must match exactly + UWORD ix_Code ; Bits that we want + UWORD ix_CodeMask ; Set bits here to indicate + ; which bits in ix_Code are + ; don't care bits. + UWORD ix_Qualifier ; Bits that we want + UWORD ix_QualMask ; Set bits here to indicate + ; which bits in ix_Qualifier + ; are don't care bits + UWORD ix_QualSame ; synonyms in qualifier + LABEL ix_SIZEOF + +; constant for InputXpression.ix_Version +IX_VERSION equ 2 + +; constants for InputXpression.ix_QualSame +IXSYM_SHIFT equ 1 ; left- and right- shift are equivalent +IXSYM_CAPS equ 2 ; either shift or caps lock are equivalent +IXSYM_ALT equ 4 ; left- and right- alt are equivalent + +IXSYM_SHIFTMASK equ IEQUALIFIER_LSHIFT!IEQUALIFIER_RSHIFT +IXSYM_CAPSMASK equ IXSYM_SHIFTMASK!IEQUALIFIER_CAPSLOCK +IXSYM_ALTMASK equ IEQUALIFIER_LALT!IEQUALIFIER_RALT + +; onstant for InputXpression.ix_QualMask +IX_NORMALQUALS equ $7FFF ; avoid RELATIVEMOUSE + +;--------------------------------------------------------------------------- + +; Error returns from CxBroker() +CBERR_OK equ 0 ; No error +CBERR_SYSERR equ 1 ; System error, no memory, etc +CBERR_DUP equ 2 ; uniqueness violation +CBERR_VERSION equ 3 ; didn't understand NewBroker.nb_Version + +;-------------------------------------------------------------------------- + +; Return values from CxObjError() +COERR_ISNULL equ 1 ; you called CxObjError(NULL) +COERR_NULLATTACH equ 2 ; someone attahed NULL to my list +COERR_BADFILTER equ 4 ; a bad filter description was given +COERR_BADTYPE equ 8 ; unmatched type-specific operation + +;--------------------------------------------------------------------------- + + ENDC ; LIBRARIES_COMMODITIES_I diff --git a/extra/rtg_driver/include/libraries/configregs.i b/extra/rtg_driver/include/libraries/configregs.i new file mode 100644 index 00000000..1a18ad93 --- /dev/null +++ b/extra/rtg_driver/include/libraries/configregs.i @@ -0,0 +1,244 @@ + IFND LIBRARIES_CONFIGREGS_I +LIBRARIES_CONFIGREGS_I SET 1 +** +** $VER: configregs.i 36.11 (3.11.1990) +** Includes Release 45.1 +** +** AutoConfig (tm) hardware register and bit definitions +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC ;EXEC_TYPES_I + +** +** AutoConfig (tm) boards each contain a 32 byte "ExpansionRom" area that is +** read by the system software at configuration time. Configuration of each +** board starts when the ConfigIn* signal is passed from the previous board +** (or from the system for the first board). Each board will present it's +** ExpansionRom structure at location $00E80000 to be read by the system. +** This file defines the appearance of the ExpansionRom area. +** +** Expansion boards are actually organized such that only one nybble per +** 16 bit word contains valid information. The low nybbles of each +** word are combined to fill the structure below. (This table is structured +** as LOGICAL information. This means that it never corresponds exactly +** with a physical implementation.) +** +** The ExpansionRom space is further split into two regions: The first 16 +** bytes are read-only. Except for the er_type field, this area is inverted +** by the system software when read in. The second 16 bytes contain the +** control portion, where all read/write registers are located. +** +** The system builds one "ConfigDev" structure for each board found. The +** list of boards can be examined using the expansion.library/FindConfigDev +** function. +** +** A special "hacker" Manufacturer ID number is reserved for test use: +** 2011 ($7DB). When inverted this will look like $F824. +** + + STRUCTURE ExpansionRom,0 ;-First 16 bytes of the expansion ROM + UBYTE er_Type ;Board type, size and flags + UBYTE er_Product ;Product number, assigned by manufacturer + UBYTE er_Flags ;Flags + UBYTE er_Reserved03 ;Must be zero ($ff inverted) + UWORD er_Manufacturer ;Unique ID,ASSIGNED BY AMIGA, INC.! + ULONG er_SerialNumber ;Available for use by manufacturer + UWORD er_InitDiagVec ;Offset to optional "DiagArea" structure + UBYTE er_Reserved0c + UBYTE er_Reserved0d + UBYTE er_Reserved0e + UBYTE er_Reserved0f + LABEL ExpansionRom_SIZEOF + + +** +** Note that use of the ec_BaseAddress register is tricky. The system +** will actually write twice. First the low order nybble is written +** to the ec_BaseAddress register+2 (D15-D12). Then the entire byte is +** written to ec_BaseAddress (D15-D8). This allows writing of a byte-wide +** address to nybble size registers. +** + + STRUCTURE ExpansionControl,0 ;-Second 16 bytes of the expansion ROM + UBYTE ec_Interrupt ;Optional interrupt control register + UBYTE ec_Z3_HighBase ;Zorro III : Bits 24-31 of config address + UBYTE ec_BaseAddress ;Zorro II/III: Bits 16-23 of config address + UBYTE ec_Shutup ;The system writes here to shut up a board + UBYTE ec_Reserved14 + UBYTE ec_Reserved15 + UBYTE ec_Reserved16 + UBYTE ec_Reserved17 + UBYTE ec_Reserved18 + UBYTE ec_Reserved19 + UBYTE ec_Reserved1a + UBYTE ec_Reserved1b + UBYTE ec_Reserved1c + UBYTE ec_Reserved1d + UBYTE ec_Reserved1e + UBYTE ec_Reserved1f + LABEL ExpansionControl_SIZEOF + +** +** many of the constants below consist of a triplet of equivalent +** definitions: xxMASK is a bit mask of those bits that matter. +** xxBIT is the starting bit number of the field. xxSIZE is the +** number of bits that make up the definition. This method is +** used when the field is larger than one bit. +** +** If the field is only one bit wide then the xxB_xx and xxF_xx convention +** is used (xxB_xx is the bit number, and xxF_xx is mask of the bit). +** + +** manifest constants ** +E_SLOTSIZE EQU $10000 +E_SLOTMASK EQU $ffff +E_SLOTSHIFT EQU 16 + + +** these define the free regions of Zorro memory space. +** THESE MAY WELL CHANGE FOR FUTURE PRODUCTS! +E_EXPANSIONBASE EQU $00e80000 ;Zorro II config address +EZ3_EXPANSIONBASE EQU $ff000000 ;Zorro III config address + +E_EXPANSIONSIZE EQU $00080000 ;Zorro II I/O type cards +E_EXPANSIONSLOTS EQU 8 + +E_MEMORYBASE EQU $00200000 ;Zorro II 8MB space +E_MEMORYSIZE EQU $00800000 +E_MEMORYSLOTS EQU 128 + +EZ3_CONFIGAREA EQU $40000000 ;Zorro III space +EZ3_CONFIGAREAEND EQU $7FFFFFFF ;Zorro III space +EZ3_SIZEGRANULARITY EQU $00080000 ;512K increments + + +***** er_Type definitions (ttldcmmm) **************************************** + +** er_Type board type bits -- the OS ignores "old style" boards ** +ERT_TYPEMASK EQU $c0 ;Bits 7-6 +ERT_TYPEBIT EQU 6 +ERT_TYPESIZE EQU 2 +ERT_NEWBOARD EQU $c0 +ERT_ZORROII EQU ERT_NEWBOARD +ERT_ZORROIII EQU $80 + +** other bits defined in er_Type ** + BITDEF ERT,MEMLIST,5 ; Link RAM into free memory list + BITDEF ERT,DIAGVALID,4 ; ROM vector is valid + BITDEF ERT,CHAINEDCONFIG,3 ; Next config is part of the same card + +** er_Type field memory size bits ** +ERT_MEMMASK EQU $07 ;Bits 2-0 +ERT_MEMBIT EQU 0 +ERT_MEMSIZE EQU 3 + + + +***** er_Flags byte -- for those things that didn't fit into the type byte **** +***** the hardware stores this byte in inverted form **** + BITDEF ERF,MEMSPACE,7 ; Wants to be in 8 meg space. + ; (NOT IMPLEMENTED) + + BITDEF ERF,NOSHUTUP,6 ; Board can't be shut up. + + BITDEF ERF,EXTENDED,5 ; Zorro III: Use extended size table + ; for bits 0-2 of er_Type. + ; Zorro II : Must be 0 + + BITDEF ERF,ZORRO_III,4 ; Zorro III: must be 1 + ; Zorro II : must be 0 + +ERT_Z3_SSMASK EQU $0F ; Bits 3-0. Zorro III Sub-Size. How +ERT_Z3_SSBIT EQU 0 ; much space the card actually uses +ERT_Z3_SSSIZE EQU 4 ; (regardless of config granularity) + ; Zorro II : must be 0 + + +** ec_Interrupt register (unused) ********************************************* + BITDEF ECI,INTENA,1 + BITDEF ECI,RESET,3 + BITDEF ECI,INT2PEND,4 + BITDEF ECI,INT6PEND,5 + BITDEF ECI,INT7PEND,6 + BITDEF ECI,INTERRUPTING,7 + + +************************************************************************** +** +** these are the specifications for the diagnostic area. If the Diagnostic +** Address Valid bit is set in the Board Type byte (the first byte in +** expansion space) then the Diag Init vector contains a valid offset. +** +** The Diag Init vector is actually a word offset from the base of the +** board. The resulting address points to the base of the DiagArea +** structure. The structure may be physically implemented either four, +** eight, or sixteen bits wide. The code will be copied out into +** ram first before being called. +** +** The da_Size field, and both code offsets (da_DiagPoint and da_BootPoint) +** are offsets from the diag area AFTER it has been copied into ram, and +** "de-nybbleized" (if needed). (In other words, the byte size is the size of +** the actual information, not how much address space is required to +** store it.) +** +** All bits are encoded with uninverted logic (e.g. 5 volts on the bus +** is a logic one). +** +** If your board is to make use of the boot facility then it must leave +** its config area available even after it has been configured. Your +** boot vector will be called AFTER your board's final address has been +** set. +** +************************************************************************** + + STRUCTURE DiagArea,0 + UBYTE da_Config ; see below for definitions + UBYTE da_Flags ; see below for definitions + UWORD da_Size ; the size (in bytes) of the total diag area + UWORD da_DiagPoint ; where to start for diagnostics, or zero + UWORD da_BootPoint ; where to start for booting + UWORD da_Name ; offset in diag area where a string + ; identifier can be found (or zero if no + ; identifier is present). + + UWORD da_Reserved01 ; two words of reserved data. must be zero. + UWORD da_Reserved02 + LABEL DiagArea_SIZEOF + +; da_Config definitions +** +** DAC_BYTEWIDE can be simulated using DAC_NIBBLEWIDE. +** +DAC_BUSWIDTH EQU $C0 ; two bits for bus width +DAC_NIBBLEWIDE EQU $00 ; (indicates information is nybble wide) +DAC_BYTEWIDE EQU $40 ; BUG: Will not work under V34 Kickstart! +DAC_WORDWIDE EQU $80 + +DAC_BOOTTIME EQU $30 ; two bits for when to boot +DAC_NEVER EQU $00 ; obvious +DAC_CONFIGTIME EQU $10 ; call da_BootPoint when first configing + ; the device +DAC_BINDTIME EQU $20 ; run when binding drivers to boards + +** +** These are the calling conventions for the diagnostic callback +** (from da_DiagPoint). +** +** A7 -- points to at least 2K of stack +** A6 -- ExecBase +** A5 -- ExpansionBase +** A3 -- your board's ConfigDev structure +** A2 -- Base of diag/init area that was copied +** A0 -- Base of your board +** +** Your board must return a value in D0. If this value is NULL, then +** the diag/init area that was copied in will be returned to the free +** memory pool. +** + + ENDC ;LIBRARIES_CONFIGREGS_I diff --git a/extra/rtg_driver/include/libraries/configvars.i b/extra/rtg_driver/include/libraries/configvars.i new file mode 100644 index 00000000..53f322a7 --- /dev/null +++ b/extra/rtg_driver/include/libraries/configvars.i @@ -0,0 +1,59 @@ + IFND LIBRARIES_CONFIGVARS_I +LIBRARIES_CONFIGVARS_I SET 1 +** +** $VER: configvars.i 36.7 (9.4.1991) +** Includes Release 45.1 +** +** Software structures used by AutoConfig (tm) boards +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_NODES_I + INCLUDE "exec/nodes.i" + ENDC ;EXEC_NODES_I + + IFND LIBRARIES_CONFIGREGS_I + INCLUDE "libraries/configregs.i" + ENDC ;LIBRARIES_CONFIGREGS_I + +** +** At early system startup time, one ConfigDev structure is created for +** each board found in the system. Software may seach for ConfigDev +** structures by vendor & product ID number. For debugging and diagnostic +** use, the entire list can be accessed. See the expansion.library document +** for more information. +** + STRUCTURE ConfigDev,0 + STRUCT cd_Node,LN_SIZE + UBYTE cd_Flags ; (read/write) + UBYTE cd_Pad ; reserved + STRUCT cd_Rom,ExpansionRom_SIZEOF ; copy of board's expansion ROM + APTR cd_BoardAddr ; where in memory the board was placed + ULONG cd_BoardSize ; size of board in bytes + UWORD cd_SlotAddr ; which slot number (PRIVATE) + UWORD cd_SlotSize ; number of slots (PRIVATE) + APTR cd_Driver ; pointer to node of driver + APTR cd_NextCD ; linked list of drivers to config + STRUCT cd_Unused,4*4 ; for whatever the driver wants! + LABEL ConfigDev_SIZEOF + +; cd_Flags + BITDEF CD,SHUTUP,0 ; this board has been shut up + BITDEF CD,CONFIGME,1 ; this board needs a driver to claim it + BITDEF CD,BADMEMORY,2 ; this board contains bad memory + BITDEF CD,PROCESSED,3 ; private flag + +** +** Boards are usually "bound" to software drivers. +** This structure is used by GetCurrentBinding() and SetCurrentBinding() +** + STRUCTURE CurrentBinding,0 + APTR cb_ConfigDev + APTR cb_FileName + APTR cb_ProductString + APTR cb_ToolTypes + LABEL CurrentBinding_SIZEOF + + ENDC ;LIBRARIES_CONFIGVARS_I diff --git a/extra/rtg_driver/include/libraries/diskfont.i b/extra/rtg_driver/include/libraries/diskfont.i new file mode 100644 index 00000000..6b4c8b78 --- /dev/null +++ b/extra/rtg_driver/include/libraries/diskfont.i @@ -0,0 +1,20 @@ + IFND LIBRARIES_DISKFONT_I +LIBRARIES_DISKFONT_I SET 1 +** +** $VER: diskfont.i 36.3 (22.10.1990) +** Includes Release 45.1 +** +** diskfont library definitions +** +** Obsolete - see diskfont/diskfont.i +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND DISKFONT_DISKFONT_I + INCLUDE "diskfont/diskfont.i" + ENDC + + + ENDC ; LIBRARIES_DISKFONT_I diff --git a/extra/rtg_driver/include/libraries/dos.i b/extra/rtg_driver/include/libraries/dos.i new file mode 100644 index 00000000..70d3d0b3 --- /dev/null +++ b/extra/rtg_driver/include/libraries/dos.i @@ -0,0 +1,17 @@ + IFND LIBRARIES_DOS_I +LIBRARIES_DOS_I SET 1 +** +** $VER: dos.i 36.2 (12.7.1990) +** Includes Release 45.1 +** +** Standard C header for AmigaDOS +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND DOS_DOS_I + INCLUDE "dos/dos.i" + ENDC + + ENDC ; LIBRARIES_DOS_I diff --git a/extra/rtg_driver/include/libraries/dos_lib.i b/extra/rtg_driver/include/libraries/dos_lib.i new file mode 100644 index 00000000..79d58856 --- /dev/null +++ b/extra/rtg_driver/include/libraries/dos_lib.i @@ -0,0 +1,18 @@ + IFND LIBRARIES_DOS_LIB_I +LIBRARIES_DOS_LIB_I SET 1 +** +** $VER: dos_lib.i 36.3 (2.11.1990) +** Includes Release 45.1 +** +** Library interface offsets for DOS library +** Retained only for compatibility +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND DOS_DOS_LIB_I + INCLUDE "dos/dos_lib.i" + ENDC + + ENDC ; LIBRARIES_DOS_LIB_I diff --git a/extra/rtg_driver/include/libraries/dosextens.i b/extra/rtg_driver/include/libraries/dosextens.i new file mode 100644 index 00000000..a50bf01c --- /dev/null +++ b/extra/rtg_driver/include/libraries/dosextens.i @@ -0,0 +1,17 @@ + IFND LIBRARIES_DOSEXTENS_I +LIBRARIES_DOSEXTENS_I SET 1 +** +** $VER: dosextens.i 36.2 (12.7.1990) +** Includes Release 45.1 +** +** DOS structures not needed for the casual AmigaDOS user +** +** (C) Copyright 1985-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND DOS_DOSEXTENS_I + INCLUDE "dos/dosextens.i" + ENDC + + ENDC ; LIBRARIES_DOSEXTENS_I diff --git a/extra/rtg_driver/include/libraries/expansion.i b/extra/rtg_driver/include/libraries/expansion.i new file mode 100644 index 00000000..69a89fa2 --- /dev/null +++ b/extra/rtg_driver/include/libraries/expansion.i @@ -0,0 +1,27 @@ + IFND LIBRARIES_EXPANSION_I +LIBRARIES_EXPANSION_I SET 1 +** +** $VER: expansion.i 36.6 (5.11.1990) +** Includes Release 45.1 +** +** External definitions for expansion.library +** +** (C) Copyright 1989-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC ;EXEC_TYPES_I + + + +EXPANSIONNAME MACRO + dc.b 'expansion.library',0 + ENDM + + +;flag for the AddDosNode() call + BITDEF ADN,STARTPROC,0 + + ENDC ;LIBRARIES_EXPANSION_I diff --git a/extra/rtg_driver/include/libraries/expansionbase.i b/extra/rtg_driver/include/libraries/expansionbase.i new file mode 100644 index 00000000..e0462200 --- /dev/null +++ b/extra/rtg_driver/include/libraries/expansionbase.i @@ -0,0 +1,80 @@ + IFND LIBRARIES_EXPANSIONBASE_I +LIBRARIES_EXPANSIONBASE_I SET 1 +** +** $VER: expansionbase.i 36.18 (21.10.1991) +** Includes Release 45.1 +** +** Definitions for the expansion library base +** +** (C) Copyright 1987-2001 Amiga, Inc. +** All Rights Reserved +** + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC ; EXEC_TYPES_I + + IFND EXEC_LIBRARIES_I + INCLUDE "exec/libraries.i" + ENDC ; EXEC_LIBRARIES_I + + IFND EXEC_SEMAPHORES_I + INCLUDE "exec/semaphores.i" + ENDC ; EXEC_SEMAPHORES_I + + IFND LIBRARIES_CONFIGVARS_I + INCLUDE "libraries/configvars.i" + ENDC ; LIBRARIES_CONFIGVARS_I + +** +** BootNodes are scanned by dos.library at startup. Items found on the +** list are started by dos. BootNodes are added with the AddDosNode() or +** the V36 AddBootNode() calls. +** + STRUCTURE BootNode,LN_SIZE + UWORD bn_Flags + APTR bn_DeviceNode + LABEL BootNode_SIZEOF + +** +** expansion.library has functions to manipulate most of the information in +** ExpansionBase. Direct access is not permitted. Use FindConfigDev() +** to scan the board list. +** + STRUCTURE ExpansionBase,LIB_SIZE + UBYTE eb_Flags ;read only (see below) + UBYTE eb_Private01 ;private + ULONG eb_Private02 ;private + ULONG eb_Private03 ;private + STRUCT eb_Private04,CurrentBinding_SIZEOF ;private + STRUCT eb_Private05,LH_SIZE ;private + STRUCT eb_MountList,LH_SIZE ; contains struct BootNode entries + ;... ;private + + +; error codes +EE_OK EQU 0 +EE_LASTBOARD EQU 40 ; could not shut him up +EE_NOEXPANSION EQU 41 ; not enough expansion mem; board shut up +EE_NOMEMORY EQU 42 ; not enough normal memory +EE_NOBOARD EQU 43 ; no board at that address +EE_BADMEM EQU 44 ; tried to add a bad memory card + +; Flags + BITDEF EB,CLOGGED,0 ; someone could not be shutup + BITDEF EB,SHORTMEM,1 ; ran out of expansion mem + BITDEF EB,BADMEM,2 ; tried to add a bad memory card + BITDEF EB,DOSFLAG,3 ; reserved for use by AmigaDOS + BITDEF EB,KICKBACK33,4 ; reserved for use by AmigaDOS + BITDEF EB,KICKBACK36,5 ; reserved for use by AmigaDOS +** If the following flag is set by a floppy's bootblock code, the initial +** open of the initial shell window will be delayed until the first output +** to that shell. Otherwise the 1.3 compatible behavior applies. + BITDEF EB,SILENTSTART,6 + +* +* Magic kludge to tell the system if CC0 was started or not... +* + BITDEF EB,START_CC0,7 + + + ENDC ; LIBRARIES_EXPANSIONBASE_I diff --git a/extra/rtg_driver/include/libraries/filehandler.i b/extra/rtg_driver/include/libraries/filehandler.i new file mode 100644 index 00000000..bdc56605 --- /dev/null +++ b/extra/rtg_driver/include/libraries/filehandler.i @@ -0,0 +1,17 @@ + IFND LIBRARIES_FILEHANDLER_I +LIBRARIES_FILEHANDLER_I SET 1 +** +** $VER: filehandler.i 36.2 (12.7.1990) +** Includes Release 45.1 +** +** device and file handler specific code for AmigaDOS +** +** (C) Copyright 1986-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND DOS_FILEHANDLER_I + INCLUDE "dos/filehandler.i" + ENDC + + ENDC ; LIBRARIES_FILEHANDLER_I diff --git a/extra/rtg_driver/include/libraries/gadtools.i b/extra/rtg_driver/include/libraries/gadtools.i new file mode 100644 index 00000000..b7d050b0 --- /dev/null +++ b/extra/rtg_driver/include/libraries/gadtools.i @@ -0,0 +1,426 @@ + IFND LIBRARIES_GADTOOLS_I +LIBRARIES_GADTOOLS_I SET 1 +** +** $VER: gadtools.i 39.12 (24.8.1993) +** Includes Release 45.1 +** +** gadtools.library definitions +** +** (C) Copyright 1989-2001 Amiga, Inc. +** All Rights Reserved. +** + +*------------------------------------------------------------------------* + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND UTILITY_TAGITEM_I + INCLUDE "utility/tagitem.i" + ENDC + + IFND INTUITION_INTUITION_I + INCLUDE "intuition/intuition.i" + ENDC + + IFND INTUITION_GADGETCLASS_I + INCLUDE "intuition/gadgetclass.i" + ENDC + +*------------------------------------------------------------------------* + +* The kinds (almost classes) of gadgets that GadTools supports. +* Use these identifiers when calling CreateGadgetA() + +GENERIC_KIND EQU 0 +BUTTON_KIND EQU 1 +CHECKBOX_KIND EQU 2 +INTEGER_KIND EQU 3 +LISTVIEW_KIND EQU 4 +MX_KIND EQU 5 +NUMBER_KIND EQU 6 +CYCLE_KIND EQU 7 +PALETTE_KIND EQU 8 +SCROLLER_KIND EQU 9 +* Kind number 10 is reserved +SLIDER_KIND EQU 11 +STRING_KIND EQU 12 +TEXT_KIND EQU 13 + +NUM_KINDS EQU 14 + +*------------------------------------------------------------------------* + +* 'Or' the appropriate set together for your Window IDCMPFlags: * + +ARROWIDCMP EQU IDCMP_GADGETUP!IDCMP_GADGETDOWN!IDCMP_INTUITICKS!IDCMP_MOUSEBUTTONS + +BUTTONIDCMP EQU IDCMP_GADGETUP +CHECKBOXIDCMP EQU IDCMP_GADGETUP +INTEGERIDCMP EQU IDCMP_GADGETUP +LISTVIEWIDCMP EQU IDCMP_GADGETUP!IDCMP_GADGETDOWN!IDCMP_MOUSEMOVE!ARROWIDCMP + +MXIDCMP EQU IDCMP_GADGETDOWN +NUMBERIDCMP EQU 0 +CYCLEIDCMP EQU IDCMP_GADGETUP +PALETTEIDCMP EQU IDCMP_GADGETUP + +* Use ARROWIDCMP!SCROLLERIDCMP if your scrollers have arrows: * +SCROLLERIDCMP EQU IDCMP_GADGETUP!IDCMP_GADGETDOWN!IDCMP_MOUSEMOVE +SLIDERIDCMP EQU IDCMP_GADGETUP!IDCMP_GADGETDOWN!IDCMP_MOUSEMOVE +STRINGIDCMP EQU IDCMP_GADGETUP + +TEXTIDCMP EQU 0 + +*------------------------------------------------------------------------* + +* Generic NewGadget used by several of the gadget classes: * + + STRUCTURE NewGadget,0 + + WORD gng_LeftEdge + WORD gng_TopEdge ; gadget position + WORD gng_Width + WORD gng_Height ; gadget size + APTR gng_GadgetText ; gadget label + APTR gng_TextAttr ; desired font for gadget label + UWORD gng_GadgetID ; gadget ID + ULONG gng_Flags ; see below + APTR gng_VisualInfo ; Set to retval of GetVisualInfo() + APTR gng_UserData ; gadget UserData + + LABEL gng_SIZEOF + +* ng_Flags control certain aspects of the gadget. The first five control +* the placement of the descriptive text. Each gadget kind has its default, +* which is usually PLACETEXT_LEFT. Consult the autodocs for details. + +PLACETEXT_LEFT EQU $0001 * Right-align text on left side +PLACETEXT_RIGHT EQU $0002 * Left-align text on right side +PLACETEXT_ABOVE EQU $0004 * Center text above +PLACETEXT_BELOW EQU $0008 * Center text below +PLACETEXT_IN EQU $0010 * Center text on + +NG_HIGHLABEL EQU $0020 * Highlight the label + +*------------------------------------------------------------------------* + +* Fill out an array of these and pass that to CreateMenus(): + + STRUCTURE NewMenu,0 + + UBYTE gnm_Type ; See below + UBYTE gnm_Pad ; alignment padding + APTR gnm_Label ; Menu's label + APTR gnm_CommKey ; MenuItem Command Key Equiv + UWORD gnm_Flags ; Menu or MenuItem flags (see note) + LONG gnm_MutualExclude ; MenuItem MutualExclude word + APTR gnm_UserData ; For your own use, see note + + LABEL gnm_SIZEOF + +* Needed only by inside IM_ definitions below */ +MENU_IMAGE EQU 128 + +* nm_Type determines what each NewMenu structure corresponds to. +* for the NM_TITLE, NM_ITEM, and NM_SUB values, nm_Label should +* be a text string to use for that menu title, item, or sub-item. +* For IM_ITEM or IM_SUB, set nm_Label to point at the Image structure +* you wish to use for this item or sub-item. +* NOTE: At present, you may only use conventional images. +* Custom images created from Intuition image-classes do not work. +NM_TITLE EQU 1 * Menu header +NM_ITEM EQU 2 * Textual menu item +NM_SUB EQU 3 * Textual menu sub-item + +IM_ITEM EQU NM_ITEM!MENU_IMAGE * Graphical menu item +IM_SUB EQU NM_SUB!MENU_IMAGE * Graphical menu sub-item + +* The NewMenu array should be terminated with a NewMenu whose +* nm_Type equals NM_END. +NM_END EQU 0 * End of NewMenu array + +* Starting with V39, GadTools will skip any NewMenu entries whose +* nm_Type field has the NM_IGNORE bit set. +NM_IGNORE EQU 64 + + +* nm_Label should be a text string for textual items, a pointer +* to an Image structure for graphical menu items, or the special +* constant NM_BARLABEL, to get a separator bar. +NM_BARLABEL EQU -1 + + +* The nm_Flags field is used to fill out either the Menu->Flags or +* MenuItem->Flags field. Note that the sense of the MENUENABLED or +* ITEMENABLED bit is inverted between this use and Intuition's use, +* in other words, NewMenus are enabled by default. The following +* labels are provided to disable them: +NM_MENUDISABLED EQU MENUENABLED +NM_ITEMDISABLED EQU ITEMENABLED + +* New for V39: NM_COMMANDSTRING. For a textual MenuItem or SubItem, +* point nm_CommKey at an arbitrary string, and set the NM_COMMANDSTRING +* flag. +NM_COMMANDSTRING EQU COMMSEQ + +* The following are pre-cleared (COMMSEQ, ITEMTEXT, and HIGHxxx are set +* later as appropriate): +* Under V39, the COMMSEQ flag bit is not cleared, since it now has +* meaning. +NM_FLAGMASK EQU ~(COMMSEQ!ITEMTEXT!HIGHFLAGS) +NM_FLAGMASK_V39 EQU ~(ITEMTEXT!HIGHFLAGS) + +* You may choose among CHECKIT, MENUTOGGLE, and CHECKED. +* Toggle-select menuitems are of type CHECKIT!MENUTOGGLE, along +* with CHECKED if currently selected. Mutually exclusive ones +* are of type CHECKIT, and possibly CHECKED too. The nm_MutualExclude +* is a bit-wise representation of the items excluded by this one, +* so in the simplest case (choose 1 among n), these flags would be +* ~1, ~2, ~4, ~8, ~16, etc. See the Intuition Menus chapter. + +* A UserData pointer can be associated with each Menu and MenuItem structure. +* The CreateMenus() call allocates space for a UserData after each +* Menu or MenuItem (header, item or sub-item). You should use the +* GTMENU_USERDATA or GTMENUITEM_USERDATA macro to extract it. */ + +GTMENU_USERDATA MACRO + move.l mu_SIZEOF(\1),\2 + ENDM + +GTMENUITEM_USERDATA MACRO + move.l mi_SIZEOF(\1),\2 + ENDM + +* Here is an old one for compatibility. Do not use in new code! +MENU_USERDATA MACRO + move.l mi_SIZEOF(\1),\2 + ENDM + + +* These return codes can be obtained through the GTMN_SecondaryError tag: +GTMENU_TRIMMED EQU $00000001 ; Too many menus, items, or subitems, + ; menu has been trimmed down +GTMENU_INVALID EQU $00000002 ; Invalid NewMenu array +GTMENU_NOMEM EQU $00000003 ; Out of memory + + +*------------------------------------------------------------------------* + +* Starting with V39, checkboxes and mx gadgets can be scaled to your +* specified gadget width/height. Use the new GTCB_Scaled or GTMX_Scaled +* tags, respectively. Under V37, and by default in V39, the imagery +* is of the following fixed size: + +* MX gadget default dimensions: +MX_WIDTH EQU 17 +MX_HEIGHT EQU 9 + +* Checkbox default dimensions: +CHECKBOX_WIDTH EQU 26 +CHECKBOX_HEIGHT EQU 11 + +*------------------------------------------------------------------------* + +* Tags for GadTools functions: + +GT_TagBase EQU TAG_USER+$80000 ; Begin counting tags + +GTVI_NewWindow EQU GT_TagBase+1 ; NewWindow struct for GetVisualInfo +GTVI_NWTags EQU GT_TagBase+2 ; NWTags for GetVisualInfo + +GT_Private0 EQU GT_TagBase+3 ; (private) + +GTCB_Checked EQU GT_TagBase+4 ; State of checkbox + +GTLV_Top EQU GT_TagBase+5 ; Top visible one in listview +GTLV_Labels EQU GT_TagBase+6 ; List to display in listview +GTLV_ReadOnly EQU GT_TagBase+7 ; TRUE if listview is to be read-only +GTLV_ScrollWidth EQU GT_TagBase+8 ; Width of scrollbar + +GTMX_Labels EQU GT_TagBase+9 ; NULL-terminated array of labels +GTMX_Active EQU GT_TagBase+10 ; Active one in mx gadget + +GTTX_Text EQU GT_TagBase+11 ; Text to display +GTTX_CopyText EQU GT_TagBase+12 ; Copy text label instead of referencing it + +GTNM_Number EQU GT_TagBase+13 ; Number to display + +GTCY_Labels EQU GT_TagBase+14 ; NULL-terminated array of labels +GTCY_Active EQU GT_TagBase+15 ; The active one in the cycle gad + +GTPA_Depth EQU GT_TagBase+16 ; Number of bitplanes in palette +GTPA_Color EQU GT_TagBase+17 ; Palette color +GTPA_ColorOffset EQU GT_TagBase+18 ; First color to use in palette +GTPA_IndicatorWidth EQU GT_TagBase+19 ; Width of current-color indicator +GTPA_IndicatorHeight EQU GT_TagBase+20 ; Height of current-color indicator + +GTSC_Top EQU GT_TagBase+21 ; Top visible in scroller +GTSC_Total EQU GT_TagBase+22 ; Total in scroller area +GTSC_Visible EQU GT_TagBase+23 ; Number visible in scroller +GTSC_Overlap EQU GT_TagBase+24 ; Unused + +* GT_TagBase+25 through GT_TagBase+37 are reserved + +GTSL_Min EQU GT_TagBase+38 ; Slider min value +GTSL_Max EQU GT_TagBase+39 ; Slider max value +GTSL_Level EQU GT_TagBase+40 ; Slider level +GTSL_MaxLevelLen EQU GT_TagBase+41 ; Max length of printed level +GTSL_LevelFormat EQU GT_TagBase+42 ; Format string for level +GTSL_LevelPlace EQU GT_TagBase+43 ; Where level should be placed +GTSL_DispFunc EQU GT_TagBase+44 ; Callback for number calculation before display + +GTST_String EQU GT_TagBase+45 ; String gadget's displayed string +GTST_MaxChars EQU GT_TagBase+46 ; Max length of string + +GTIN_Number EQU GT_TagBase+47 ; Number in integer gadget +GTIN_MaxChars EQU GT_TagBase+48 ; Max number of digits + +GTMN_TextAttr EQU GT_TagBase+49 ; MenuItem font TextAttr +GTMN_FrontPen EQU GT_TagBase+50 ; MenuItem text pen color + +GTBB_Recessed EQU GT_TagBase+51 ; Make BevelBox recessed + +GT_VisualInfo EQU GT_TagBase+52 ; result of VisualInfo call + +GTLV_ShowSelected EQU GT_TagBase+53 ; show selected entry beneath listview, + ; set tag data = NULL for display-only, or pointer + ; to a string gadget you've created +GTLV_Selected EQU GT_TagBase+54 ; Set ordinal number of selected entry in the list +GT_Reserved1 EQU GT_TagBase+56 ; Reserved for future use + +GTTX_Border EQU GT_TagBase+57 ; Put a border around Text-display gadgets +GTNM_Border EQU GT_TagBase+58 ; Put a border around Number-display gadgets + +GTSC_Arrows EQU GT_TagBase+59 ; Specify size of arrows for scroller +GTMN_Menu EQU GT_TagBase+60 ; Pointer to Menu for use by + ; LayoutMenuItems() +GTMX_Spacing EQU GT_TagBase+61 ; Added to font height to + ; figure spacing between mx choices. Use this + ; instead of LAYOUTA_SPACING for mx gadgets. + +* New to V37 GadTools. Ignored by GadTools V36. +GTMN_FullMenu EQU GT_TagBase+62 ; Asks CreateMenus() to + ; validate that this is a complete menu structure +GTMN_SecondaryError EQU GT_TagBase+63 ; ti_Data is a pointer + ; to a ULONG to receive error reports from CreateMenus() +GT_Underscore EQU GT_TagBase+64 ; ti_Data points to the symbol + ; that preceeds the character you'd like to underline in a + ; gadget label +GTST_EditHook EQU GT_TagBase+55 ; String EditHook +GTIN_EditHook EQU GTST_EditHook ; Same thing, different name, + ; just to round out INTEGER_KIND gadgets + + +* New to V39 GadTools. Ignored by GadTools V36 and V37 +GTMN_Checkmark EQU GT_TagBase+65 ; ti_Data is checkmark img to use +GTMN_AmigaKey EQU GT_TagBase+66 ; ti_Data is Amiga-key img to use +GTMN_NewLookMenus EQU GT_TagBase+67 ; ti_Data is boolean + +* New to V39 GadTools. Ignored by GadTools V36 and V37. +* Set to TRUE if you want the checkbox or mx image scaled to +* the gadget width/height you specify. Defaults to FALSE, +* for compatibility. +GTCB_Scaled EQU GT_TagBase+68 ; ti_Data is boolean +GTMX_Scaled EQU GT_TagBase+69 ; ti_Data is boolean + +GTPA_NumColors EQU GT_TagBase+70 ; Number of colors in palette + +GTMX_TitlePlace EQU GT_TagBase+71 ; Where to put the title + +GTTX_FrontPen EQU GT_TagBase+72 ; Text color in TEXT_KIND gad +GTTX_BackPen EQU GT_TagBase+73 ; Bgrnd color in TEXT_KIND gad +GTTX_Justification EQU GT_TagBase+74 ; See GTJ_#? constants + +GTNM_FrontPen EQU GT_TagBase+72 ; Text color in NUMBER_KIND gad +GTNM_BackPen EQU GT_TagBase+73 ; Bgrnd color in NUMBER_KIND gad +GTNM_Justification EQU GT_TagBase+74 ; See GTJ_#? constants +GTNM_Format EQU GT_TagBase+75 ; Formatting string for number +GTNM_MaxNumberLen EQU GT_TagBase+76 ; Maximum length of number + +GTBB_FrameType EQU GT_TagBase+77 ; defines what kind of boxes + ; DrawBevelBox() renders. See + ; the BBFT_#? constants for + ; possible values + +GTLV_MakeVisible EQU GT_TagBase+78 ; Make this item visible + +GTSL_MaxPixelLen EQU GT_TagBase+80 ; Max pixel size of level display +GTSL_Justification EQU GT_TagBase+81 ; how should the level be displayed + +GTPA_ColorTable EQU GT_TagBase+82 ; colors to use in palette + +GTTX_Clipped EQU GT_TagBase+85 ; make a TEXT_KIND clip text +GTNM_Clipped EQU GT_TagBase+85 ; make a NUMBER_KIND clip text + +* Old definition, now obsolete: +GT_Reserved0 EQU GTST_EditHook + +*------------------------------------------------------------------------* + +* Justification types for GTTX_Justification and GTNM_Justification tags * +GTJ_LEFT EQU 0 +GTJ_RIGHT EQU 1 +GTJ_CENTER EQU 2 + +*------------------------------------------------------------------------* + +* Bevel box frame types for GTBB_FrameType tag +BBFT_BUTTON EQU 1 * Standard button gadget box +BBFT_RIDGE EQU 2 * Standard string gadget box +BBFT_ICONDROPBOX EQU 3 * Standard icon drop box + +*------------------------------------------------------------------------* + +* Typical suggested spacing between "elements": * +INTERWIDTH EQU 8 +INTERHEIGHT EQU 4 + +*------------------------------------------------------------------------* + +* "NWay" is an old synonym for cycle gadgets + +NWAY_KIND EQU CYCLE_KIND +NWAYIDCMP EQU CYCLEIDCMP + +GTNW_Labels EQU GTCY_Labels +GTNW_Active EQU GTCY_Active + +*------------------------------------------------------------------------* + +* These two definitions are obsolete, but are here for backwards +* compatibility. You never need to worry about these: +GADTOOLBIT EQU $8000 + +* Use this mask to isolate the user part: * +GADTOOLMASK EQU ~GADTOOLBIT + +*------------------------------------------------------------------------* + +* These definitions are for the GTLV_CallBack tag + +* The different types of messages that a listview callback hook can see +LV_DRAW equ $202 ; draw yourself, with state + +* Possible return values from a callback hook +LVCB_OK equ 0 ; callback understands this message type +LVCB_UNKNOWN equ 1 ; callback does not understand this message + +* states for LVDrawMsg.lvdm_State +LVR_NORMAL equ 0 ; the usual +LVR_SELECTED equ 1 ; for selected gadgets +LVR_NORMALDISABLED equ 2 ; for disabled gadgets +LVR_SELECTEDDISABLED equ 8 ; disabled and selected + +* structure of LV_DRAW messages, object is a (struct Node *) + STRUCTURE LVDrawMsg,0 + ULONG lvdm_MethodID ; LV_DRAW + APTR lvdm_RastPort ; where to render to + APTR lvdm_DrawInfo ; useful to have around + STRUCT lvdm_Bounds,ra_SIZEOF ; limits of where to render + ULONG lvdm_State ; how to render + +*------------------------------------------------------------------------* + + ENDC diff --git a/extra/rtg_driver/include/libraries/iffparse.i b/extra/rtg_driver/include/libraries/iffparse.i new file mode 100644 index 00000000..be102a18 --- /dev/null +++ b/extra/rtg_driver/include/libraries/iffparse.i @@ -0,0 +1,223 @@ + IFND LIBRARIES_IFFPARSE_I +LIBRARIES_IFFPARSE_I SET 1 +** +** $VER: iffparse.i 39.1 (1.6.1992) +** Includes Release 45.1 +** +** iffparse.library structures and constants +** +** (C) Copyright 1989-2001 Amiga, Inc. +** (C) Copyright 1989-1990 Stuart Ferguson and Leo L. Schwab +** All Rights Reserved +** + +;--------------------------------------------------------------------------- + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND EXEC_LISTS_I + INCLUDE "exec/lists.i" + ENDC + + IFND EXEC_PORTS_I + INCLUDE "exec/ports.i" + ENDC + + IFND DEVICES_CLIPBOARD_I + INCLUDE "devices/clipboard.i" + ENDC + +;--------------------------------------------------------------------------- + +; Structure associated with an active IFF stream. +; "iff_Stream" is a value used by the client's read/write/seek functions - +; it will not be accessed by the library itself and can have any value +; (could even be a pointer or a BPTR). +; +; This structure can only be allocated by iffparse.library +; + STRUCTURE IFFHandle,0 + ULONG iff_Stream + ULONG iff_Flags + LONG iff_Depth ; Depth of context stack. + LABEL iff_SIZEOF + +; Bit masks for "iff_Flags" field +IFFF_READ equ 0 ; read mode - default +IFFF_WRITE equ 1 ; write mode +IFFF_RWBITS equ IFFF_READ!IFFF_WRITE ; read/write bits +IFFF_FSEEK equ 1<<1 ; forward seek only +IFFF_RSEEK equ 1<<2 ; random seek +IFFF_RESERVED equ $FFFF0000 ; Don't touch these bits + +;--------------------------------------------------------------------------- + +; When the library calls your stream handler, you'll be passed a pointer +; to this structure as the "message packet". +; NOTE: ASSEMBLY PREFIX (isc_) DIFFERENT FROM C PREFIX (sc_). +; + STRUCTURE IFFStreamCmd,0 + LONG isc_Command ; Operation to be performed (IFFCMD_) + APTR isc_Buf ; Pointer to data buffer + LONG isc_NBytes ; Number of bytes to be affected + LABEL isc_SIZEOF + +;--------------------------------------------------------------------------- + +; A node associated with a context on the iff_Stack. Each node +; represents a chunk, the stack representing the current nesting +; of chunks in the open IFF file. Each context node has associated +; local context items in the (private) LocalItems list. The ID, type, +; size and scan values describe the chunk associated with this node. +; +; This structure can only be allocated by iffparse.library +; + STRUCTURE ContextNode,MLN_SIZE + LONG cn_ID + LONG cn_Type + LONG cn_Size ; Size of this chunk + LONG cn_Scan ; # of bytes read/written so far + LABEL cn_SIZEOF + +;--------------------------------------------------------------------------- + +; Local context items live in the ContextNode's. Each class is identified +; by its lci_Ident code and has a (private) purge vector for when the +; parent context node is popped. +; +; This structure can only be allocated by iffparse.library +; + STRUCTURE LocalContextItem,MLN_SIZE + ULONG lci_ID + ULONG lci_Type + ULONG lci_Ident + LABEL lci_SIZEOF + +;--------------------------------------------------------------------------- + +; StoredProperty: a local context item containing the data stored +; from a previously encountered property chunk. +; NOTE: ASSEMBLY PREFIX (spr_) DIFFERENT FROM C PREFIX (sp_). +; + STRUCTURE StoredProperty,0 + LONG spr_Size + APTR spr_Data + LABEL spr_SIZEOF + +;--------------------------------------------------------------------------- + +; Collection Item: the actual node in the collection list at which +; client will look. The next pointers cross context boundaries so +; that the complete list is accessable. +; NOTE: ASSEMBLY PREFIX (cit_) DIFFERENT FROM C PREFIX (ci_). +; + STRUCTURE CollectionItem,0 + APTR cit_Next + LONG cit_Size + APTR cit_Data + LABEL cit_SIZEOF + +;--------------------------------------------------------------------------- + +; Structure returned by OpenClipboard(). You may do CMD_POSTs and such +; using this structure. However, once you call OpenIFF(), you may not +; do any more of your own I/O to the clipboard until you call CloseIFF(). +; + STRUCTURE ClipboardHandle,iocr_SIZEOF ; cbh_Reg + STRUCT cbh_CBport,MP_SIZE + STRUCT cbh_SatisfyPort,MP_SIZE + LABEL cbh_SIZEOF + +;--------------------------------------------------------------------------- + +; IFF return codes. Most functions return either zero for success or +; one of these codes. The exceptions are the read/write functions which +; return positive values for number of bytes or records read or written, +; or a negative error code. Some of these codes are not errors per sae, +; but valid conditions such as EOF or EOC (End of Chunk). +; +IFFERR_EOF equ -1 ; Reached logical end of file +IFFERR_EOC equ -2 ; About to leave context +IFFERR_NOSCOPE equ -3 ; No valid scope for property +IFFERR_NOMEM equ -4 ; Internal memory alloc failed +IFFERR_READ equ -5 ; Stream read error +IFFERR_WRITE equ -6 ; Stream write error +IFFERR_SEEK equ -7 ; Stream seek error +IFFERR_MANGLED equ -8 ; Data in file is corrupt +IFFERR_SYNTAX equ -9 ; IFF syntax error +IFFERR_NOTIFF equ -10 ; Not an IFF file +IFFERR_NOHOOK equ -11 ; No call-back hook provided +IFF_RETURN2CLIENT equ -12 ; Client handler normal return + +;--------------------------------------------------------------------------- + +; Universal IFF identifiers +ID_FORM equ 'FORM' +ID_LIST equ 'LIST' +ID_CAT equ 'CAT ' +ID_PROP equ 'PROP' +ID_NULL equ ' ' + +; Identifier codes for universally recognized local context items. +IFFLCI_PROP equ 'prop' +IFFLCI_COLLECTION equ 'coll' +IFFLCI_ENTRYHANDLER equ 'enhd' +IFFLCI_EXITHANDLER equ 'exhd' + +;--------------------------------------------------------------------------- + +; Control modes for ParseIFF() function +IFFPARSE_SCAN equ 0 +IFFPARSE_STEP equ 1 +IFFPARSE_RAWSTEP equ 2 + +;--------------------------------------------------------------------------- + +; Control modes for StoreLocalItem() function +IFFSLI_ROOT equ 1 ; Store in default context +IFFSLI_TOP equ 2 ; Store in current context +IFFSLI_PROP equ 3 ; Store in topmost FORM or LIST + +;--------------------------------------------------------------------------- + +; Magic value for writing functions. If you pass this value in as a size +; to PushChunk() when writing a file, the parser will figure out the +; size of the chunk for you. If you know the size, is it better to +; provide as it makes things faster. +; +IFFSIZE_UNKNOWN equ -1 + +;--------------------------------------------------------------------------- + +; Possible call-back command values +; +IFFCMD_INIT equ 0 ; Prepare your stream for a session +IFFCMD_CLEANUP equ 1 ; Terminate stream session +IFFCMD_READ equ 2 ; Read bytes from stream +IFFCMD_WRITE equ 3 ; Write bytes to stream +IFFCMD_SEEK equ 4 ; Seek on stream +IFFCMD_ENTRY equ 5 ; You just entered a new context +IFFCMD_EXIT equ 6 ; You're about to leave a context +IFFCMD_PURGELCI equ 7 ; Purge a LocalContextItem + + +;--------------------------------------------------------------------------- + +; Obsolete IFFParse definitions, here for source code compatibility only. +; Please do NOT use in new code. +; +; Set IFFPARSE_V37_NAMES_ONLY to remove these older names +; + IFND IFFPARSE_V37_NAMES_ONLY +IFFSCC_INIT equ IFFCMD_INIT +IFFSCC_CLEANUP equ IFFCMD_CLEANUP +IFFSCC_READ equ IFFCMD_READ +IFFSCC_WRITE equ IFFCMD_WRITE +IFFSCC_SEEK equ IFFCMD_SEEK + ENDC + +;--------------------------------------------------------------------------- + + ENDC ; LIBRARIES_IFFPARSE_I diff --git a/extra/rtg_driver/include/libraries/locale.i b/extra/rtg_driver/include/libraries/locale.i new file mode 100644 index 00000000..608f9979 --- /dev/null +++ b/extra/rtg_driver/include/libraries/locale.i @@ -0,0 +1,238 @@ + IFND LIBRARIES_LOCALE_I +LIBRARIES_LOCALE_I SET 1 +** +** $VER: locale.i 38.10 (22.12.1992) +** Includes Release 45.1 +** +** locale.library interface structures and definitions +** +** (C) Copyright 1991-2001 Amiga, Inc. +** All Rights Reserved +** + +;--------------------------------------------------------------------------- + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND EXEC_NODES_I + INCLUDE "exec/nodes.i" + ENDC + + IFND EXEC_LISTS_I + INCLUDE "exec/lists.i" + ENDC + + IFND EXEC_LIBRARIES_I + INCLUDE "exec/libraries.i" + ENDC + + IFND UTILITY_TAGITEM_I + INCLUDE "utility/tagitem.i" + ENDC + +;--------------------------------------------------------------------------- + +; constants for GetLocaleStr() +DAY_1 equ 1 ; Sunday +DAY_2 equ 2 ; Monday +DAY_3 equ 3 ; Tuesday +DAY_4 equ 4 ; Wednesday +DAY_5 equ 5 ; Thursday +DAY_6 equ 6 ; Friday +DAY_7 equ 7 ; Saturday + +ABDAY_1 equ 8 ; Sun +ABDAY_2 equ 9 ; Mon +ABDAY_3 equ 10 ; Tue +ABDAY_4 equ 11 ; Wed +ABDAY_5 equ 12 ; Thu +ABDAY_6 equ 13 ; Fri +ABDAY_7 equ 14 ; Sat + +MON_1 equ 15 ; January +MON_2 equ 16 ; February +MON_3 equ 17 ; March +MON_4 equ 18 ; April +MON_5 equ 19 ; May +MON_6 equ 20 ; June +MON_7 equ 21 ; July +MON_8 equ 22 ; August +MON_9 equ 23 ; September +MON_10 equ 24 ; October +MON_11 equ 25 ; November +MON_12 equ 26 ; December + +ABMON_1 equ 27 ; Jan +ABMON_2 equ 28 ; Feb +ABMON_3 equ 29 ; Mar +ABMON_4 equ 30 ; Apr +ABMON_5 equ 31 ; May +ABMON_6 equ 32 ; Jun +ABMON_7 equ 33 ; Jul +ABMON_8 equ 34 ; Aug +ABMON_9 equ 35 ; Sep +ABMON_10 equ 36 ; Oct +ABMON_11 equ 37 ; Nov +ABMON_12 equ 38 ; Dec + +YESSTR equ 39 ; affirmative response for yes/no queries +NOSTR equ 40 ; negative response for yes/no queries + +AM_STR equ 41 ; AM +PM_STR equ 42 ; PM + +SOFTHYPHEN equ 43 ; soft hyphenation +HARDHYPHEN equ 44 ; hard hyphenation + +OPENQUOTE equ 45 ; start of quoted block +CLOSEQUOTE equ 46 ; end of quoted block + +YESTERDAYSTR equ 47 ; Yesterday +TODAYSTR equ 48 ; Today +TOMORROWSTR equ 49 ; Tomorrow +FUTURESTR equ 50 ; Future + +MAXSTRMSG equ 51 ; current number of defined strings + +;--------------------------------------------------------------------------- + +; OpenLibrary("locale.library",0) returns a pointer to this structure + STRUCTURE LocaleBase,LIB_SIZE + BOOL lb_SysPatches ; TRUE if locale installed its patches + +;--------------------------------------------------------------------------- + +; This structure must only be allocated by locale.library and is READ-ONLY! + STRUCTURE Locale,0 + APTR loc_LocaleName ; locale's name + APTR loc_LanguageName ; language of this locale + STRUCT loc_PrefLanguages,4*10 ; preferred languages + ULONG loc_Flags ; always 0 for now + + ULONG loc_CodeSet ; always 0 for now + ULONG loc_CountryCode ; user's country code + ULONG loc_TelephoneCode ; country's telephone code + LONG loc_GMTOffset ; minutes from GMT + UBYTE loc_MeasuringSystem ; what measuring system? + UBYTE loc_CalendarType ; what calendar type? + STRUCT loc_Reserved0,2 + + APTR loc_DateTimeFormat ; regular date & time format + APTR loc_DateFormat ; date format by itself + APTR loc_TimeFormat ; time format by itself + + APTR loc_ShortDateTimeFormat ; short date & time format + APTR loc_ShortDateFormat ; short date format by itself + APTR loc_ShortTimeFormat ; short time format by itself + + ; for numeric values + APTR loc_DecimalPoint ; character before the decimals + APTR loc_GroupSeparator ; separates groups of digits + APTR loc_FracGroupSeparator ; separates groups of digits + APTR loc_Grouping ; size of each group + APTR loc_FracGrouping ; size of each group + + ; for monetary values + APTR loc_MonDecimalPoint + APTR loc_MonGroupSeparator + APTR loc_MonFracGroupSeparator + APTR loc_MonGrouping + APTR loc_MonFracGrouping + UBYTE loc_MonFracDigits ; digits after the decimal point + UBYTE loc_MonIntFracDigits ; for international representation + STRUCT loc_Reserved1,2 + + ; for currency symbols + APTR loc_MonCS ; currency symbol + APTR loc_MonSmallCS ; symbol for small amounts + APTR loc_MonIntCS ; internationl (ISO 4217) code + + ; for positive monetary values + APTR loc_MonPositiveSign ; indicate positive money value + UBYTE loc_MonPositiveSpaceSep ; determine if separated by space + UBYTE loc_MonPositiveSignPos ; position of positive sign + UBYTE loc_MonPositiveCSPos ; position of currency symbol + UBYTE loc_Reserved2 + + ; for negative monetary values + APTR loc_MonNegativeSign ; indicate negative money value + UBYTE loc_MonNegativeSpaceSep ; determine if separated by space + UBYTE loc_MonNegativeSignPos ; position of negative sign + UBYTE loc_MonNegativeCSPos ; position of currency symbol + UBYTE loc_Reserved3 + LABEL Locale_SIZEOF + +; constants for Locale.loc_MeasuringSystem +MS_ISO equ 0 ; international metric system +MS_AMERICAN equ 1 ; american system +MS_IMPERIAL equ 2 ; imperial system +MS_BRITISH equ 3 ; british SYSTEM + +; constants for Locale.loc_CalendarType */ +CT_7SUN equ 0 ; 7 days a week, Sunday is the first day +CT_7MON equ 1 ; 7 days a week, Monday is the first day +CT_7TUE equ 2 ; 7 days a week, Tuesday is the first day +CT_7WED equ 3 ; 7 days a week, Wednesday is the first day +CT_7THU equ 4 ; 7 days a week, Thursday is the first day +CT_7FRI equ 5 ; 7 days a week, Friday is the first day +CT_7SAT equ 6 ; 7 days a week, Saturday is the first day + +; constants for Locale.loc_MonPositiveSpaceSep and Locale.loc_MonNegativeSpaceSep +SS_NOSPACE equ 0 ; cur. symbol is NOT separated from value with a space +SS_SPACE equ 1 ; cur. symbol IS separated from value with a space + +; constants for Locale.loc_MonPositiveSignPos and Locale.loc_MonNegativeSignPos +SP_PARENS equ 0 ; () surround the quantity and currency_symbol +SP_PREC_ALL equ 1 ; sign string comes before amount and symbol +SP_SUCC_ALL equ 2 ; sign string comes after amount and symbol +SP_PREC_CURR equ 3 ; sign string comes right before currency symbol +SP_SUCC_CURR equ 4 ; sign string comes right after currency symbol + +; constants for Locale.loc_MonPositiveCSPos and Locale.loc_MonNegativeCSPos */ +CSP_PRECEDES equ 0 ; currency symbol comes before value +CSP_SUCCEEDS equ 1 ; currency symbol comes after value + +;* elements of the byte arrays pointed to by: +;* Locale.loc_Grouping +;* Locale.loc_FracGrouping +;* Locale.loc_MonGrouping +;* Locale.loc_MonFracGrouping +;* are interpreted as follows: +;* +;* 255 indicates that no further grouping is to be performed +;* 0 indicates that the previous element is to be repeatedly used +;* for the remainder of the digits +;* the number of digits that comprises the current group + +;--------------------------------------------------------------------------- + +; Tags for OpenCatalog() +OC_TagBase EQU TAG_USER+$90000 +OC_BuiltInLanguage EQU OC_TagBase+1 ; language of built-in strings +OC_BuiltInCodeSet EQU OC_TagBase+2 ; code set of built-in strings +OC_Version EQU OC_TagBase+3 ; catalog version number required +OC_Language EQU OC_TagBase+4 ; preferred language of catalog + +;--------------------------------------------------------------------------- + +; Comparison types for StrnCmp() +SC_ASCII EQU 0 +SC_COLLATE1 EQU 1 +SC_COLLATE2 EQU 2 + +;--------------------------------------------------------------------------- + +; This structure must only be allocated by locale.library and is READ-ONLY! + STRUCTURE Catalog,LN_SIZE ; for internal linkage + UWORD cat_Pad ; to longword align + APTR cat_Language ; language of the catalog + ULONG cat_CodeSet ; currently always 0 + UWORD cat_Version ; version of the catalog + UWORD cat_Revision ; revision of the catalog + LABEL Catalog_SIZEOF + +;--------------------------------------------------------------------------- + + ENDC ; LIBRARIES_LOCALE_I diff --git a/extra/rtg_driver/include/libraries/lowlevel.i b/extra/rtg_driver/include/libraries/lowlevel.i new file mode 100644 index 00000000..2bc821da --- /dev/null +++ b/extra/rtg_driver/include/libraries/lowlevel.i @@ -0,0 +1,200 @@ + IFND LIBRARIES_LOWLEVEL_I +LIBRARIES_LOWLEVEL_I SET 1 +** +** $VER: lowlevel.i 40.7 (30.7.1993) +** Includes Release 45.1 +** +** lowlevel.library interface structures and definitions +** +** (C) Copyright 2001 Amiga, Inc. +** All Rights Reserved +** + +;--------------------------------------------------------------------------- + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND UTILITY_TAGITEM_I + INCLUDE "utility/tagitem.i" + ENDC + +;--------------------------------------------------------------------------- + +; structure for use with QueryKeys() + STRUCTURE KeyQuery,0 + UWORD kq_KeyCode + UWORD kq_Pressed + LABEL KeyQuery_SIZEOF + +;--------------------------------------------------------------------------- + +; bits in the return value of GetKey() + BITDEF LLK,LSHIFT,16 + BITDEF LLK,RSHIFT,17 + BITDEF LLK,CAPSLOCK,18 + BITDEF LLK,CONTROL,19 + BITDEF LLK,LALT,20 + BITDEF LLK,RALT,21 + BITDEF LLK,LAMIGA,22 + BITDEF LLK,RAMIGA,23 + +;--------------------------------------------------------------------------- + +; Tags for SetJoyPortAttrs() +; +SJA_Dummy equ (TAG_USER+$00C00100) +SJA_Type equ (SJA_Dummy+1) ; force type to mouse, joy, game cntrlr +SJA_Reinitialize equ (SJA_Dummy+2) ; free potgo bits, reset to autosense + +; Controller types for SJA_Type tag +SJA_TYPE_AUTOSENSE equ 0 +SJA_TYPE_GAMECTLR equ 1 +SJA_TYPE_MOUSE equ 2 +SJA_TYPE_JOYSTK equ 3 + +;--------------------------------------------------------------------------- + +; ReadJoyPort() retunr value definitions + +; Port types +JP_TYPE_NOTAVAIL equ (00<<28) ; port data unavailable +JP_TYPE_GAMECTLR equ (01<<28) ; port has game controller +JP_TYPE_MOUSE equ (02<<28) ; port has mouse +JP_TYPE_JOYSTK equ (03<<28) ; port has joystick +JP_TYPE_UNKNOWN equ (04<<28) ; port has unknown device +JP_TYPE_MASK equ (15<<28) ; controller type + +; Button types, valid for all types except JP_TYPE_NOTAVAIL + BITDEF JP,BUTTON_BLUE,23 ; Blue - Stop; Right Mouse + BITDEF JP,BUTTON_RED,22 ; Red - Select; Left Mouse; Joystick Fire + BITDEF JP,BUTTON_YELLOW,21 ; Yellow - Repeat + BITDEF JP,BUTTON_GREEN,20 ; Green - Shuffle + BITDEF JP,BUTTON_FORWARD,19 ; Charcoal - Forward + BITDEF JP,BUTTON_REVERSE,18 ; Charcoal - Reverse + BITDEF JP,BUTTON_PLAY,17 ; Grey - Play/Pause; Middle Mouse + +JP_BUTTON_MASK equ (JPF_BUTTON_BLUE!JPF_BUTTON_RED!JPF_BUTTON_YELLOW!JPF_BUTTON_GREEN!JPF_BUTTON_FORWARD!JPF_BUTTON_REVERSE!JPF_BUTTON_PLAY) + +; Direction types, valid for JP_TYPE_GAMECTLR and JP_TYPE_JOYSTK + BITDEF JP,JOY_UP,3 + BITDEF JP,JOY_DOWN,2 + BITDEF JP,JOY_LEFT,1 + BITDEF JP,JOY_RIGHT,0 + +JP_DIRECTION_MASK equ (JPF_JOY_UP!JPF_JOY_DOWN!JPF_JOY_LEFT!JPF_JOY_RIGHT) + +; Mouse position reports, valid for JP_TYPE_MOUSE +JP_MHORZ_MASK equ (255<<0) ; horizontal position +JP_MVERT_MASK equ (255<<8) ; vertical position +JP_MOUSE_MASK equ (JP_MHORZ_MASK!JP_MVERT_MASK) + +; Obsolete ReadJoyPort() definitions, here for source code compatibility only. +; Please do NOT use in new code. + BITDEF JP,BTN1,JPB_BUTTON_BLUE + BITDEF JP,BTN2,JPB_BUTTON_RED + BITDEF JP,BTN3,JPB_BUTTON_YELLOW + BITDEF JP,BTN4,JPB_BUTTON_GREEN + BITDEF JP,BTN5,JPB_BUTTON_FORWARD + BITDEF JP,BTN6,JPB_BUTTON_REVERSE + BITDEF JP,BTN7,JPB_BUTTON_PLAY + BITDEF JP,UP,JPB_JOY_UP + BITDEF JP,DOWN,JPB_JOY_DOWN + BITDEF JP,LEFT,JPB_JOY_LEFT + BITDEF JP,RIGHT,JPB_JOY_RIGHT + +;--------------------------------------------------------------------------- + +; Tags for SystemControl() +SCON_Dummy equ (TAG_USER+$00C00000) +SCON_TakeOverSys equ (SCON_Dummy+0) +SCON_KillReq equ (SCON_Dummy+1) +SCON_CDReboot equ (SCON_Dummy+2) +SCON_StopInput equ (SCON_Dummy+3) +SCON_AddCreateKeys equ (SCON_Dummy+4) +SCON_RemCreateKeys equ (SCON_Dummy+5) + +; Reboot control values for use with the SCON_CDReboot tag +CDReboot_On equ 1 +CDReboot_Off equ 0 +CDReboot_Default equ 2 + +;--------------------------------------------------------------------------- + +; Rawkey codes returned when using SCON_AddCreateKeys with SystemControl() + +RAWKEY_PORT0_BUTTON_BLUE equ $72 +RAWKEY_PORT0_BUTTON_RED equ $78 +RAWKEY_PORT0_BUTTON_YELLOW equ $77 +RAWKEY_PORT0_BUTTON_GREEN equ $76 +RAWKEY_PORT0_BUTTON_FORWARD equ $75 +RAWKEY_PORT0_BUTTON_REVERSE equ $74 +RAWKEY_PORT0_BUTTON_PLAY equ $73 +RAWKEY_PORT0_JOY_UP equ $79 +RAWKEY_PORT0_JOY_DOWN equ $7A +RAWKEY_PORT0_JOY_LEFT equ $7C +RAWKEY_PORT0_JOY_RIGHT equ $7B + +RAWKEY_PORT1_BUTTON_BLUE equ $172 +RAWKEY_PORT1_BUTTON_RED equ $178 +RAWKEY_PORT1_BUTTON_YELLOW equ $177 +RAWKEY_PORT1_BUTTON_GREEN equ $176 +RAWKEY_PORT1_BUTTON_FORWARD equ $175 +RAWKEY_PORT1_BUTTON_REVERSE equ $174 +RAWKEY_PORT1_BUTTON_PLAY equ $173 +RAWKEY_PORT1_JOY_UP equ $179 +RAWKEY_PORT1_JOY_DOWN equ $17A +RAWKEY_PORT1_JOY_LEFT equ $17C +RAWKEY_PORT1_JOY_RIGHT equ $17B + +RAWKEY_PORT2_BUTTON_BLUE equ $272 +RAWKEY_PORT2_BUTTON_RED equ $278 +RAWKEY_PORT2_BUTTON_YELLOW equ $277 +RAWKEY_PORT2_BUTTON_GREEN equ $276 +RAWKEY_PORT2_BUTTON_FORWARD equ $275 +RAWKEY_PORT2_BUTTON_REVERSE equ $274 +RAWKEY_PORT2_BUTTON_PLAY equ $273 +RAWKEY_PORT2_JOY_UP equ $279 +RAWKEY_PORT2_JOY_DOWN equ $27A +RAWKEY_PORT2_JOY_LEFT equ $27C +RAWKEY_PORT2_JOY_RIGHT equ $27B + +RAWKEY_PORT3_BUTTON_BLUE equ $372 +RAWKEY_PORT3_BUTTON_RED equ $378 +RAWKEY_PORT3_BUTTON_YELLOW equ $377 +RAWKEY_PORT3_BUTTON_GREEN equ $376 +RAWKEY_PORT3_BUTTON_FORWARD equ $375 +RAWKEY_PORT3_BUTTON_REVERSE equ $374 +RAWKEY_PORT3_BUTTON_PLAY equ $373 +RAWKEY_PORT3_JOY_UP equ $379 +RAWKEY_PORT3_JOY_DOWN equ $37A +RAWKEY_PORT3_JOY_LEFT equ $37C +RAWKEY_PORT3_JOY_RIGHT equ $37B + +;--------------------------------------------------------------------------- + +; return value for GetLanguageSelection() +LANG_UNKNOWN equ 0 +LANG_AMERICAN equ 1 ; American English +LANG_ENGLISH equ 2 ; British English +LANG_GERMAN equ 3 +LANG_FRENCH equ 4 +LANG_SPANISH equ 5 +LANG_ITALIAN equ 6 +LANG_PORTUGUESE equ 7 +LANG_DANISH equ 8 +LANG_DUTCH equ 9 +LANG_NORWEGIAN equ 10 +LANG_FINNISH equ 11 +LANG_SWEDISH equ 12 +LANG_JAPANESE equ 13 +LANG_CHINESE equ 14 +LANG_ARABIC equ 15 +LANG_GREEK equ 16 +LANG_HEBREW equ 17 +LANG_KOREAN equ 18 + +;--------------------------------------------------------------------------- + + ENDC ; LIBRARIES_LOWLEVEL_I diff --git a/extra/rtg_driver/include/libraries/mathlibrary.i b/extra/rtg_driver/include/libraries/mathlibrary.i new file mode 100644 index 00000000..63b258f0 --- /dev/null +++ b/extra/rtg_driver/include/libraries/mathlibrary.i @@ -0,0 +1,36 @@ + IFND LIBRARIES_MATHLIBRARY_I +LIBRARIES_MATHLIBRARY_I SET 1 +** +** $VER: mathlibrary.i 36.4 (13.7.1990) +** Includes Release 45.1 +** +** Data structure returned by OpenLibrary of: +** mathieeedoubbas.library,mathieeedoubtrans.library +** mathieeesingbas.library,mathieeesingtrans.library +** +** +** (C) Copyright 1987-2001 Amiga, Inc. +** All Rights Reserved +** + + ifnd EXEC_LIBRARIES_I + include "exec/libraries.i" + endc + + STRUCTURE MathIEEEBase,0 + STRUCT MathIEEEBase_LibNode,LIB_SIZE + STRUCT MathIEEEBase_reserved,18 + APTR MathIEEEBase_TaskOpenLib ; hook + APTR MathIEEEBase_TaskCloseLib ; hook +* This structure may be extended in the future */ + LABEL MathIEEEBase_SIZE + +; Math resources may need to know when a program opens or closes this +; library. The functions TaskOpenLib and TaskCloseLib are called when +; a task opens or closes this library. The yare initialized to point +; local initialization pertaining to 68881 stuff if 68881 resources +; are found. To override the default the vendor must provide appropriate +; hooks in the MathIEEEResource. If specified, these will be called +; when the library initializes. + + ENDC ; LIBRARIES_MATHLIBRARY_I diff --git a/extra/rtg_driver/include/libraries/mathresource.i b/extra/rtg_driver/include/libraries/mathresource.i new file mode 100644 index 00000000..93d57390 --- /dev/null +++ b/extra/rtg_driver/include/libraries/mathresource.i @@ -0,0 +1,53 @@ + IFND RESOURCES_MATHRESOURCE_I +RESOURCES_MATHRESOURCE_I SET 1 +** +** $VER: mathresource.i 36.3 (13.7.1990) +** Includes Release 45.1 +** +** Data structure returned by OpenResource of: +** "MathIEEE.resource" +** +** +** (C) Copyright 1987-2001 Amiga, Inc. +** All Rights Reserved +** + + IFND EXEC_NODES_I + include "exec/nodes.i" + ENDC + +* +* The 'Init' entries are only used if the corresponding +* bit is set in the Flags field. +* +* So if you are just a 68881, you do not need the Init stuff +* just make sure you have cleared the Flags field. +* +* This should allow us to add Extended Precision later. +* +* For Init users, if you need to be called whenever a task +* opens this library for use, you need to change the appropriate +* entries in MathIEEELibrary. +* + + STRUCTURE MathIEEEResourceResource,0 + STRUCT MathIEEEResource_Node,LN_SIZE + USHORT MathIEEEResource_Flags + APTR MathIEEEResource_BaseAddr * ptr to 881 if exists * + APTR MathIEEEResource_DblBasInit + APTR MathIEEEResource_DblTransInit + APTR MathIEEEResource_SglBasInit + APTR MathIEEEResource_SglTransInit + APTR MathIEEEResource_ExtBasInit + APTR MathIEEEResource_ExtTransInit + LABEL MathIEEEResourceResource_SIZE + +* definations for MathIEEERESOURCE_FLAGS * + BITDEF MATHIEEERESOURCE,DBLBAS,0 + BITDEF MATHIEEERESOURCE,DBLTRANS,1 + BITDEF MATHIEEERESOURCE,SGLBAS,2 + BITDEF MATHIEEERESOURCE,SGLTRANS,3 + BITDEF MATHIEEERESOURCE,EXTBAS,4 + BITDEF MATHIEEERESOURCE,EXTTRANS,5 + + ENDC ; RESOURCES_MATHRESOURCE_I diff --git a/extra/rtg_driver/include/libraries/nonvolatile.i b/extra/rtg_driver/include/libraries/nonvolatile.i new file mode 100644 index 00000000..ba3cffa3 --- /dev/null +++ b/extra/rtg_driver/include/libraries/nonvolatile.i @@ -0,0 +1,66 @@ + IFND LIBRARIES_NONVOLATILE_I +LIBRARIES_NONVOLATILE_I SET 1 +** +** $VER: nonvolatile.i 40.10 (3.8.1993) +** Includes Release 45.1 +** +** nonvolatile.library interface structures and definitions. +** +** (C) Copyright 1992-2001 Amiga, Inc. +** All Rights Reserved +** + +;--------------------------------------------------------------------------- + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND EXEC_NODES_I + INCLUDE "exec/nodes.i" + ENDC + +;--------------------------------------------------------------------------- + + STRUCTURE NVInfo,0 + ULONG nvi_MaxStorage + ULONG nvi_FreeStorage + LABEL NVINFO_SIZE + +;--------------------------------------------------------------------------- + + STRUCTURE NVEntry,0 + STRUCT nve_Node,MLN_SIZE + APTR nve_Name + ULONG nve_Size + ULONG nve_Protection + LABEL NVENTRY_SIZE + +;--------------------------------------------------------------------------- + +; Bit definitions for mask in SetNVProtection(). Also used for +; NVEntry.nve_Protection. + + BITDEF NVE,DELETE,0 + BITDEF NVE,APPNAME,31 + +;--------------------------------------------------------------------------- + +; errors from StoreNV() +NVERR_BADNAME equ 1 +NVERR_WRITEPROT equ 2 +NVERR_FAIL equ 3 +NVERR_FATAL equ 4 + + +;--------------------------------------------------------------------------- + +; determines the size of data returned by this library +SizeNVData MACRO ;DataPtr SizeReg + move.l -4(/1),/2 + subq.l #4,/2 + ENDM + +;--------------------------------------------------------------------------- + + ENDC ; LIBRARIES_NONVOLATILE_I diff --git a/extra/rtg_driver/include/libraries/realtime.i b/extra/rtg_driver/include/libraries/realtime.i new file mode 100644 index 00000000..bd14f263 --- /dev/null +++ b/extra/rtg_driver/include/libraries/realtime.i @@ -0,0 +1,185 @@ + IFND LIBRARIES_REALTIME_I +LIBRARIES_REALTIME_I SET 1 +** +** $VER: realtime.i 40.3 (5.4.1993) +** Includes Release 45.1 +** +** realtime.library timing and syncing system +** +** (C) Copyright 1991-2001 Amiga, Inc. +** All Rights Reserved +** + +;--------------------------------------------------------------------------- + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND EXEC_NODES_I + INCLUDE "exec/nodes.i" + ENDC + + IFND EXEC_LISTS_I + INCLUDE "exec/lists.i" + ENDC + + IFND EXEC_LIBRARIES_I + INCLUDE "exec/libraries.i" + ENDC + + IFND UTILITY_TAGITEM_I + INCLUDE "utility/tagitem.i" + ENDC + +;--------------------------------------------------------------------------- + +; realtime.library's idea of time is based on a clock which emits a pulse +; 1200 times a second (1.2kHz). All time values maintained by realtime.library +; are based on this number. For example, the field RealTimeBase->rtb_Time +; expresses an amount of time equivalent to (RealTimeBase->rtb_Time/TICK_FREQ) +; seconds. +; +TICK_FREQ equ 1200 + +;--------------------------------------------------------------------------- + +; Each Conductor represents a group of applications which wish to remain +; synchronized together. +; +; This structure must only be allocated by realtime.library and is +; READ-ONLY! +; + STRUCTURE Conductor,LN_SIZE + UWORD cdt_Reserved0 + STRUCT cdt_Players,MLH_SIZE ; this conductor's players + ULONG cdt_ClockTime ; current time of this sequence + ULONG cdt_StartTime ; start time of this sequence + ULONG cdt_ExternalTime ; time from external unit + ULONG cdt_MaxExternalTime ; upper limit on sync'd time + ULONG cdt_Metronome ; MetricTime highest pri node + UWORD cdt_Reserved1 + UWORD cdt_Flags ; conductor flags + UBYTE cdt_State ; playing or stopped + LABEL Conductor_SIZEOF + +; Flag bits for Conductor.cdt_Flags + BITDEF CONDUCT,EXTERNAL,0 ; clock is externally driven + BITDEF CONDUCT,GOTTICK,1 ; received 1st external tick + BITDEF CONDUCT,METROSET,2 ; cdt_Metronome filled in + BITDEF CONDUCT,PRIVATE,3 ; conductor is private + +; constants for Conductor.cdt_State and SetConductorState() +CONDSTATE_STOPPED EQU 0 ; clock is stopped +CONDSTATE_PAUSED EQU 1 ; clock is paused +CONDSTATE_LOCATE EQU 2 ; go to 'running' when ready +CONDSTATE_RUNNING EQU 3 ; run clock NOW + +; These do not actually exist as Conductor states, but are used as additional +; arguments to SetConductorState() +CONDSTATE_METRIC EQU -1 ; ask high node to locate +CONDSTATE_SHUTTLE EQU -2 ; time changing but not running +CONDSTATE_LOCATE_SET EQU -3 ; maestro done locating + +;--------------------------------------------------------------------------- + +; The Player is the connection between a Conductor and an application. +; +; This structure must only be allocated by realtime.library and is +; READ-ONLY! +; + STRUCTURE Player,LN_SIZE + BYTE pl_Reserved0 + BYTE pl_Reserved1 + APTR pl_Hook ; player's hook function + APTR pl_Source ; pointer to parent context + APTR pl_Task ; task to signal for changes + LONG pl_MetricTime ; current time in app's metric + LONG pl_AlarmTime ; time to wake up + APTR pl_UserData ; for application use + UWORD pl_PlayerID ; for application use + UWORD pl_Flags ; general Player flags + LABEL Player_SIZEOF + +; Flag bits for the Player.pl_Flags + BITDEF PLAYER,READY,0 ; player is ready to go! + BITDEF PLAYER,ALARMSET,1 ; alarm is set + BITDEF PLAYER,QUIET,2 ; a dummy player, used for sync + BITDEF PLAYER,CONDUCTED,3 ; give me metered time + BITDEF PLAYER,EXTSYNC,4 ; granted external sync + +;--------------------------------------------------------------------------- + +; Tags for CreatePlayer(), SetPlayerAttrs(), and GetPlayerAttrs() +PLAYER_Base EQU TAG_USER + 64 +PLAYER_Hook EQU PLAYER_Base + 1 ; set address of hook function +PLAYER_Name EQU PLAYER_Base + 2 ; name of player +PLAYER_Priority EQU PLAYER_Base + 3 ; priority of player +PLAYER_Conductor EQU PLAYER_Base + 4 ; set conductor for player +PLAYER_Ready EQU PLAYER_Base + 5 ; the "ready" flag +PLAYER_AlarmTime EQU PLAYER_Base + 12 ; alarm time (sets PLAYERF_ALARMSET) +PLAYER_Alarm EQU PLAYER_Base + 13 ; sets/clears PLAYERF_ALARMSET flag +PLAYER_AlarmSigTask EQU PLAYER_Base + 6 ; task to signal for alarm/state change +PLAYER_AlarmSigBit EQU PLAYER_Base + 8 ; signal bit for alarm (or -1) +PLAYER_Conducted EQU PLAYER_Base + 7 ; sets/clears PLAYERF_CONDUCTED flag +PLAYER_Quiet EQU PLAYER_Base + 9 ; don't process time thru this +PLAYER_UserData EQU PLAYER_Base + 10 +PLAYER_ID EQU PLAYER_Base + 11 +PLAYER_ExtSync EQU PLAYER_Base + 14 ; attempt/release to ext sync +PLAYER_ErrorCode EQU PLAYER_Base + 15 ; error return code + +;--------------------------------------------------------------------------- + +; Method types for messages sent via a Player's hook +PM_TICK EQU 0 +PM_STATE EQU 1 +PM_POSITION EQU 2 +PM_SHUTTLE EQU 3 + +; used for PM_TICK, PM_POSITION and PM_SHUTTLE methods + STRUCTURE pmTime,0 + ULONG pmt_Method ; PM_TICK, PM_POSITION, or PM_SHUTTLE + ULONG pmt_Time + LABEL pmTime_SIZEOF + +; used for the PM_STATE method + STRUCTURE pmState,0 + ULONG pms_Method ; PM_STATE + ULONG pms_OldState + LABEL pmState_SIZEOF + +;--------------------------------------------------------------------------- + +; possible lock types for LockRealTime() +RT_CONDUCTORS EQU 0 ; conductor list + +;--------------------------------------------------------------------------- + +; realtime.library error codes +RTE_NOMEMORY EQU 801 ; memory allocation failed +RTE_NOCONDUCTOR EQU 802 ; player needs a conductor +RTE_NOTIMER EQU 803 ; timer (CIA) allocation failed +RTE_PLAYING EQU 804 ; can't shuttle while playing + +;--------------------------------------------------------------------------- + +; OpenLibrary("realtime.library",0) returns a pointer to this structure. +; All fields are READ-ONLY. +; + STRUCTURE RealTimeBase,LIB_SIZE + STRUCT rtb_Reserved0,2 + + ULONG rtb_Time ; current time + ULONG rtb_TimeFrac ; fixed-point fractional part of time + WORD rtb_Reserved1 + WORD rtb_TickErr ; nanosecond error from ideal Tick length to + LABEL RealTimeBase_SIZEOF ; real tick length + +; Actual tick length is: 1/TICK_FREQ + rtb_TickErr/1e9 + +RealTime_TickErr_Min EQU -705 +RealTime_TickErr_Max EQU 705 + +;--------------------------------------------------------------------------- + + ENDC ; LIBRARIES_REALTIME_I diff --git a/extra/rtg_driver/include/libraries/translator.i b/extra/rtg_driver/include/libraries/translator.i new file mode 100644 index 00000000..37d918ca --- /dev/null +++ b/extra/rtg_driver/include/libraries/translator.i @@ -0,0 +1,20 @@ + IFND LIBRARIES_TRANSLATOR_I +LIBRARIES_TRANSLATOR_I SET 1 +** +** $VER: translator.i 36.1 (13.12.1990) +** Includes Release 45.1 +** +** Useful definitions for translator.library +** +** (C) Copyright 1988-2001 Amiga, Inc. and +** Joseph Katz/Mark Barton. All rights reserved. +** + + +* ;------ Translator error codes +TR_NotUsed EQU -1 ;This is an often used system rc +TR_NoMem EQU -2 ;Can't allocate memory +TR_MakeBad EQU -4 ;Error in MakeLibrary call + + + ENDC ; LIBRARIES_TRANSLATOR_I diff --git a/extra/rtg_driver/include/lvo/exec_lib.i b/extra/rtg_driver/include/lvo/exec_lib.i new file mode 100644 index 00000000..2ed6e8be --- /dev/null +++ b/extra/rtg_driver/include/lvo/exec_lib.i @@ -0,0 +1,118 @@ +_LVOSupervisor EQU -30 +_LVOInitCode EQU -72 +_LVOInitStruct EQU -78 +_LVOMakeLibrary EQU -84 +_LVOMakeFunctions EQU -90 +_LVOFindResident EQU -96 +_LVOInitResident EQU -102 +_LVOAlert EQU -108 +_LVODebug EQU -114 +_LVODisable EQU -120 +_LVOEnable EQU -126 +_LVOForbid EQU -132 +_LVOPermit EQU -138 +_LVOSetSR EQU -144 +_LVOSuperState EQU -150 +_LVOUserState EQU -156 +_LVOSetIntVector EQU -162 +_LVOAddIntServer EQU -168 +_LVORemIntServer EQU -174 +_LVOCause EQU -180 +_LVOAllocate EQU -186 +_LVODeallocate EQU -192 +_LVOAllocMem EQU -198 +_LVOAllocAbs EQU -204 +_LVOFreeMem EQU -210 +_LVOAvailMem EQU -216 +_LVOAllocEntry EQU -222 +_LVOFreeEntry EQU -228 +_LVOInsert EQU -234 +_LVOAddHead EQU -240 +_LVOAddTail EQU -246 +_LVORemove EQU -252 +_LVORemHead EQU -258 +_LVORemTail EQU -264 +_LVOEnqueue EQU -270 +_LVOFindName EQU -276 +_LVOAddTask EQU -282 +_LVORemTask EQU -288 +_LVOFindTask EQU -294 +_LVOSetTaskPri EQU -300 +_LVOSetSignal EQU -306 +_LVOSetExcept EQU -312 +_LVOWait EQU -318 +_LVOSignal EQU -324 +_LVOAllocSignal EQU -330 +_LVOFreeSignal EQU -336 +_LVOAllocTrap EQU -342 +_LVOFreeTrap EQU -348 +_LVOAddPort EQU -354 +_LVORemPort EQU -360 +_LVOPutMsg EQU -366 +_LVOGetMsg EQU -372 +_LVOReplyMsg EQU -378 +_LVOWaitPort EQU -384 +_LVOFindPort EQU -390 +_LVOAddLibrary EQU -396 +_LVORemLibrary EQU -402 +_LVOOldOpenLibrary EQU -408 +_LVOCloseLibrary EQU -414 +_LVOSetFunction EQU -420 +_LVOSumLibrary EQU -426 +_LVOAddDevice EQU -432 +_LVORemDevice EQU -438 +_LVOOpenDevice EQU -444 +_LVOCloseDevice EQU -450 +_LVODoIO EQU -456 +_LVOSendIO EQU -462 +_LVOCheckIO EQU -468 +_LVOWaitIO EQU -474 +_LVOAbortIO EQU -480 +_LVOAddResource EQU -486 +_LVORemResource EQU -492 +_LVOOpenResource EQU -498 +_LVORawDoFmt EQU -522 +_LVOGetCC EQU -528 +_LVOTypeOfMem EQU -534 +_LVOProcure EQU -540 +_LVOVacate EQU -546 +_LVOOpenLibrary EQU -552 +_LVOInitSemaphore EQU -558 +_LVOObtainSemaphore EQU -564 +_LVOReleaseSemaphore EQU -570 +_LVOAttemptSemaphore EQU -576 +_LVOObtainSemaphoreList EQU -582 +_LVOReleaseSemaphoreList EQU -588 +_LVOFindSemaphore EQU -594 +_LVOAddSemaphore EQU -600 +_LVORemSemaphore EQU -606 +_LVOSumKickData EQU -612 +_LVOAddMemList EQU -618 +_LVOCopyMem EQU -624 +_LVOCopyMemQuick EQU -630 +_LVOCacheClearU EQU -636 +_LVOCacheClearE EQU -642 +_LVOCacheControl EQU -648 +_LVOCreateIORequest EQU -654 +_LVODeleteIORequest EQU -660 +_LVOCreateMsgPort EQU -666 +_LVODeleteMsgPort EQU -672 +_LVOObtainSemaphoreShared EQU -678 +_LVOAllocVec EQU -684 +_LVOFreeVec EQU -690 +_LVOCreatePool EQU -696 +_LVODeletePool EQU -702 +_LVOAllocPooled EQU -708 +_LVOFreePooled EQU -714 +_LVOAttemptSemaphoreShared EQU -720 +_LVOColdReboot EQU -726 +_LVOStackSwap EQU -732 +_LVOChildFree EQU -738 +_LVOChildOrphan EQU -744 +_LVOChildStatus EQU -750 +_LVOChildWait EQU -756 +_LVOCachePreDMA EQU -762 +_LVOCachePostDMA EQU -768 +_LVOAddMemHandler EQU -774 +_LVORemMemHandler EQU -780 +_LVOObtainQuickVector EQU -786 diff --git a/extra/rtg_driver/include/lvo/expansion_lib.i b/extra/rtg_driver/include/lvo/expansion_lib.i new file mode 100644 index 00000000..5f8e5acc --- /dev/null +++ b/extra/rtg_driver/include/lvo/expansion_lib.i @@ -0,0 +1,21 @@ +_LVOAddConfigDev EQU -30 +_LVOAddBootNode EQU -36 +_LVOAllocBoardMem EQU -42 +_LVOAllocConfigDev EQU -48 +_LVOAllocExpansionMem EQU -54 +_LVOConfigBoard EQU -60 +_LVOConfigChain EQU -66 +_LVOFindConfigDev EQU -72 +_LVOFreeBoardMem EQU -78 +_LVOFreeConfigDev EQU -84 +_LVOFreeExpansionMem EQU -90 +_LVOReadExpansionByte EQU -96 +_LVOReadExpansionRom EQU -102 +_LVORemConfigDev EQU -108 +_LVOWriteExpansionByte EQU -114 +_LVOObtainConfigBinding EQU -120 +_LVOReleaseConfigBinding EQU -126 +_LVOSetCurrentBinding EQU -132 +_LVOGetCurrentBinding EQU -138 +_LVOMakeDosNode EQU -144 +_LVOAddDosNode EQU -150 diff --git a/extra/rtg_driver/include/lvo/intuition_lib.i b/extra/rtg_driver/include/lvo/intuition_lib.i new file mode 100644 index 00000000..763c1b3b --- /dev/null +++ b/extra/rtg_driver/include/lvo/intuition_lib.i @@ -0,0 +1,124 @@ +_LVOOpenIntuition EQU -30 +_LVOIntuition EQU -36 +_LVOAddGadget EQU -42 +_LVOClearDMRequest EQU -48 +_LVOClearMenuStrip EQU -54 +_LVOClearPointer EQU -60 +_LVOCloseScreen EQU -66 +_LVOCloseWindow EQU -72 +_LVOCloseWorkBench EQU -78 +_LVOCurrentTime EQU -84 +_LVODisplayAlert EQU -90 +_LVODisplayBeep EQU -96 +_LVODoubleClick EQU -102 +_LVODrawBorder EQU -108 +_LVODrawImage EQU -114 +_LVOEndRequest EQU -120 +_LVOGetDefPrefs EQU -126 +_LVOGetPrefs EQU -132 +_LVOInitRequester EQU -138 +_LVOItemAddress EQU -144 +_LVOModifyIDCMP EQU -150 +_LVOModifyProp EQU -156 +_LVOMoveScreen EQU -162 +_LVOMoveWindow EQU -168 +_LVOOffGadget EQU -174 +_LVOOffMenu EQU -180 +_LVOOnGadget EQU -186 +_LVOOnMenu EQU -192 +_LVOOpenScreen EQU -198 +_LVOOpenWindow EQU -204 +_LVOOpenWorkBench EQU -210 +_LVOPrintIText EQU -216 +_LVORefreshGadgets EQU -222 +_LVORemoveGadget EQU -228 +_LVOReportMouse EQU -234 +_LVORequest EQU -240 +_LVOScreenToBack EQU -246 +_LVOScreenToFront EQU -252 +_LVOSetDMRequest EQU -258 +_LVOSetMenuStrip EQU -264 +_LVOSetPointer EQU -270 +_LVOSetWindowTitles EQU -276 +_LVOShowTitle EQU -282 +_LVOSizeWindow EQU -288 +_LVOViewAddress EQU -294 +_LVOViewPortAddress EQU -300 +_LVOWindowToBack EQU -306 +_LVOWindowToFront EQU -312 +_LVOWindowLimits EQU -318 +_LVOSetPrefs EQU -324 +_LVOIntuiTextLength EQU -330 +_LVOWBenchToBack EQU -336 +_LVOWBenchToFront EQU -342 +_LVOAutoRequest EQU -348 +_LVOBeginRefresh EQU -354 +_LVOBuildSysRequest EQU -360 +_LVOEndRefresh EQU -366 +_LVOFreeSysRequest EQU -372 +_LVOMakeScreen EQU -378 +_LVORemakeDisplay EQU -384 +_LVORethinkDisplay EQU -390 +_LVOAllocRemember EQU -396 +_LVOAlohaWorkbench EQU -402 +_LVOFreeRemember EQU -408 +_LVOLockIBase EQU -414 +_LVOUnlockIBase EQU -420 +_LVOGetScreenData EQU -426 +_LVORefreshGList EQU -432 +_LVOAddGList EQU -438 +_LVORemoveGList EQU -444 +_LVOActivateWindow EQU -450 +_LVORefreshWindowFrame EQU -456 +_LVOActivateGadget EQU -462 +_LVONewModifyProp EQU -468 +_LVOQueryOverscan EQU -474 +_LVOMoveWindowInFrontOf EQU -480 +_LVOChangeWindowBox EQU -486 +_LVOSetEditHook EQU -492 +_LVOSetMouseQueue EQU -498 +_LVOZipWindow EQU -504 +_LVOLockPubScreen EQU -510 +_LVOUnlockPubScreen EQU -516 +_LVOLockPubScreenList EQU -522 +_LVOUnlockPubScreenList EQU -528 +_LVONextPubScreen EQU -534 +_LVOSetDefaultPubScreen EQU -540 +_LVOSetPubScreenModes EQU -546 +_LVOPubScreenStatus EQU -552 +_LVOObtainGIRPort EQU -558 +_LVOReleaseGIRPort EQU -564 +_LVOGadgetMouse EQU -570 +_LVOGetDefaultPubScreen EQU -582 +_LVOEasyRequestArgs EQU -588 +_LVOBuildEasyRequestArgs EQU -594 +_LVOSysReqHandler EQU -600 +_LVOOpenWindowTagList EQU -606 +_LVOOpenScreenTagList EQU -612 +_LVODrawImageState EQU -618 +_LVOPointInImage EQU -624 +_LVOEraseImage EQU -630 +_LVONewObjectA EQU -636 +_LVODisposeObject EQU -642 +_LVOSetAttrsA EQU -648 +_LVOGetAttr EQU -654 +_LVOSetGadgetAttrsA EQU -660 +_LVONextObject EQU -666 +_LVOMakeClass EQU -678 +_LVOAddClass EQU -684 +_LVOGetScreenDrawInfo EQU -690 +_LVOFreeScreenDrawInfo EQU -696 +_LVOResetMenuStrip EQU -702 +_LVORemoveClass EQU -708 +_LVOFreeClass EQU -714 +_LVOAllocScreenBuffer EQU -768 +_LVOFreeScreenBuffer EQU -774 +_LVOChangeScreenBuffer EQU -780 +_LVOScreenDepth EQU -786 +_LVOScreenPosition EQU -792 +_LVOScrollWindowRaster EQU -798 +_LVOLendMenus EQU -804 +_LVODoGadgetMethodA EQU -810 +_LVOSetWindowPointerA EQU -816 +_LVOTimedDisplayAlert EQU -822 +_LVOHelpControl EQU -828 diff --git a/extra/rtg_driver/include/utility/date.i b/extra/rtg_driver/include/utility/date.i new file mode 100644 index 00000000..08118060 --- /dev/null +++ b/extra/rtg_driver/include/utility/date.i @@ -0,0 +1,33 @@ + IFND UTILITY_DATE_I +UTILITY_DATE_I SET 1 +** +** $VER: date.i 39.1 (20.1.1992) +** Includes Release 45.1 +** +** Date conversion routines ClockData definition. +** +** (C) Copyright 1989-2001 Amiga, Inc. +** All Rights Reserved +** + +;--------------------------------------------------------------------------- + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + +;--------------------------------------------------------------------------- + + STRUCTURE CLOCKDATA,0 + UWORD sec + UWORD min + UWORD hour + UWORD mday + UWORD month + UWORD year + UWORD wday + LABEL CD_SIZE + +;--------------------------------------------------------------------------- + + ENDC ; UTILITY_DATE_I diff --git a/extra/rtg_driver/include/utility/hooks.i b/extra/rtg_driver/include/utility/hooks.i new file mode 100644 index 00000000..73128d95 --- /dev/null +++ b/extra/rtg_driver/include/utility/hooks.i @@ -0,0 +1,39 @@ + IFND UTILITY_HOOKS_I +UTILITY_HOOKS_I SET 1 +** +** $VER: hooks.i 39.1 (20.1.1992) +** Includes Release 45.1 +** +** Callback hooks +** +** (C) Copyright 1989-2001 Amiga, Inc. +** All Rights Reserved +** + +;--------------------------------------------------------------------------- + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND EXEC_NODES_I + INCLUDE "exec/nodes.i" + ENDC + +;--------------------------------------------------------------------------- + +; Hook conventions +; A0 - pointer to hook itself +; A1 - pointer to parameter packet ("message") +; A2 - Hook specific address data ("object," e.g, gadget ) + + STRUCTURE HOOK,MLN_SIZE + APTR h_Entry ; assembler entry point + APTR h_SubEntry ; optional HLL entry point + APTR h_Data ; owner specific + LABEL h_SIZEOF + + +;--------------------------------------------------------------------------- + + ENDC ; UTILITY_HOOKS_I diff --git a/extra/rtg_driver/include/utility/name.i b/extra/rtg_driver/include/utility/name.i new file mode 100644 index 00000000..6a1759e1 --- /dev/null +++ b/extra/rtg_driver/include/utility/name.i @@ -0,0 +1,39 @@ + IFND UTILITY_NAME_I +UTILITY_NAME_I EQU 1 +** +** $VER: name.i 39.3 (10.2.1993) +** Includes Release 45.1 +** +** Namespace definitions +** +** (C) Copyright 1992-2001 Amiga, Inc. +** All Rights Reserved +** + +;--------------------------------------------------------------------------- + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + +;--------------------------------------------------------------------------- + +* The named object structure */ +* + STRUCTURE NamedObject,0 + APTR no_Object ; Your pointer, for whatever you want + LABEL NamedObject_End + +ANO_NameSpace equ 4000 ; Tag to define namespace +ANO_UserSpace equ 4001 ; tag to define userspace +ANO_Priority equ 4002 ; tag to define priority +ANO_Flags equ 4003 ; tag to define flags + +* flags for tag ANO_Flags + + BITDEF NS,NODUPS,0 ; defaults to allowing duplicates + BITDEF NS,CASE,1 ; so it defaults to caseless + +;--------------------------------------------------------------------------- + + ENDC ; UTILITY_NAME_I diff --git a/extra/rtg_driver/include/utility/pack.i b/extra/rtg_driver/include/utility/pack.i new file mode 100644 index 00000000..d9e1e032 --- /dev/null +++ b/extra/rtg_driver/include/utility/pack.i @@ -0,0 +1,74 @@ + IFND UTILITY_PACK_I +UTILITY_PACK_I EQU 1 +** +** $VER: pack.i 39.4 (10.2.1993) +** Includes Release 45.1 +** +** Control attributes for Pack/UnpackStructureTags() +** +** (C) Copyright 1992-2001 Amiga, Inc. +** All Rights Reserved +** + +;--------------------------------------------------------------------------- + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND EXEC_MACROS_I + INCLUDE "exec/macros.i" + ENDC + + IFND UTILITY_TAGITEM_I + INCLUDE "utility/tagitem.i" + ENDC + +;--------------------------------------------------------------------------- + +; PackTable definition: +; +; The PackTable is a simple array of LONGWORDS that are then evaluated +; by PackStructureTags and UnpackStructureTags. +; +; The table contains compressed information such as the tag offset from +; the base tag. The tag offset has a limited range so the base tag is +; defined in the first longword. +; +; After the first longword, the fields look as follows: +; +; +--------- 1 = signed, 0 = unsigned (for bits, 1=inverted boolean) +; | +; | +------ 00 = Pack/Unpack, 10 = Pack, 01 = Unpack, 11 = special +; | / \ +; | | | +-- 00 = Byte, 01 = Word, 10 = Long, 11 = Bit +; | | | / \ +; | | | | | /----- For bit operations: 1 = TAG_EXISTS is TRUE +; | | | | | | +; | | | | | | /-------------------- Tag offset from base tag value +; | | | | | | | \ +; m n n o o p q q q q q q q q q q r r r s s s s s s s s s s s s s +; \ | | | +; Bit offset (for bit operations) ----/ | | +; \ | +; Offset into data structure -----------------------------------/ +; +; A -1 longword signifies that the next longword will be a new base tag +; +; A 0 longword signifies that it is the end of the pack table. +; +; What this implies is that there are only 13-bits of address offset +; and 10 bits for tag offsets from the base tag. For most uses this +; should be enough, but when this is not, either multiple pack tables +; or a pack table with extra base tags would be able to do the trick. +; The goal here was to make the tables small and yet flexible enough to +; handle most cases. +; + BITDEF PST,SIGNED,31 + BITDEF PST,UNPACK,30 ; Note that these are active low... + BITDEF PST,PACK,29 ; Note that these are active low... + BITDEF PST,EXISTS,26 ; Tag exists bit true flag hack... + +;--------------------------------------------------------------------------- + + ENDC ; UTILITY_PACK_I diff --git a/extra/rtg_driver/include/utility/tagitem.i b/extra/rtg_driver/include/utility/tagitem.i new file mode 100644 index 00000000..c7a6f2eb --- /dev/null +++ b/extra/rtg_driver/include/utility/tagitem.i @@ -0,0 +1,62 @@ + IFND UTILITY_TAGITEM_I +UTILITY_TAGITEM_I SET 1 +** +** $VER: tagitem.i 40.1 (19.7.1993) +** Includes Release 45.1 +** +** Extended specification mechanism +** +** (C) Copyright 1989-2001 Amiga, Inc. +** All Rights Reserved +** + +;--------------------------------------------------------------------------- + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + +;--------------------------------------------------------------------------- + +; Tags are a general mechanism of extensible data arrays for parameter +; specification and property inquiry. In practice, tags are used in arrays, +; or chain of arrays. + + STRUCTURE TagItem,0 + ULONG ti_Tag ; identifies the type of the data + ULONG ti_Data ; type-specific data + LABEL ti_SIZEOF + +; constants for Tag.ti_Tag, control tag values +TAG_DONE equ 0 ; terminates array of TagItems. ti_Data unused +TAG_END equ 0 ; synonym for TAG_DONE +TAG_IGNORE equ 1 ; ignore this item, not end of array +TAG_MORE equ 2 ; ti_Data is pointer to another array of TagItems + ; note that this tag terminates the current array +TAG_SKIP equ 3 ; skip this and the next ti_Data items + +; differentiates user tags from control tags +TAG_USER equ $80000000 + +; If the TAG_USER bit is set in a tag number, it tells utility.library that +; the tag is not a control tag (like TAG_DONE, TAG_IGNORE, TAG_MORE) and is +; instead an application tag. "USER" means a client of utility.library in +; general, including system code like Intuition or ASL, it has nothing to do +; with user code. +; + +;--------------------------------------------------------------------------- + +; Tag filter logic specifiers for use with FilterTagItems() +TAGFILTER_AND equ 0 ; exclude everything but filter hits +TAGFILTER_NOT equ 1 ; exclude only filter hits + +;--------------------------------------------------------------------------- + +; Mapping types for use with MapTags() +MAP_REMOVE_NOT_FOUND equ 0 ; remove tags that aren't in mapList +MAP_KEEP_NOT_FOUND equ 1 ; keep tags that aren't in mapList + +;--------------------------------------------------------------------------- + + ENDC ; UTILITY_TAGITEM_I diff --git a/extra/rtg_driver/include/utility/utility.i b/extra/rtg_driver/include/utility/utility.i new file mode 100644 index 00000000..3904cb61 --- /dev/null +++ b/extra/rtg_driver/include/utility/utility.i @@ -0,0 +1,35 @@ + IFND UTILITY_UTILITY_I +UTILITY_UTILITY_I SET 1 +** +** $VER: utility.i 39.6 (12.8.1993) +** Includes Release 45.1 +** +** utility.library include file +** +** (C) Copyright 1989-2001 Amiga, Inc. +** All Rights Reserved +** + +;--------------------------------------------------------------------------- + + IFND EXEC_TYPES_I + INCLUDE "exec/types.i" + ENDC + + IFND EXEC_LIBRARIES_I + INCLUDE "exec/libraries.i" + ENDC + +;--------------------------------------------------------------------------- + +UTILITYNAME MACRO + DC.B 'utility.library',0 + ENDM + + STRUCTURE UtilityBase,LIB_SIZE + UBYTE ub_Language + UBYTE ub_Reserved + +;--------------------------------------------------------------------------- + + ENDC ; UTILITY_UTILITY_I