esop

Essential Stack-Operated Phone (concept)
git clone git://git.luxferre.top/esop.git
Log | Files | Refs | README | LICENSE

commit 79b3693cfb6ef3c611ccb830c67e517cda5acd02
parent c0e7afd79d3804874499f822acae7b6d2ffcfe6d
Author: Luxferre <3335173-suborg@users.noreply.gitlab.com>
Date:   Fri, 29 Jul 2022 07:20:42 +0300

Clarified screen spec and fixed a syscall

Diffstat:
MREADME.md | 14+++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md @@ -51,13 +51,17 @@ Implementation note: direct writing to or reading from the control block memory ## Screen output -All the 4032 pixels of 84x48 screen are allocated in the 504-byte video memory of ESOP (`#fe00-#fff7`) in the left-to-right, top-to-bottom, high-to-low order. To output a pixel at the given coordinates using memory manipulation routines, the app must calculate the appropriate byte position itself. This process is made easier by reusing I/O port `02-03` with the `DEO2` instruction where you can directly pass X and Y coordinates of the pixel. +All the 4032 pixels of 84x48 screen are allocated in the 504-byte video memory of ESOP (`#fe00-#fff7`) in the left-to-right, top-to-bottom, high-to-low order. To output a pixel at the given coordinates using memory manipulation opcodes, the app must calculate the appropriate byte position itself and then set the corresponding bit within that byte. This process is made easier by reusing I/O port `02-03` with the `DEO2` instruction where you can directly pass X and Y coordinates of the pixel to light it up. -The actual screen contents get updated 60 times per second according to the video memory. Before this process, the frame vector is run, if set in the corresponding control port (`00-01`). All graphics operations must be performed within this frame vector. +Every frame (60 times per second), the following actions must be performed in the particular order: -Due to shared nature of the I/O device port, the handler responsible for pixel output in the ESOP implementaion must preserve the input state between port write calls, i.e. save it before the processing and restore afterwards. +1. All 504 bytes in the video memory block are set to `#00`. +2. If the control port short `00-01` is not zero, the frame vector is run from that address. All graphics operations, be it direct video memory modification or the pixel draw calls, must be done within the frame vector. +3. The actual screen contents get updated according to the resulting video memory contents when the frame vector is finished. -Standard input/output ports are not supported. +Due to shared nature of the I/O device port, the handler responsible for pixel output in the ESOP implementation must preserve the input state between port write calls, i.e. save it before the processing and restore afterwards. + +Standard input/output ports of Varvara are not supported in ESOP. ## Keypad input @@ -141,7 +145,7 @@ ID |Params |Command|Meaning `06` |1s [addr] |`46` |Read the current system time/date information (5 bytes/40 bits, Unix time) into the address `07` |1s [addr] |`47` |Set the current system time/date information (5 bytes/40 bits, Unix time) from the address `08-1d`| | |(reserved) -`1e` |1b 3b [flag addr]|`8e` |Load and run another Uxn/ESOP application from flash address according to the flags +`1e` |1b 3b [flag addr]|`9e` |Load and run another Uxn/ESOP application from flash address according to the flags `1f` |None |`1f` |Halt (required) ## Credits