- Define a draft of the video interface
- Implement that dragt for CG for a single mode
* Includes stub of brightness setting from disassembling 3.60
- Use the video interface to show visual feedback on GDB on CG
Using the video interface avoids directly linking into a driver, which
will serve modularity in gint 3.
The user can still gdb_start() + gdb_main(NULL) manually, which allows
e.g. early setup of breakpoints. The start_on_except mechanism is the
lazier method where we just run the add-in normally and start fxsdk gdb
on the PC *after* a crash occurs.
It is guaranteed by the driver model that drivers are powered on when
gint is active. Sharing the driver isn't too useful because we can't
remote debug in the OS world anyway, there's no USB driver there.
Not changing much for now, just distilling them into hardware/OS/render
macros. Later on the rendering stuff will become more dynamic and down
the line I want to unify the APIs more.
Nothing interesting in this commit, just moving files around, making
sure every target compiles every file, and controlling with macros
instead.
Basic support for fxg3a target in CMakeLists.txt, cmake/FindGint.cmake,
giteapc.make and include/gint/config.h.in. The rest is forgettable.
This is the first of many steps designed to reduce gint's reliance on
the FX9860G and FXCG50 macros by describing the compile target more
symbolically. The goal is to allow both for g3a compilation of fx-API
code and for a potential CP port.
* Honor dwindow settings immediately (avoids useless dline() calls)
* Bound to ymin/ymax instead of doing many useless cut computations
* Remove the need for floating-point operations and division
It used to be a flexible array member because in the old days fxconv
could only output a fixed set of bytes, so any referencing was out the
question. Nowadays fxconv can output pretty much anything. Separating
the data pointer will be useful for PythonExtra to expose it as a Python
bytes() or bytearray() object while using the gint API.
Instead of using GetKeyWait(), we directly call into an internal OS
function, which avoids the need to press a key before we can redraw over
the OS banner and VRAM when coming back. The disassembly to locate the
function was developed by Dr-Carlos.
We still have to redraw when coming back; getkey() will do it by
dupdate() by default, and it that's not a possibility for the
application an option to receive a special event and handle it manually
is provided.
This workaround using a gint_call_t with an odd address is not realy the
cleanest idea but it helps keep the existing intc_generic_handler in
the 32 bytes size limit of the VBR space.
This looks like it could work in the long term. The only issue that
really hasn't been addressed is how to use packet counters to cut
transactions when there's no ZLP, but we can leave that for later.
* Clear pipes and FIFOs during world switches to avoid interference
with the OS. LINK uses pipes 3 and 4, and attempts to add a second
pipe to the fxlink interface (thus using pipe 4) would interfere with
LINK and somehow prevent the pipe from being used (Wireshark captures
showed no responses on that pipe). Forcing a blank state is a valid
move because that state occurs naturally after a RESET, thus LINK and
other add-ins must support it as well.
* Delay the application of configuration to the USB configuration stage
(specifically, the DVST configured interrupt, even though technically
we should do that in SET_CONFIGURATION 0). This is because we
previously relied on world switches preserving pipe settings (by not
changing them) to reconnect the gint driver after a world switch.
This is no longer possible as the world switch now clears the pipes.
The new timing makes the driver automatically re-configure as the
connection restarts.
* Move logic around tracking transfers to asyncio.c.
* Add a "short buffer" holding 0-3 bytes between writes, so that the
driver performs only 4-byte writes in the FIFO and a short write in
the commit, if needed.
- This is partially due to me thinking at some point that degrading
writing size was impossible, but it might actually be possible by
writing to FIFO/FIFO+2 or FIFO/FIFO+1/FIFO+2/FIFO+3.
- In any case I think this new approach wins on performance.
* Get rid of unit_size since we now always use 4 bytes.
* Add a waiting function which is used in usb_close() (and once tested
should be used in world switches too).
* Eliminate some of the special cases for the DCP, though not all (in
particular I can't get the commit to rely on the BEMP interrupt yet,
nor can I properly clear PID to NAK when unbinding).
* Finish updating the register list
* Use RTC-based timeouts to not involve more interrupts
* Be a lot more conservative about PID=BUF
* Start setting up parameters and checking invariants for future
bidirectional communications