Commit graph

261 commits

Author SHA1 Message Date
lephe
ff2db385a8 TODO update and miscellaneous style 2019-07-16 18:34:10 -04:00
lephe
8dbdd32adb keyboard: finalize getkey() 2019-07-16 18:23:21 -04:00
lephe
31ade70c42 tmu: export definitions, clean stop, expose address
This commit introduces three timer driver changes:

* Export the definitions of the timer structures to a detailed header at
  <gint/mpu/tmu.h>, and re-use them in the driver.
  This integration is still limited as the driver keeps its own address
  definitions and event codes.

* Clean the timer stop routine that is used in the interrupt handler. Up
  until now the interrupt handler would only stop TSTR, which is not
  enough to cleanly leave the timer (need TCOR=TCNT=-1) and is not even
  sound with respect to gint's semantics as UNIE stays enabled so the
  timer is not made available again.

  The interrupt handler now calls into C code when the timer stop
  condition is met (callback returns non-zero) to keep this clean. This
  unsurprisingly solves problems that occurred in certain situations
  when a timer was used repeatedly.

* Expose timer addresses using a timer_address() function, compensating
  for the lack of address definitions in <gint/mpu/tmu.h>. This
  interface is likely to evolve in the future to better integrate the
  address in the MPU headers and move them out of the driver.
