mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-07-18 01:47:33 +02:00
This change adds a new HWCALC model, HWCALC_FXCG_MANAGER, which identifies Casio's official fx-CG Manager software. Both the Prizm and, to my surprise, the fx-CG Manager use the old RAM address of 88000000 (P1) and a8000000 (P2) instead of the new fx-CG 50 address of 8c000000 (P1) and ac000000 (P2). The VRAM is hence adjusted at startup to move hardcoded pointers into the proper space. Added to the kernel moving the VBR space dynamically on the Prizm, this allows gint to be fully compatible with these platforms. The fx-CG Manager is detected by its product ID made of 0xff. Also adds a proper interface to the R61524 driver, even though it's not any more complete than previously, and fixes an oversight where the HWURAM entry of the kernel data array was no longer computed since the TLB management change. As of now, the fx-CG Manager still has a bug regarding return-to-menu since returning from the main menu doesn't work very well and often loops. This has been seen occasionally on some Graph 90+E so it's unlikely to be a platform-specific problem.
46 lines
1.5 KiB
C
46 lines
1.5 KiB
C
//---
|
|
// gint:drivers:r61524 - Reneses R61524 driver
|
|
//
|
|
// This driver is used to control the 16-bit color LCD of the Prizm and
|
|
// fx-CG 50 series.
|
|
//---
|
|
|
|
#ifndef GINT_DRIVERS_R61524
|
|
#define GINT_DRIVERS_R61524
|
|
|
|
#include <gint/defs/types.h>
|
|
|
|
enum {
|
|
/* Send data through the DMA, return early (triple-buffering) */
|
|
R61524_DMA,
|
|
/* Send data through DMA, wait to return (no interrupts) */
|
|
R61524_DMA_WAIT,
|
|
/* Send data through CPU (slow!) */
|
|
R61524_CPU,
|
|
};
|
|
|
|
/* r61524_display(): Send an image to the display
|
|
|
|
This function sends [height] lines of the provided [vram] starting from line
|
|
[start] and going down 396 pixels each line. Three methods are avaiable, the
|
|
default is to use R61524_DMA which is what you almost always want.
|
|
|
|
@vram Source VRAM with a stride of 396*2 bytes
|
|
@start First line to send
|
|
@height Number of lines to send
|
|
@method Transfer method, see above */
|
|
void r61524_display(uint16_t *vram, int start, int height, int method);
|
|
|
|
/* r162524_win_get() and r61524_win_set(): Manipulate the display window
|
|
|
|
These functions change the screen rectangle where data is shown. Normally
|
|
gint uses the full screen of 396x224. The system uses a subrectangle of
|
|
384x216.
|
|
|
|
These functions don't integrate nicely with gint's drawing API, so if you
|
|
want to use them make sure you know how <gint/display.h> is going to be
|
|
impacted. */
|
|
void r61524_win_get(uint16_t *HSA, uint16_t *HEA, uint16_t *VSA,uint16_t *VEA);
|
|
void r61524_win_set(uint16_t HSA, uint16_t HEA, uint16_t VSA, uint16_t VEA);
|
|
|
|
#endif /* GINT_DRIVERS_R61524 */
|