- Timestamp:
- 08/07/2017 02:04:35 PM (7 years ago)
- Branches:
- master
- Children:
- 27c8d40
- Parents:
- 84c0125
- Location:
- iolib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
iolib/hwdefs.s
r84c0125 r8325447 5 5 .text 6 6 7 .xdef _io_time,_io_lcd,_io_ser,_io_midi8 .xdef _io_disk,_io_tone,_io_leds,_io_kbrd9 .xdef _io_vreg,_io_vraw,_io_vram,_io_fpu10 .xdef _lcd_a0,_lcd_a17 .xdef io_time,io_lcd,io_ser,io_midi 8 .xdef io_disk,io_tone,io_leds,io_kbrd 9 .xdef io_vreg,io_vraw,io_vram,io_fpu 10 .xdef lcd_a0,lcd_a1 11 11 12 .xdef _v_regs,_v_odtab,_v_actab13 .xdef _v_ct014 .xdef _v_gt115 .xdef _v_score,_v_cgtab12 .xdef v_regs,v_odtab,v_actab 13 .xdef v_ct0 14 .xdef v_gt1 15 .xdef v_score,v_cgtab 16 16 17 .xdef _v_curs0,_v_curs1,_v_curs2,_v_curs318 .xdef _v_curs4,_v_curs5,_v_curs6,_v_curs719 .xdef _v_kbobj,_v_lnobj,_v_tcur20 .xdef _v_win021 .xdef _v_cur17 .xdef v_curs0,v_curs1,v_curs2,v_curs3 18 .xdef v_curs4,v_curs5,v_curs6,v_curs7 19 .xdef v_kbobj,v_lnobj,v_tcur 20 .xdef v_win0 21 .xdef v_cur 22 22 23 .xdef _fc_sw,_fc_val23 .xdef fc_sw,fc_val 24 24 25 25 | ------------------------------------------------------------------------------ … … 27 27 | Hardware base addresses 28 28 | ----------------------- 29 _io_fpu = 0x180000 | FPU base address29 io_fpu = 0x180000 | FPU base address 30 30 31 31 VB = 0x200000 | VSDD base address 32 32 33 _io_time= 0x3A0001 | Timer chip34 _io_lcd = 0x3A4001 | LCD controller35 _io_ser = 0x3A8001 | Serial ports (RS232)36 _io_midi= 0x3AC001 | MIDI ports37 _io_disk =0x3B0001 | Disk controller38 _io_tone= 0x3B4001 | Sound generator chip39 _io_leds= 0x3B8001 | LED driver40 _io_kbrd= 0x3BC001 | Keyboard / panel processor33 io_time = 0x3A0001 | Timer chip 34 io_lcd = 0x3A4001 | LCD controller 35 io_ser = 0x3A8001 | Serial ports (RS232) 36 io_midi = 0x3AC001 | MIDI ports 37 io_disk = 0x3B0001 | Disk controller 38 io_tone = 0x3B4001 | Sound generator chip 39 io_leds = 0x3B8001 | LED driver 40 io_kbrd = 0x3BC001 | Keyboard / panel processor 41 41 42 _lcd_a0 = _io_lcd | LCD port a043 _lcd_a1 = _io_lcd+2 | LCD port a142 lcd_a0 = io_lcd | LCD port a0 43 lcd_a1 = io_lcd+2 | LCD port a1 44 44 45 45 .page … … 47 47 | Video definitions 48 48 | ----------------- 49 _io_vreg= VB | Relocated video registers after setup50 _io_vraw= VB+0x400 | Raw video registers at RESET51 _io_vram= VB | Video RAM base address49 io_vreg = VB | Relocated video registers after setup 50 io_vraw = VB+0x400 | Raw video registers at RESET 51 io_vram = VB | Video RAM base address 52 52 53 53 | Name Offset Usage Bank 54 54 | ------- --------- ------------------------- ---- 55 _v_regs = VB | Video registers 0,155 v_regs = VB | Video registers 0,1 56 56 57 _v_odtab= VB+128 | Object Descriptor Table 058 _v_actab= VB+256 | Access Table 059 _v_ct0 = VB+1024 | Character Text-0 060 _v_gt1 = VB+1304 | Graphics Text-1 061 _v_score= VB+8192 | Score object 062 _v_cgtab= VB+122880 | Character Generator Table 057 v_odtab = VB+128 | Object Descriptor Table 0 58 v_actab = VB+256 | Access Table 0 59 v_ct0 = VB+1024 | Character Text-0 0 60 v_gt1 = VB+1304 | Graphics Text-1 0 61 v_score = VB+8192 | Score object 0 62 v_cgtab = VB+122880 | Character Generator Table 0 63 63 64 _v_curs0= VB+1024 | Cursor object 0 (arrow ULE) 165 _v_curs1= VB+1152 | Cursor object 1 (arrow ULO) 166 _v_curs2= VB+1280 | Cursor object 2 (arrow URE) 167 _v_curs3= VB+1408 | Cursor object 3 (arrow URO) 168 _v_curs4= VB+1536 | Cursor object 4 (arrow LLE) 169 _v_curs5= VB+1664 | Cursor object 5 (arrow LLO) 170 _v_curs6= VB+1792 | Cursor object 6 (arrow LRE) 171 _v_curs7= VB+1920 | Cursor object 7 (arrow LRO) 172 _v_tcur = VB+2048 | Typewriter cursor 173 _v_kbobj= VB+2880 | Keyboard object 174 _v_lnobj= VB+4672 | Line object 175 _v_cur = VB+6464 | Underline cursor 176 _v_win0 = VB+16384 | Window-0 object 164 v_curs0 = VB+1024 | Cursor object 0 (arrow ULE) 1 65 v_curs1 = VB+1152 | Cursor object 1 (arrow ULO) 1 66 v_curs2 = VB+1280 | Cursor object 2 (arrow URE) 1 67 v_curs3 = VB+1408 | Cursor object 3 (arrow URO) 1 68 v_curs4 = VB+1536 | Cursor object 4 (arrow LLE) 1 69 v_curs5 = VB+1664 | Cursor object 5 (arrow LLO) 1 70 v_curs6 = VB+1792 | Cursor object 6 (arrow LRE) 1 71 v_curs7 = VB+1920 | Cursor object 7 (arrow LRO) 1 72 v_tcur = VB+2048 | Typewriter cursor 1 73 v_kbobj = VB+2880 | Keyboard object 1 74 v_lnobj = VB+4672 | Line object 1 75 v_cur = VB+6464 | Underline cursor 1 76 v_win0 = VB+16384 | Window-0 object 1 77 77 78 78 | BIOS RAM definitions … … 81 81 | variables defined in bios.s or chaos is guaranteed. 82 82 83 _fc_sw = 0x420 | word - Frame counter switch84 _fc_val = 0x422 | long - Frame counter value83 fc_sw = 0x420 | word - Frame counter switch 84 fc_val = 0x422 | long - Frame counter value 85 85 86 86 .end -
iolib/rtraps.s
r84c0125 r8325447 5 5 .text 6 6 7 .xdef _trap157 .xdef trap15 8 8 9 .xref _rompbp9 .xref rompbp 10 10 11 11 .xref tr1sav,tr13sav,tr14sav … … 24 24 IPL7 = 0x0700 | IPL 7 25 25 26 | _trap15 -- ROMP debug trap (used to implement breakpoints)27 | ------ -------------------------------------------------28 _trap15:ori.w #IPL7,sr | Disable interrupts26 | trap15 -- ROMP debug trap (used to implement breakpoints) 27 | ------ ------------------------------------------------ 28 trap15: ori.w #IPL7,sr | Disable interrupts 29 29 move.w #0,-(a7) | Keep stack long aligned 30 30 movem.l d0-d7/a0-a7,-(a7) | Save regs on stack … … 36 36 ori.w #IPLEVEL,d0 | ... 37 37 move.w d0,sr | ... 38 jsr _rompbp | Pass control to ROMP38 jsr rompbp | Pass control to ROMP 39 39 40 40 ori.w #IPL7,sr | Disable interrupts -
iolib/setipl.s
r84c0125 r8325447 16 16 .text 17 17 18 .xdef _setipl18 .xdef setipl 19 19 20 _setipl:link a6,#0 | Link up stack frames20 setipl: link a6,#0 | Link up stack frames 21 21 move.w 8(a6),d0 | Get argument 22 22 tst.w d0 | Check lower limit -
iolib/setsr.s
r84c0125 r8325447 19 19 .text 20 20 21 .xdef _setsr21 .xdef setsr 22 22 23 _setsr: move.w sr,d0 | Get current sr23 setsr: move.w sr,d0 | Get current sr 24 24 move.w 4(sp),sr | Set new sr 25 25 rts | Return to caller -
iolib/traps.s
r84c0125 r8325447 7 7 | don't use them in interrupt processing code. 8 8 9 | An exception is made for ROMP in _trap15 for breakpoints so that the9 | An exception is made for ROMP in trap15 for breakpoints so that the 10 10 | debug code can be debugged. 11 11 12 12 .text 13 13 14 .xdef _trap115 .xdef _trap13,_trap1416 .xdef _xtrap1514 .xdef trap1 15 .xdef trap13,trap14 16 .xdef xtrap15 17 17 18 18 .xdef tr1sav,tr13sav,tr14sav 19 19 .xdef tr1rmp,tr13rmp,tr14rmp 20 20 21 | _trap1 -- provide access to BDOS functions22 | ----- ---------------------------------23 _trap1: move.l (a7)+,tr1sav | Save return address21 | trap1 -- provide access to BDOS functions 22 | ----- -------------------------------- 23 trap1: move.l (a7)+,tr1sav | Save return address 24 24 trap #1 | Do the trap 25 25 move.l tr1sav,-(a7) | Restore return address 26 26 rts | Return to caller 27 27 28 | _trap13 -- provide access to BIOS functions29 | ------ ---------------------------------30 _trap13:move.l (a7)+,tr13sav | Save return address28 | trap13 -- provide access to BIOS functions 29 | ------ -------------------------------- 30 trap13: move.l (a7)+,tr13sav | Save return address 31 31 trap #13 | Do the trap 32 32 move.l tr13sav,-(a7) | Restore return address 33 33 rts | Return to caller 34 34 35 | _trap14 -- provide access to extended BIOS functions36 | ------ ------------------------------------------37 _trap14:move.l (a7)+,tr14sav | Save return address35 | trap14 -- provide access to extended BIOS functions 36 | ------ ----------------------------------------- 37 trap14: move.l (a7)+,tr14sav | Save return address 38 38 trap #14 | Do the trap 39 39 move.l tr14sav,-(a7) | Restore return address 40 40 rts | Return to caller 41 41 42 | _xtrap15 -- Setup initial register trap for ROMP43 | ------- -------------------------------------44 _xtrap15: trap #15 | TRAP into ROMP42 | xtrap15 -- Setup initial register trap for ROMP 43 | ------- ------------------------------------ 44 xtrap15: trap #15 | TRAP into ROMP 45 45 rts | Return (usually won't happen) 46 46
Note:
See TracChangeset
for help on using the changeset viewer.