x68000:trap_codes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
x68000:trap_codes [2017/08/14 12:28] – neko68k | x68000:trap_codes [2017/11/25 05:57] – neko68k | ||
---|---|---|---|
Line 6: | Line 6: | ||
|2|〃(pcm8.x)| | |2|〃(pcm8.x)| | ||
|3|〃(zmusic.x、zmsc3.x、middrv.r)| | |3|〃(zmusic.x、zmsc3.x、middrv.r)| | ||
- | |4|〃(mxdrv.x、madrv.x、mld.x、mcdrv.x)| | + | |[[trap_codes# |
|5|〃| | |5|〃| | ||
|6|〃| | |6|〃| | ||
Line 12: | Line 12: | ||
|8|Breakpoint(ROM Debugger)| | |8|Breakpoint(ROM Debugger)| | ||
|9|〃 (db.x、scd.x)| | |9|〃 (db.x、scd.x)| | ||
- | |10|Reset/ | + | |[[trap_codes# |
- | |11|BREAK key processing| | + | |[[trap_codes# |
- | |12|COPY key processing| | + | |[[trap_codes# |
- | |13|CTRL+C processing| | + | |[[trap_codes# |
- | |14|Error handling| | + | |[[trap_codes# |
- | |15|IOCS call| | + | |[[trap_codes# |
+ | < | ||
+ | ===trap #4 MXDRV=== | ||
+ | Args d0.l = Command | ||
+ | |||
+ | ^Command^Name^Function^ | ||
+ | | 0x00 | UNLINK | ||
+ | | 0x01 | ERROR | | | ||
+ | | 0x02 | LOADMML | ||
+ | | 0x03 | LOADPCM | ||
+ | | 0x04 | M_PLAY | ||
+ | | 0x05 | M_END |Stop playback| | ||
+ | | 0x06 | M_STOP | ||
+ | | 0x07 | M_CONT | ||
+ | | 0x08 | MMLNAME | ||
+ | | 0x09 | PCMNAME | ||
+ | | 0x0A | VOLADD | ||
+ | | 0x0B | PCMCUT | ||
+ | | 0x0C | FADEOUT | ||
+ | | 0x0D | AMPLAY | ||
+ | | 0x0E | CHMASK | ||
+ | | 0x0F | M_PLAY2 | ||
+ | | 0x10 | WORKS |Get FM buffer address| | ||
+ | | 0x11 | TIMSET | ||
+ | | 0x12 | M_STAT | ||
+ | | 0x13 | KEYBCONT | ||
+ | | 0x14 | M_STAT2 | ||
+ | | 0x15 | EXMODE | ||
+ | | 0x16 | TRACEMODE | ||
+ | | 0x17 | TRACESTEP | ||
+ | | 0x18 | PCM4WORKS | ||
+ | | 0x19 | EXCHWORKS | ||
+ | | 0x1A | | | | ||
+ | | 0x1B | | | | ||
+ | | 0x1C | | | | ||
+ | | 0x1D | | | | ||
+ | | 0x1E | | | | ||
+ | | 0x1F | | | | ||
+ | |||
+ | < | ||
===trap # | ===trap # | ||
Line 35: | Line 74: | ||
It will be called after it ends. | It will be called after it ends. | ||
+ | < | ||
===trap #11 - BREAK key processing=== | ===trap #11 - BREAK key processing=== | ||
Line 51: | Line 91: | ||
a reentrant structure. | a reentrant structure. | ||
+ | < | ||
===trap #12 - COPY key handling=== | ===trap #12 - COPY key handling=== | ||
Line 70: | Line 111: | ||
* OPT.2 + COPY LF 〃 | * OPT.2 + COPY LF 〃 | ||
+ | < | ||
===trap #13 - CTRL+C handling=== | ===trap #13 - CTRL+C handling=== | ||
Line 78: | Line 120: | ||
so they can be used by users. | so they can be used by users. | ||
+ | < | ||
===trap #14 - Error handling=== | ===trap #14 - Error handling=== | ||
Line 94: | Line 137: | ||
keyboard and sets d7.w to 1 (reexecution) or 2 (ignore) and | keyboard and sets d7.w to 1 (reexecution) or 2 (ignore) and | ||
return. If abort is specified (will not return). | return. If abort is specified (will not return). | ||
- | |||
- | Error number | ||
^Code^Description^Other info^ | ^Code^Description^Other info^ | ||
- | |$00xx|CPU Exception processing/ | + | |$00xx|CPU Exception processing/ |
+ | |||
+ | ^Code^Description^ | ||
|$0002|Bus error| | |$0002|Bus error| | ||
|$0003|Address error| | |$0003|Address error| | ||
Line 109: | Line 152: | ||
|$01xx|Unregistered IOCS call| | |$01xx|Unregistered IOCS call| | ||
- | ^Code^Description^Other info^ | + | ^Code^Description^ |
|$02xx~$0fxx|Reserved| | |$02xx~$0fxx|Reserved| | ||
- | |$10xx~$1fxx|Error (cancellation only)|For error numbers from $1000~$7FFF, | + | |$10xx~$1fxx|Error (cancellation only)| |
|$20xx~$2fxx|Error (retry only)| | |$20xx~$2fxx|Error (retry only)| | ||
|$30xx~$3fxx|Error (re-execute & cancel)| | |$30xx~$3fxx|Error (re-execute & cancel)| | ||
Line 126: | Line 169: | ||
|$ffxx|Unregistered DOS call|In Human68k version 3.0x unregistered DOS call returns -1 and error handling is not called. When the interrupt switch is pressed the error numbers are two numbers, $001F and $003F. Usually the latter is used.| | |$ffxx|Unregistered DOS call|In Human68k version 3.0x unregistered DOS call returns -1 and error handling is not called. When the interrupt switch is pressed the error numbers are two numbers, $001F and $003F. Usually the latter is used.| | ||
+ | For error numbers from $1000~$7FFF, | ||
^Code^Description^ | ^Code^Description^ | ||
Line 146: | Line 190: | ||
If the low-order byte is 0 the user can specify the character string to be displayed. The address of the character string is passed in a5.l and the character string must not be more than the display witdh 52 digits. However, as the error code of the device driver, if the low byte (3rd byte from the head of the request header) is 0, it is handled as normal ternimation and it is impossible to pass the address of the character string, so this function can not be used. | If the low-order byte is 0 the user can specify the character string to be displayed. The address of the character string is passed in a5.l and the character string must not be more than the display witdh 52 digits. However, as the error code of the device driver, if the low byte (3rd byte from the head of the request header) is 0, it is handled as normal ternimation and it is impossible to pass the address of the character string, so this function can not be used. | ||
- | + | ||
+ | < | ||
===trap #15 - IOCS processing=== | ===trap #15 - IOCS processing=== | ||
Line 160: | Line 205: | ||
Each function of IOCS is created as a subroutine returning with //rts//. There is no problem in destroying //a0.l// (from the point of view of the user, there is no guarantee that it will be saved when shortcutting), | Each function of IOCS is created as a subroutine returning with //rts//. There is no problem in destroying //a0.l// (from the point of view of the user, there is no guarantee that it will be saved when shortcutting), | ||
- | ===How handles vector base register | + | ===How handles vector base register |
- | In X68030 (ROM IOCS version 1.3), //vbr// can be enabled. After checking that the following vectors are standard vectors pointing inside the ROM, change the value obtained by subtracting 2 from each address. However, in some IOCS calls, routines in ROM can not deal with what is calling(?). | + | In X68030 (ROM IOCS version 1.3), //VBR// can be enabled. After checking that the following vectors are standard vectors pointing inside the ROM, change the value obtained by subtracting 2 from each address. However, in some IOCS calls, routines in ROM can not deal with what is calling(?). |
- | * trap #15(IOCS processing address table is also changed to vbr+$400) | + | * trap #15(IOCS processing address table is also changed to VBR+$400) |
* IOCS _FNTGET | * IOCS _FNTGET | ||
* IOCS _OPMINTST | * IOCS _OPMINTST |
x68000/trap_codes.txt · Last modified: 2019/08/27 20:45 by 127.0.0.1