Skip to content

Commit

Permalink
Release 0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Xalior committed Apr 25, 2023
1 parent b33faf9 commit b015269
Show file tree
Hide file tree
Showing 10 changed files with 160 additions and 117 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@

[![PLOTIT Launch Video](http://img.youtube.com/vi/wpi9r7q6J8k/0.jpg)](http://www.youtube.com/watch?v=wpi9r7q6J8k "PLOTIT Launch Video")

* Please report crashing bugs WITH steps to reproduce.

* Please report crashing bugs WITH steps to reproduce [here](https://github.com/StalePixels/PLOTIT/issues)

## Latest Version
### v0.8.A - That was a mistake (CURRENT ALPHA)
### v0.8.0 - That *was* a mistake
* Undo Tool
* Palette Editor
* Magnify Preview
* Settings for Magnify, Line, Box and Circle
* Undo stack
* Public Plugin API
## Previous Versions

### v0.7.9 - Grew a little bit (CURRENT BETA)
### v0.7.9 - Grew a little bit
* Tooltips and rewritten HUD, now fully Core v3 Compatible.

## Previous Versions
### v0.7.1 - Minimum Lovable Product
* Keyboard Input - Mouse now optional, but still the optimum control method

Expand Down
14 changes: 7 additions & 7 deletions dev/plugins/docs/api.md → dev/plugins/docs/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ PLOTIT API
-

PUBLIC MEMORY MAP
--
Data in this area is intended to be "used" by your plugin.
The definition of what that use is is your choice. Remember to restore it if you change it is all!
-

See the files plotit.asm and plotit_api.h in the "incs" folder for more how
this memory is laid out, but the data in this area is intended to be "used" by
your plugin. The definition of what that use is your choice. Remember to
restore it if you change it is all!


ENTRYPOINT TYPE BITMASKS
Expand All @@ -16,7 +19,7 @@ ENTRYPOINT TYPE BITMASKS
| | Plugin will execute as soon as selected (CapsJ in current dev-build)
| - |
| 2 | Execute on Mouse Click
| | Menu will close immediately but plug in not execute until the next mouseclick
| | Menu will close immediately but plug will execute on next mouseclick
| - |
| 3 | *reserved*
| - |
Expand Down Expand Up @@ -50,6 +53,3 @@ ENTRYPOINT TYPE BITMASKS
| 7 | *reserved*
| - |
| 8 | *reserved*

ENTRYPOINT TYPE BITMASKS
--
2 changes: 1 addition & 1 deletion dev/plugins/example/invertScreen.asm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ LoopInner: ld a,(hl) ; load the pixel into the accumulator
pop bc ; and as to serve as a boilerplate new plugin authors
pop de ; can use and built upon
pop hl ;
exx ; Andand, just like above, all the registers... :)
exx ; Andand, just like above, include the shadow registers.
pop iy ;
pop ix ;
pop af ;
Expand Down
10 changes: 9 additions & 1 deletion dev/plugins/incs/plotit.asm
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,16 @@ defc _pluginEntryPoint = 0x6A73 ; uInt 8
PUBLIC _scratchUser;
defc _scratchUser = 0x6A74 ; uInt 8

PUBLIC _dst_sfn;
defc _dst_sfn = 0x6A75 ; char[13] (null terminated)

; 0x6A75 next...
PUBLIC _palette_flags;
defc _palette_flags = 0x6A83 ; bitfield
; Bit: 0 1 2 3 4 5 6 7
; |
; Modified: +

; 0x6A84 - 0x61FF blank

PUBLIC _paletteMemory;
defc _paletteMemory = 0x6B00
Expand Down
189 changes: 104 additions & 85 deletions dev/plugins/incs/plotit_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,86 +3,6 @@
//


/*
* NOTE 0
* The public memory map is yours to do with as you see fit,
* but not without consequences. It is best to consider all of
* it essential for the correct operation of PLOTIT, _outside_
* of your plugin, and thus - anything you change, you should put
* back when done.
*
* You can page the public memory space in and out as you see fit,
* and plugins are executed with interrupts disabled for this reason
* although PLOTIT expects BANK5 (the public memory) back in the
* default location when you return control to the main app.
*
* There are also certain areas of the public memory map that are
* used to pass either parameters to your plugin, or for hardware
* support, and those are listed below.
*
* NOTE 1
* The ULA screen is used exclusively by PLOTIT for tool previews.
* Default paper is non-bright blue, and using this will make the ULA
* appear transparent, allowing you to do similar FX for your plugin.
*
* NOTE 2
* PLOTIT doesn't use the system variables for itself, except when
* the file browser is opened - buy they are preserved intact so that
* your plugin has the same OS options available to it (outwith channels)
*
* NOTE 3
* The tile definitions will be placed at address 0x5c00.
* However the ROM source font only defines characters 32 - 127
* which is the printable part of the ascii set so we will
* only be using those tile definitions stored in addresses
* 0x5d00 to 0x5fff --Allen
*
* You can replace the tile "entities" from 0 to 31 with your own when creating
* custom UIs, but you should to replace the sysvars when done rendering.
*
* NOTE 4
* The Video memory is broadly split into (public) sections
* 1) visible_screen_MMU - this is where you can draw, drawing to this is
* drawing to the user's canvas.
* 2) backing_store_MMU - Backikng store used during creation of custom user
* interfaces - when configured plugins will be launched with a copy of
* the canvas already in this memory, making changes to visible_screen_MMU
* non distructive. Upon exiting the UI of your plugin this memory is
* restored over visible_screen_MMU. You should not draw to backing_store_MMU
* directly without understanding the consequences.
* 3) scratch_screen_MMU - 48k of usable as an SD load cache, or area of creating
* custom effects, blit space, etc. Also can be used as extra scratch data
* for your plugin, if required. Cannot be relied up to be in the same state
* as left between plugin executions. You can write to this as required, there
* is no need to back up data before changing it.
* The structures of memory in this area is as follows:
* Byte 00: reserved
* Byte 01: reserved
* Byte 02: MMU Bank number, top 16k
* Byte 03: MMU Bank number, middle 16k
* Byte 04: MMU Bank number, bottom 16k
* Byte 05: MMU Bank number, calling bank when using zxnext_layer2 api (deprecated - do not use)
*
* NOTE 5
* undo_screen_MMU is the state of the previous undo step - this permits you to perform related effects between
* an image, and the previous state, in a plugin if required. Etiquette says "don't edit this" in case the user
* ever wants to actually "undo" to it, it's part of the live "undo stack" memory.
*
* NOTE 6
* The builtin tools use two kinds of shared memory
* 1) Tool Registers - 8 total, 16bit unsigned integers to allow tools to pass data outside of their own bank
* to your plugin
* 2) Tool Memory - 16 total, 16bit unsigned integers used to allow tools to pass persistent memory (e.g.
* last used brush) settings outside their bank/change tool defaults at startup. (currently only 9/16 of
* the memory locations are used)
*
* NOTE 7
* The mouse is stored in a number of "precompued" forms, since it's used in many places like this - it
* speeds up the app to cache the sums - here are the versions found here:
* mouseX, mouseY uInt16 raw coorddinate data
* canvasX, canvasY uInt8 data precalcuated to fit within 48K L2 bounds
*/

#include <stdint.h>
#include <stdbool.h>
#include "zxnext_layer2.h"
Expand Down Expand Up @@ -164,13 +84,15 @@
#define TOOL_STAMP 0x08
#define TOOL_NOTREADY 0x09

#define PALETTE_FLAG_MODIFIED 0x01

//#define DEFAULT_DEBOUNCE_MS 400
#define DEFAULT_DEBOUNCE_FRAMES 10

#define DEFAULT_UNDO_LEVELS 6

///////////////////////////////
// PUBLIC MEMORY MAP (NOTE 0)
// PUBLIC MEMORY MAP (See NOTE 0)
///////////////////////////////
/*
* 0x4000 ULA Display File
Expand Down Expand Up @@ -203,11 +125,16 @@
* 0x6A72 _pluginActiveID
* 0x6A73 _pluginEntryPoint
* 0x6A74 _scratchUser;
* 0x6175 _dst_sfn;
* 0x6183 _palette_flags; NOTE 8:
*
* 0x6B00 _paletteMemory
* 0x6D00 _buf_256
* 0x6E00
*
*/

// Mostly here as a conceptual hack
// Mostly here as a conceptual hack / example on how memory addressing works
extern uint8_t __ula_display[32][192];
extern uint8_t __ula_attributes[32][24];

Expand Down Expand Up @@ -240,6 +167,8 @@ extern int16_t toolRegisters[8];

// And what the current tool is
extern uint8_t activeTool;
// Flag for special handling if action was via menu
extern uint8_t activatedFromMenu;

// User Input - Mouse
extern uint8_t mouseBtns;
Expand Down Expand Up @@ -281,9 +210,9 @@ extern uint8_t pluginEntryPoint;
// -- backing the scratch memory up to SD isn't forced, but if you don't, make sure you change the scratchUser ID on exit
// so other plugins can tell you've changed it.
// You should leave your own pluginActiveID in this memory location _if_ you have left data here after your plugin
// has finished running -- but be warned, this it's an honour system. This is probably best used for
// "start up code" or loading extra assets/binaries into, you can save repeated startup time if the 'cache' is "yours".
// And not important/irreplacable state data.
// has finished running -- but be warned, this it's an honour system - bad plugins may never update this upon execution.
// This is probably best used for "start up code" or loading extra assets/binaries into, you can save repeated startup
// time if the 'cache' is "yours" and not important/irreplacable state data.
extern uint8_t scratchUser;

// The currently active pallete as last uploaded into the L2 hardware - here for easy reference, do not edit
Expand All @@ -292,6 +221,96 @@ extern uint16_t paletteMemory[256];
// Simple 0.25K buffer, used for file ops, UI & stamp management - you can use it for your plugin, if desired
extern uint8_t buf_256[256];

// Short file name for the currently active/open document
extern unsigned char dst_sfn[13];

// Palette flags - metadata about current palette state, see NOTE 8
extern unsigned char palette_flags;


/*
* NOTE 0
* The public memory map is yours to do with as you see fit,
* but not without consequences. It is best to consider all of
* it essential for the correct operation of PLOTIT, _outside_
* of your plugin, and thus - anything you change, you should put
* back when done.
*
* You can page the public memory space in and out as you see fit,
* and plugins are executed with interrupts disabled for this reason
* although PLOTIT expects BANK5 (the public memory) back in the
* default location when you return control to the main app.
*
* There are also certain areas of the public memory map that are
* used to pass either parameters to your plugin, or for hardware
* support, and those are listed below.
*
* NOTE 1
* The ULA screen is used exclusively by PLOTIT for tool previews.
* Default paper is non-bright blue, and using this will make the ULA
* appear transparent, allowing you to do similar FX for your plugin.
*
* NOTE 2
* PLOTIT doesn't use the system variables for itself, except when
* the file browser is opened - buy they are preserved intact so that
* your plugin has the same OS options available to it (outwith channels)
*
* NOTE 3
* The tile definitions will be placed at address 0x5c00.
* However the ROM source font only defines characters 32 - 127
* which is the printable part of the ascii set so we will
* only be using those tile definitions stored in addresses
* 0x5d00 to 0x5fff --Allen
*
* You can replace the tile "entities" from 0 to 31 with your own when creating
* custom UIs, but you should to replace the sysvars when done rendering.
*
* NOTE 4
* The Video memory is broadly split into (public) sections
* 1) visible_screen_MMU - this is where you can draw, drawing to this is
* drawing to the user's canvas.
* 2) backing_store_MMU - Backing store used during creation of custom user
* interfaces - when configured plugins will be launched with a copy of
* the canvas already in this memory, making changes to visible_screen_MMU
* non-destructive. Upon exiting the UI of your plugin this memory is
* restored over visible_screen_MMU. You should not draw to backing_store_MMU
* directly without understanding the consequences.
* 3) scratch_screen_MMU - 48k "blank", use as an SD load cache, or area of creating
* custom effects, blit space, etc. Also can be used as extra scratch data
* for your plugin, if required. Cannot be relied on up to be in the same state
* as left between plugin executions. You can write to this as required, there
* is no need to back up data before changing it.
* The structures of memory in this area is as follows:
* Byte 00: reserved
* Byte 01: reserved
* Byte 02: MMU Bank number, top 16k
* Byte 03: MMU Bank number, middle 16k
* Byte 04: MMU Bank number, bottom 16k
* Byte 05: MMU Bank number, calling bank when using zxnext_layer2 api (deprecated - do not use)
*
* NOTE 5
* undo_screen_MMU is the state of the previous undo step - this permits you to perform related effects between
* an image, and the previous state, in a plugin if required. Etiquette says "don't edit this" in case the user
* ever wants to actually "undo" to it, it's part of the live "undo stack" memory.
*
* NOTE 6
* The builtin tools use two kinds of shared memory
* 1) Tool Registers - 8 total, 16bit unsigned integers to allow tools to pass data outside of their own bank
* to your plugin
* 2) Tool Memory - 16 total, 16bit unsigned integers used to allow tools to pass persistent memory (e.g.
* last used brush) settings outside their bank/change tool defaults at startup. (currently only 9/16 of
* the memory locations are used)
*
* NOTE 7
* The mouse is stored in a number of "precomputed" forms, since it's used in many places like this - it
* speeds up the app to cache the sums - here are the versions found here:
* mouseX, mouseY uInt16 raw coorddinate data
* canvasX, canvasY uInt8 data precalcuated to fit within 48K L2 bounds
*
* NOTE 8
* The Palette Flags memory is a bit-field packed series of flags, currently implemented ones are
* Bit 0: Is palette "modified" from hardware default?
*
*/

#endif //PLOTIT_API_H
2 changes: 1 addition & 1 deletion dev/plugins/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# 6
# 7
# 8
# See dev/docs/api.md for more details
# See dev/docs/api.txt for more details

## A Shell script to turn a .BIN file into a .PLP file
#
Expand Down
35 changes: 29 additions & 6 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,53 @@
# ChangeLog

## v0.8.A - That *was* a mistake
PLOTIT is a full-featured image editor, developed across multiple years.

## Controls
PLOTIT is designed to be controlled by a mouse, it also has keyboard shortcuts
which may help speed up some workflows or certain kinds of detail work.

| **Key** | **Use**
|-------------|----
| q | Move mousepointer up one pixel
| a | Move mousepointer down one pixel
| o | Move mousepointer left one pixel
| p | Move mousepointer right one pixel
| CapsShift+Q | Move mousepointer up eight pixels
| CapsShift+A | Move mousepointer down eight pixel
| CapsShift+O | Move mousepointer left eight pixel
| CapsShift+P | Move mousepointer right eight pixel
| n | Left Mouse Button (Primary Action)
| m | Right Mouse Button (Secondary Action)

The keyboard controls are intended as a suppliment to the mouse, and never as
a total replacement for the mouse - therefore there's likely many features and
functions that you can only do with the mouse.

## v0.8.0 - That *was* a mistake
### New Features
* Undo
* Rewrote Pens and Pencil tools
* Entirely new Menu/HUD complete
* Entirely new Menu/HUD complete
* Palette Editor

* Preview when zoomed in
* Beta Plugin API
### Bug Fixes ###
* Fixed several UI rendering issues with stamps and sidebar
* Better handling when switching from config mode to editor modes

## v0.7.9 - Growing just a little bit
### New Features
* No more Canvas Scrolling
* Tooltips in lower status bar

### Bug Fixes ###
* Rewrote mouse driver


## v0.7.1 - Minimum Lovable Product
### New Features ###
* Keyboard Input - Mouse now optional, but still the optimum control method. Keyboard input allows precise pixel-perfect positioning of your PLOTIT pointer, ideal when used in combination with the mouse.
### Bug Fixes ###
* Speed ups and Overflow fixes on Fill tool

## v0.7.0 - Minimum Lovable Product
### New Features ###
* Stand Alone .nex - only the demos used in the "Rogue's Gallery" external to the main app
Expand Down
Loading

0 comments on commit b015269

Please sign in to comment.