Editing Wikifang:Network Translation Patchsite/BugVM
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 95: | Line 95: | ||
|- | |- | ||
! 5x | ! 5x | ||
| SCRCURS <br> [[#op_C54|$C54]] || || || || || || || || || || | | SCRCURS <br> [[#op_C54|$C54]] || || || || || || || || || || || WINCLR <br> [[#op_97C|$97C]] || || || || RESLD <br> [[#op_9C6|$9C6]] | ||
|- | |- | ||
! 6x | ! 6x | ||
| || SPRINPUT <br> [[#op_A29|$A29]] || || || || || || || || || FARCALL <br> [[#op_91B|$91B]] || FARJMP <br> [[#op_83B|$83B]] || || || | | || SPRINPUT <br> [[#op_A29|$A29]] || || || || || || || || || FARCALL <br> [[#op_91B|$91B]] || FARJMP <br> [[#op_83B|$83B]] || || || || | ||
|- | |- | ||
! 7x | ! 7x | ||
| | | || || TILELD <br> [[#op_1BAC|$1BAC]] || || || PALLD <br> [[#op_2F0E|$2F0E]] || || || || || || || || WINCOORD <br> [[#op_C24|$C24]] || WINCURS <br> [[#op_C63|$C63]] || | ||
|- | |- | ||
! 8x | ! 8x | ||
| || || WINBRK <br> [[#op_ADA|$ADA]] || || || || TMAPSAV <br> [[#op_1C92|$1C92]] || || || || || || | | || || WINBRK <br> [[#op_ADA|$ADA]] || || || || TMAPSAV <br> [[#op_1C92|$1C92]] || || || || || || || || SPRWIPE <br> [[#op_289C|$289C]] || | ||
|- | |- | ||
! 9x | ! 9x | ||
| || || | | || || || || || || || || || || || || || || || PRKEY <br> [[#op_165A|$165A]] | ||
|- | |- | ||
! Ax | ! Ax | ||
| BLKKEY <br> [[#op_42A|$42A]] || PRMOVE <br> [[#op_1668|$1668]] || BLKMOVE <br> [[#op_3FE|$3FE]] || || || PRNAME <br> [[#op_162A|$162A]] || SPRCTRL <br> [[#op_235E|$235E]] || | | BLKKEY <br> [[#op_42A|$42A]] || PRMOVE <br> [[#op_1668|$1668]] || BLKMOVE <br> [[#op_3FE|$3FE]] || || || PRNAME <br> [[#op_162A|$162A]] || SPRCTRL <br> [[#op_235E|$235E]] || SPRPLAY <br> [[#op_2386|$2386]] || || || || || || || || PRMON <br> [[#op_1622|$1622]] | ||
|- | |- | ||
! Bx | ! Bx | ||
Line 116: | Line 116: | ||
|- | |- | ||
! Cx | ! Cx | ||
| || || || || || || | | || || || || || || || || || || || || || || || SPRHIDE <br> [[#op_2877|$2877]] | ||
|- | |- | ||
! Dx | ! Dx | ||
Line 125: | Line 125: | ||
|- | |- | ||
! Fx | ! Fx | ||
| || BLKENC <br> [[#op_3CD|$3CD]] || || || | | || BLKENC <br> [[#op_3CD|$3CD]] || || || || || || || || || || || || || || | ||
|} | |} | ||
Line 202: | Line 202: | ||
| PRED <br> (PREDicate) || $1E || $820 || None || immed (TOP) -> &pred (TOP) || Cast the value '''immed''' into a predicate memory index &'''pred'''. | | PRED <br> (PREDicate) || $1E || $820 || None || immed (TOP) -> &pred (TOP) || Cast the value '''immed''' into a predicate memory index &'''pred'''. | ||
|- id='op_831' | |- id='op_831' | ||
| POPALL <br> (POP ALL) || $2C || $831 || None || ( | | POPALL <br> (POP ALL) || $2C || $831 || None || anything (TOP) -> (EMPTY) || Empty the stack. | ||
|- id='op_8DE' | |- id='op_8DE' | ||
| IMMED <br> (IMMEDiate) || $3D || $8DE || immed (16b) || (TOP) -> immed (TOP) || Push '''immed''' onto the data stack as an immediate value. | | IMMED <br> (IMMEDiate) || $3D || $8DE || immed (16b) || (TOP) -> immed (TOP) || Push '''immed''' onto the data stack as an immediate value. | ||
Line 302: | Line 302: | ||
Tile X and Y coordinates allow you to control where the tilemap data is written. These coordinates are in tile units and are relative to the first visible tile on the screen (based on the current screen scroll). | Tile X and Y coordinates allow you to control where the tilemap data is written. These coordinates are in tile units and are relative to the first visible tile on the screen (based on the current screen scroll). | ||
|- id='op_9C6' | |- id='op_9C6' | ||
| RESLD <br> (RESource LoaD) || $5F || $9C6 || None || linkage_index, copy_start, copy_len, target_addr, target_bank (TOP) -> (TOP) || Load graphics resources from BugFS file linkage_index into tile memory. | | RESLD <br> (RESource LoaD) || $5F || $9C6 || None || linkage_index, copy_start, copy_len, target_addr, target_bank (TOP) -> (TOP) || Load graphics resources from BugFS file linkage_index into tile memory. | ||
Line 354: | Line 352: | ||
If this window is a menu, and the item counts are configured correctly, WINFRAME will also draw the overflow arrows. | If this window is a menu, and the item counts are configured correctly, WINFRAME will also draw the overflow arrows. | ||
|- id='op_B2D' | |- id='op_B2D' | ||
| WINOPEN <br> (WINdow OPEN) || $B2 || $B2D || None || None || Animate the current window opening. | | WINOPEN <br> (WINdow OPEN) || $B2 || $B2D || None || None || Animate the current window opening. | ||
This animation requires that the window span the whole width of the screen and that [[#op_1C92|TMAPSAV]] had been used to copy the screen before the window frame was drawn (e.g. with [[#op_AFC|WINFRAME]]). Execution of BugVM code is halted until the animation completes. | This animation requires that the window span the whole width of the screen and that [[#op_1C92|TMAPSAV]] had been used to copy the screen before the window frame was drawn (e.g. with [[#op_AFC|WINFRAME]]). Execution of BugVM code is halted until the animation completes. | ||
|- id='op_97C' | |- id='op_97C' | ||
| WINCLR <br> (WINdow CLeaR) || $5B || $97C || None || None || Clear the active window region. | | WINCLR <br> (WINdow CLeaR) || $5B || $97C || None || None || Clear the active window region. | ||
Line 372: | Line 363: | ||
|- id='op_C63' | |- id='op_C63' | ||
| WINCURS <br> (WINdow CURSor) || $7E || $C63 || None || x, y (TOP) -> (TOP) || Set the tile cursor relative to the window. | | WINCURS <br> (WINdow CURSor) || $7E || $C63 || None || x, y (TOP) -> (TOP) || Set the tile cursor relative to the window. | ||
|- id='op_A12' | |- id='op_A12' | ||
| WINWAIT <br> (WINdow WAIT) || $60 || $A12 || None || None || Wait for user input. | | WINWAIT <br> (WINdow WAIT) || $60 || $A12 || None || None || Wait for user input. | ||
Line 404: | Line 385: | ||
|- | |- | ||
! Opcode !! Encoding(s) !! Native Impl. !! Operand Args !! Stack Args !! Description | ! Opcode !! Encoding(s) !! Native Impl. !! Operand Args !! Stack Args !! Description | ||
|- id='op_235E' | |- id='op_235E' | ||
| SPRCTRL <br> (SPRite ConTRoL) || $A6 || $235E || None || slot, | | SPRCTRL <br> (SPRite ConTRoL) || $A6 || $235E || None || slot, direction (TOP) -> (TOP) || Control a given sprite with user or simulated input. | ||
''slot'' refers to the sprite to control (0 thru 7) and '' | ''slot'' refers to the sprite to control (0 thru 7) and ''direction'' is the input state or simulated input state to send to the sprite. | ||
The given sprite will have a movement animation queued on it if and only if the space for the sprite to move to is free. Otherwise, no action will be taken. Queued sprite animations can be played with other SPR opcodes. | The given sprite will have a movement animation queued on it if and only if the space for the sprite to move to is free. Otherwise, no action will be taken. Queued sprite animations can be played with other SPR opcodes. | ||
Consult [[#op_A1D|WININPUT]] for information about the format of input state. | Consult [[#op_A1D|WININPUT]] for information about the format of input state. | ||
|- id='op_A29' | |- id='op_A29' | ||
| SPRINPUT <br> (SPRite INPUT) || $61 || $A29 || None || (TOP) -> input_changed (TOP) || Wait for user input. | | SPRINPUT <br> (SPRite INPUT) || $61 || $A29 || None || (TOP) -> input_changed (TOP) || Wait for user input. | ||
Line 463: | Line 406: | ||
Consult [[#op_A1D|WININPUT]] for information about this opcode's output format. | Consult [[#op_A1D|WININPUT]] for information about this opcode's output format. | ||
|- id='op_2386' | |- id='op_2386' | ||
| | | SPRPLAY <br> (SPRite PLAY) || $A7 || $2386 || None || None || Run all scheduled sprite animations to completion. | ||
BugVM execution will halt until all sprites have | BugVM execution will halt until all sprite animations queued on all sprites have completed. | ||
|- id='op_2877' | |- id='op_2877' | ||
| SPRHIDE <br> (SPRite HIDE) || $CF || $2877 || None || slot (TOP) -> (TOP) || Deactivate sprite in ''slot''. | | SPRHIDE <br> (SPRite HIDE) || $CF || $2877 || None || slot (TOP) -> (TOP) || Deactivate sprite in ''slot''. | ||
|- id='op_289C' | |- id='op_289C' | ||
| SPRWIPE <br> (SPRite WIPE) || $8E || $289C || None || None || Deactivate all sprites and clear them from the screen. | | SPRWIPE <br> (SPRite WIPE) || $8E || $289C || None || None || Deactivate all sprites and clear them from the screen. | ||
|} | |} | ||
Line 519: | Line 452: | ||
Like PRNAME, this opcode prints the name section of a datablock. However, it prints data stored in the Nickname datablock area, $CC30, which is an offset into the W_NameInput_NicknameDataBlock area. The name "nickname data block area" is assumed; it is not currently known what semantic purpose this area serves other than use by the naming screens. | Like PRNAME, this opcode prints the name section of a datablock. However, it prints data stored in the Nickname datablock area, $CC30, which is an offset into the W_NameInput_NicknameDataBlock area. The name "nickname data block area" is assumed; it is not currently known what semantic purpose this area serves other than use by the naming screens. | ||
|} | |} |