GRiD Compass
mame64.exe grid1101 -ieee_grid grid2101_hdd -hard image.img -window -resolution 640x480GRiDiRG
sudo losetup /dev/loop0 image.img
sudo dd if=/dev/loop0p1 of=image1.img bs=512
sudo dd if=/dev/loop0p2 of=image2.img bs=512
sudo losetup -d /dev/loop0
bios_main:02FF setupIDT proc near ; CODE XREF: CompassPromStart+4A↓p
bios_main:02FF mov ds, cs:word_FC010
bios_main:0304 assume ds:nothing
bios_main:0304 mov ax, 30h ; '0'
bios_main:0307 mov ds:259h, ax
bios_main:030A mov ax, 0FF32h
bios_main:030D mov ds:25Bh, ax
bios_main:0310 mov al, 0
bios_main:0312 call WaitForKeyboardInput
bios_main:0315 mov ax, 0DFFCh
bios_main:0318 mov es, ax
bios_main:031A assume es:nothing
bios_main:031A mov al, es:0
bios_main:031E mov al, 18h
bios_main:0320 mov ds:0Ch, al
bios_main:0323 call WaitForKeyboardInput
bios_main:0326 mov word ptr ds:8, 1905h
bios_main:032C mov al, 2
bios_main:032E push ax
bios_main:032F mov ax, 0FC01h
bios_main:0332 push ax
bios_main:0333 mov ax, 3A4h
bios_main:0336 push ax
bios_main:0337 call CpSetInterrupt
bios_main:033C mov al, 2
bios_main:033E push ax
bios_main:033F push ax
bios_main:0340 call CpEnableInterrupt
bios_main:0345 mov word ptr ds:0, 5Dh ; ']'
bios_main:034B mov word ptr ds:2, 0FC01h
bios_main:0351 mov word ptr ds:4, 5Dh ; ']'
bios_main:0357 mov word ptr ds:6, 0FC01h
bios_main:035D mov word ptr ds:0Ah, 0
bios_main:0363 mov byte ptr ds:15Fh, 0EAh
bios_main:0368 mov word ptr ds:160h, 1761h
bios_main:036E mov word ptr ds:162h, 0FC01h
bios_main:0374 mov ax, 3
bios_main:0377 push ax
bios_main:0378 mov ax, 1
bios_main:037B push ax
bios_main:037C call CpCatchAll
bios_main:0381 mov ax, 3
bios_main:0384 push ax
bios_main:0385 mov ax, 0FC01h
bios_main:0388 push ax
bios_main:0389 mov ax, offset OnIrq3
bios_main:038C push ax
bios_main:038D call CpSetInterrupt
bios_main:0392 mov ax, 7
bios_main:0395 push ax
bios_main:0396 mov ax, 0FC01h
bios_main:0399 push ax
bios_main:039A mov ax, offset OnIrq7
bios_main:039D push ax
bios_main:039E call CpSetInterrupt
bios_main:03A3 retn
bios_main:005E SetupPIC proc near ; CODE XREF: CompassPromStart+47↓p
bios_main:005E xor ax, ax
bios_main:0060 mov ds, ax
bios_main:0062 assume ds:IDT
bios_main:0062 xor bx, bx
bios_main:0064 mov cx, 100h
bios_main:0067
bios_main:0067 fillIDT: ; CODE XREF: SetupPIC+15↓j
bios_main:0067 mov word ptr [bx], offset defaultIRET
bios_main:006B mov word ptr [bx+2], 0FC01h
bios_main:0070 add bx, 4
bios_main:0073 loop fillIDT
bios_main:0075 mov al, 13h ; PIC, 8259A.
bios_main:0075 ; Command register
bios_main:0077 out 0, al
bios_main:0079 mov al, 20h ; ' ' ; PIC, 8259A.
bios_main:0079 ; Data register
bios_main:007B out 2, al
bios_main:007D mov al, 0Dh ; PIC, 8259A.
bios_main:007D ; Data register
bios_main:007F out 2, al
bios_main:0081 mov al, 0FFh ; PIC, 8259A.
bios_main:0081 ; Data register
bios_main:0083 out 2, al
bios_main:0085 retn
bios_main:0085 SetupPIC endp
bios_main:00BE CpSetInterrupt proc far ; CODE XREF: setupIDT+38↓P
bios_main:00BE ; setupIDT+8E↓P ...
bios_main:00BE
bios_main:00BE arg_0 = dword ptr 8
bios_main:00BE arg_4 = byte ptr 0Ch
bios_main:00BE
bios_main:00BE push ds
bios_main:00BF push bp
bios_main:00C0 mov bp, sp
bios_main:00C2 xor bx, bx
bios_main:00C4 mov ds, bx
bios_main:00C6 assume ds:IDT
bios_main:00C6 mov bl, [bp+arg_4]
bios_main:00C9 mov bl, cs:[bx+4]
bios_main:00CE shl bx, 1
bios_main:00D0 shl bx, 1
bios_main:00D2 add bx, 80h
bios_main:00D6 les cx, [bx]
bios_main:00D8 push es
bios_main:00D9 les dx, [bp+arg_0]
bios_main:00DC mov [bx], dx
bios_main:00DE mov word ptr [bx+2], es
bios_main:00E1 pop es
bios_main:00E2 mov bx, cx
bios_main:00E4 pop bp
bios_main:00E5 pop ds
bios_main:00E6 assume ds:nothing
bios_main:00E6 retf 6
bios_main:00E6 CpSetInterrupt endp
CpSetInterruptзанимается только векторами в таблице (нулевой адрес в ОЗУ)...
CpEnableInterruptи
CpDisableInterruptтолько маскирует/демаскирует определонные прерывания на контроллере.
CpEndOfInterruptтолько говорит контроллеру что прерывание закончено...
int8087 EQU 0
intGpib EQU 1
intKeyboard EQU 2 ; (Never used on CCCOS)
intSysTick EQU 3 ; (intVertSync on compass)
intModem EQU 4
intBubble EQU 5 ; (Never used on CCCOS)
intSerial EQU 6
intRing EQU 7
CpEndOfInterrupt
/*
* IRQ0 serial
* IRQ1 bubble
* IRQ2 modem
* IRQ3 system tick || vert sync
* IRQ4 keyboard
* IRQ5 gpib
* IRQ6 8087
* IRQ7 ring
*/
BlitRectangle PROC FAR
; This routine takes a rectangle in memory (a character, icon, etc.) which was
; defined by GRiDFONT and blits it to the display.
bubbleDrv:0006 word_FE3C6 dw 0FF29h ; DATA XREF: bubbleDrv:0009↓r
bubbleDrv:0008 ; ---------------------------------------------------------------------------
bubbleDrv:0008
bubbleDrv:0008 BubbleCommand: ; CODE XREF: j_BubbleCommand↓J
bubbleDrv:0008 push ds
bubbleDrv:0009 mov ds, cs:word_FE3C6
bubbleDrv:000E assume ds:nothing
bubbleDrv:000E pop bx
bubbleDrv:000F pop cx
bubbleDrv:0010 pop dx
bubbleDrv:0011 pop word ptr ds:39C4h
bubbleDrv:0015 pop word ptr ds:39C6h
bubbleDrv:0019 pop word ptr ds:39C8h
bubbleDrv:001D pop word ptr ds:39CAh
bubbleDrv:0021 pop word ptr ds:39CCh
[cpu] New CS! exec: Addr: FE3C:0008, opcode: 1E
[cpu] exec: Addr: FE3C:0008, opcode: 1E
[cpu] regs: AX: 0059, BX: 0001, CX: 0006, DX: 0000
[cpu] regs: SI: 0001, DI: 0057, BP: 012A, SP: 011C
[cpu] regs: CS: FE3C, DS: 02CA, ES: 02CA, SS: 0298
[cpu] exec: Addr: FE3C:0009, opcode: 2E
[cpu] regs: AX: 0059, BX: 0001, CX: 0006, DX: 0000
[cpu] regs: SI: 0001, DI: 0057, BP: 012A, SP: 011A
[cpu] regs: CS: FE3C, DS: 02CA, ES: 02CA, SS: 0298
[cpu] exec: Addr: FE3C:000A, opcode: 8E
[cpu] regs: AX: 0059, BX: 0001, CX: 0006, DX: 0000
[cpu] regs: SI: 0001, DI: 0057, BP: 012A, SP: 011A
[cpu] regs: CS: FE3C, DS: 02CA, ES: 02CA, SS: 0298
[cpu] exec: Addr: FE3C:000E, opcode: 5B
[cpu] regs: AX: 0059, BX: 0001, CX: 0006, DX: 0000
[cpu] regs: SI: 0001, DI: 0057, BP: 012A, SP: 011A
[cpu] regs: CS: FE3C, DS: FF29, ES: 02CA, SS: 0298
[cpu] exec: Addr: FE3C:000F, opcode: 59
[cpu] regs: AX: 0059, BX: 02CA, CX: 0006, DX: 0000
[cpu] regs: SI: 0001, DI: 0057, BP: 012A, SP: 011C
[cpu] regs: CS: FE3C, DS: FF29, ES: 02CA, SS: 0298
[cpu] exec: Addr: FE3C:0010, opcode: 5A
[cpu] regs: AX: 0059, BX: 02CA, CX: 01AD, DX: 0000
[cpu] regs: SI: 0001, DI: 0057, BP: 012A, SP: 011E
[cpu] regs: CS: FE3C, DS: FF29, ES: 02CA, SS: 0298
[cpu] exec: Addr: FE3C:0011, opcode: 8F
[cpu] regs: AX: 0059, BX: 02CA, CX: 01AD, DX: FE7E
[cpu] regs: SI: 0001, DI: 0057, BP: 012A, SP: 0120
[cpu] regs: CS: FE3C, DS: FF29, ES: 02CA, SS: 0298
[cpu] exec: Addr: FE3C:0015, opcode: 8F
[cpu] regs: AX: 0059, BX: 02CA, CX: 01AD, DX: FE7E
[cpu] regs: SI: 0001, DI: 0057, BP: 012A, SP: 0122
[cpu] regs: CS: FE3C, DS: FF29, ES: 02CA, SS: 0298
[cpu] exec: Addr: FE3C:0019, opcode: 8F
[cpu] regs: AX: 0059, BX: 02CA, CX: 01AD, DX: FE7E
[cpu] regs: SI: 0001, DI: 0057, BP: 012A, SP: 0124
[cpu] regs: CS: FE3C, DS: FF29, ES: 02CA, SS: 0298
[cpu] exec: Addr: FE3C:001D, opcode: 8F
[cpu] regs: AX: 0059, BX: 02CA, CX: 01AD, DX: FE7E
[cpu] regs: SI: 0001, DI: 0057, BP: 012A, SP: 0126
[cpu] regs: CS: FE3C, DS: FF29, ES: 02CA, SS: 0298
[cpu] exec: Addr: FE3C:0021, opcode: 8F
[cpu] regs: AX: 0059, BX: 02CA, CX: 01AD, DX: FE7E
[cpu] regs: SI: 0001, DI: 0057, BP: 012A, SP: 0128
[cpu] regs: CS: FE3C, DS: FF29, ES: 02CA, SS: 0298
addr32 &= MEMORY_MASK;
Interrupts (usernameak wrong version):
IRQ0: serial
IRQ1: bubble
IRQ2: modem
IRQ3: system tick || vert sync
IRQ4: keyboard
IRQ5: gpib
IRQ6: 8087
IRQ7: ring
Interrupts form Source code:
int8087 EQU 0
intGpib EQU 1
intKeyboard EQU 2 ; (Never used on CCCOS)
intSysTick EQU 3 ; (intVertSync on compass)
intModem EQU 4
intBubble EQU 5 ; (Never used on CCCOS)
intSerial EQU 6
intRing EQU 7
[i7220] Thread command 02 'Read Bubble Data'
[i7220] command not implemented
[i7220] command complete. Status: error
Interrupts form Source code:
int8087 EQU 0
intGpib EQU 1
intKeyboard EQU 2 ; (Never used on CCCOS)
intSysTick EQU 3 ; (intVertSync on compass)
intModem EQU 4
intBubble EQU 5 ; (Never used on CCCOS)
intSerial EQU 6
intRing EQU 7
6,5,4,3,2,1,0,7