2019-07-16 15:39:38 -04:00
lephe
24fbeab55b core: provide MPU type on unknown platforms
This makes it possible to write application code without specifying the
target machine, which is especially useful for libraries. The first user
of this system is libprof.
2019-07-16 15:39:33 -04:00
lephe
d9c32b2b05 libc: split standard headers properly
Since Memallox's newlib port is currently unstable, gint has to
provide some standard functions on its own. Instead of a single
<gint/std.h> header, this commit makes a gint/std directory containing
headers under standard names.
2019-07-16 15:38:18 -04:00
lephe
3c7a8891d0 render: rename dimage_opt() into dsubimage() 2019-07-06 16:49:59 -04:00
lephe
eece35566e core: add BFile syscalls 2019-07-04 12:15:13 -04:00
lephe
3d362bb0bf defs: remove useless definitions 2019-07-04 12:15:00 -04:00
lephe
5a575a278f render: use shorter color names 2019-07-04 12:14:31 -04:00
lephe
3324d58afa core: add a hardware detection interface 2019-07-04 12:11:43 -04:00
lephe
f8d69dd56a display: add a dupdate_noint() for exceptions handlers 2019-07-04 11:46:26 -04:00
lephe
11b40b445c render-cg: 8x9 font and proportional font rendering 2019-06-23 17:27:44 -04:00
lephe
0055199359 render: refactor to share functions, and basic text on fxcg50 2019-06-15 01:05:31 -04:00
lephe
81baa4c26a bopti: expose bopti functions and implement dimage() and dimage_opt() 2019-05-04 21:00:40 +02:00
lephe
19cdae4953 core: expose the syscall header
Will be used in time for BFile.
2019-05-04 14:59:13 +02:00
lephe
05f2e01b50 bootlog: make a copy for use in gintctl 2019-05-04 12:07:14 +02:00
lephe
f3c8964b84 render-cg: decently implement basic functions 2019-05-03 17:11:43 +02:00
lephe
04231ea5d6 dma: add a new driver to support r61524
Also add a power interface (without driving code) and switch toolchain
because the previous sh4eb-nofpu-elf toolchain was not completely
FPU-free.
2019-03-10 15:45:34 +01:00
lephe
f33cb3cf80 core: better bootlog API and implementation
* Now uses topti instead of fxlib for text (including MMU failure)
* Fit .pretext into 4k for everything before MMU succeeds
* A short version of sprintf() for dynamic messages
* Support a driver function, status(), to allow early driver debug
* Expose more useful platform information in <gint/mpu.h>
* Expose the first of a few CASIOWIN syscalls
2019-03-06 14:32:51 +01:00
lephe
417340ce91 topti: implement background color and text size
Also transition the bootlog from fxlib to topti.
2019-02-22 15:08:51 +01:00
lephe
3f7c0a04ad way too much, including bopti/topti, timers, and more. 2019-02-21 21:00:26 +01:00
lephe
298338f633 More timers, RTC, basic overclock-resistant keyboard, CPG, PFC, driver levels. 2018-08-19 17:11:37 +02:00
lephe
2f0e049c33 More interrupt system, exceptions, timers. 2018-08-01 20:41:36 +02:00
lephe
3b90b40dd7 Hybrid build system and runtime (no interrupts). t6k11 driver. Basic r61524 driver. 2018-04-19 13:24:26 +02:00
lephe
c50cbf6a9c Make room for an fx-cg50 compatible version. Enhanced build system. 2018-04-09 08:31:12 +02:00
lephe
79b78b5345 Hopefully the last adjustments before the first release. 2017-07-11 13:51:56 +02:00
lephe
34e42a03a6 Small Makefile adjustments, preparing fusion with fxSDK 2017-07-08 17:22:42 +02:00
lephe
f6133c26fc Startup logs instead of diagnostics, created .gint_bss, updated demo. 2017-07-05 21:38:12 +02:00
lephe
5e66efc560 Interrupt controller module description (WIP), task switch and return to menu. 2017-07-01 16:07:14 +02:00
lephe
cd6bd5a1a4 Untested INTC module in /include/modules/interrupts.h 2017-04-30 18:24:35 +02:00
lephe
a0f06fadd7 Interrupt Controller module draft, bopti bugfix. 2017-04-22 21:59:39 +02:00
lephe
3214f6b797 Almost ended quality review, and fixed tales-related vram overflows. 2017-04-19 19:57:31 +02:00
lephe
6c0ae34708 Added a text_length() function. 2017-04-17 13:39:28 +02:00
lephe
b15d543e8d Just a hotfix for dimage()... fxSDK's a bit late... 2017-04-17 12:56:27 +02:00
lephe
57a7e1c2d4 More quality review, more registers saved at startup. 2017-04-13 21:59:13 +02:00
lephe
a6e312a39c Some quality review. Made keyboard time milliseconds. 2017-03-26 18:38:32 +02:00
lephe
31e2b453dd Redesigned timer module: got a possibly infinite amount of virtual timers. 2017-03-01 11:07:28 +01:00
lephe
7ab6170ca3 Key repeat events & Timer callbacks with arguments. Fixed sleep_us(). 2017-02-25 23:19:35 +01:00
lephe
d852bc3310 Huh... debug app for crashes & whole new interrupt system. Minor edits. 2017-02-25 19:02:07 +01:00
lephe
49df2a5fb4 Added a --extended-libc option and some headers to allow porting external programs. 2017-01-22 18:35:02 +01:00
lephe
93dca0ef6f Made INCOMPATIBLE changes to image rendering. Added inttypes.h and bakclight management in getkey(). 2017-01-20 21:11:00 +01:00
lephe
28f790bade Fixed some font formats. Minor changes in README, headers. 2017-01-01 17:41:16 +01:00
lephe
2564096a13 Added natural delay/frequency settings for timers. 2016-12-22 19:47:05 +01:00
lephe
e6e0989436 Solved backlight issues and added backlight control to the API. 2016-12-22 18:36:39 +01:00
lephe
28748a820c Fixed some Makefile dependencies. 2016-11-11 10:43:13 +01:00
lephe
eedec2b124 Added a configure script with some options, made Makefile output pretty. Set up an event system (used by keyboard). 2016-11-05 22:00:23 +01:00
lephe
98fdbbc333 Proper RTC callback system. Moved keyboard to RTC (saves a timer). Reduced use of 7705.h / 7305.h. 2016-09-04 11:35:41 +02:00
lephe
d80de5683b Added clock frequency computations/measurements, and frequency-delay/timer expression. 2016-08-29 11:29:07 +02:00
lephe
0205c39f21 Fixed area functions (rectangles completely outside the screen). 2016-08-14 19:57:58 +02:00
lephe
58db663ae6 Some time manipulation. Added the targets to the .gitignore file. 2016-08-08 15:01:33 +02:00
lephe
1f223f807f Added an RTC test (clock), image part drawing and a few standard functions (stdlib, time). 2016-08-02 07:51:44 +02:00
lephe
c63d7b812e Added bitmap part rendering and text colors, proper gray text. Enhanced demo app (wip). 2016-07-28 18:12:07 +02:00
lephe
b2151886bc Added formatted printing for stdio: handles everything except doubles and %m. 2016-07-25 22:38:47 +02:00
lephe
7f174043a5 Reported TLB issues. Moved internal headers files, added rtc module and alloca. 2016-07-25 09:04:22 +02:00
lephe
34dd27d7a3 Major bopti update (one of the last, I hope). Added comparison with ML as fifth application (hidden). 2016-07-14 21:10:51 +02:00
lephe
d122624c56 Re-structured files. Minor name changes. No code changed in this falsely huge commit. 2016-07-06 11:28:51 +02:00
lephe
ab17532f67 Major update for bopti (gray, light still not tested). Reworked out gray engine. 2016-07-04 18:30:25 +02:00
lephe
aa0f4b7285 First gray tests. Added text module, 'tales'. 2016-05-20 22:04:15 +02:00
lephe
e1a51dae21 Displayed keyboard state in test [1]. Implemented some API for user RTC interrupt management. 2016-05-05 22:33:15 +02:00
lephe
9725c2819a Moved the keyboard to timers. Minor changes in multigetkey() to avoid unwanted event repeats. Beginning of a test application. 2016-05-05 18:19:10 +02:00
lephe
0a7f22d4c1 Initial commit. Includes interrupt handler, drivers for keyboard and screen, and parts of the drawing library. 2016-05-05 11:49:05 +02:00