Compare commits

..

No commits in common. "a4d23ef7adc37a83d315a041e081337118e06e6b" and "d887423bbb989bec2d84770ee2e640bcecfef567" have entirely different histories.

20 changed files with 44 additions and 48 deletions

5
TODO
View File

@ -1,3 +1,8 @@
For the 2.1.0 release:
* bopti: remove the deprecated image_t definition
* project: remove the compat branch
* project: remove the gray aliases
Extensions on existing code:
* tmu: make interrupt handlers more elegant
* bopti: try to display fullscreen images with TLB access + DMA on fxcg50

View File

@ -83,6 +83,10 @@ typedef struct
} GPACKED(4) bopti_image_t;
/* Old alias to image_t, now deprecated because of libimg */
typedef bopti_image_t image_t __attribute__((deprecated(
"image_t has been renamed to bopti_image_t")));
#endif /* FX9860G */
#endif /* GINT_DISPLAY_FX */

View File

@ -144,4 +144,34 @@ void dgray_getdelays(uint32_t *light, uint32_t *dark);
These pointers can be used for custom rendering functions. */
void dgray_getvram(uint32_t **light, uint32_t **dark);
//---
// Aliases for older programs
//---
/* Functions for the gray engine used to be called g*() to mirror the d*()
functions of the display module. They are now bundled together, so these
aliases are for older programs that still use the g*() naming scheme */
#ifdef GINT_GRAY_ALIASES
#define gclear dclear
#define grect drect
#define gpixel dpixel
#define gline dline
#define ghline dhline
#define gvline dvline
#define gimage dimage
#define gsubimage dsubimage
#define gtext dtext
#define gtext_opt dtext_opt
#define gprint dprint
#define gprint_opt dprint_opt
#define gupdate dupdate
#define gray_delays dgray_setdelays
#define gray_config dgray_getdelays
#define gvram dgray_getvram
#endif /* GINT_GRAY_ALIASES */
#endif /* GINT_GRAY */

View File

@ -24,7 +24,7 @@ _memcpy_align_dst:
/* If source is 4-aligned, use mov.l */
tst r2, r5
bt/s .aligned4_32
bt/s .aligned4
mov #4, r2
/* If unaligned but SH4, use movua.l */
@ -42,40 +42,13 @@ _memcpy_align_dst:
bra _naive_memcpy
nop
.aligned4_32:
mov #36, r2
/* Copy 32 bytes at a time until at most 32 bytes are left */
mov.l @r5+, r0
mov.l @r5+, r1
mov.l @r5+, r7
mov.l r0, @r4
mov.l r1, @(4,r4)
mov.l r7, @(8,r4)
mov.l @r5+, r0
mov.l @r5+, r1
mov.l @r5+, r7
mov.l r0, @(12,r4)
mov.l r1, @(16,r4)
mov.l r7, @(20,r4)
mov.l @r5+, r0
mov.l @r5+, r1
add #-32, r6
mov.l r0, @(24,r4)
mov.l r1, @(28,r4)
cmp/ge r6, r2
bf/s .aligned4_32
add #32, r4
.aligned4_4:
mov #4, r2
.aligned4:
/* Copy 4 bytes at a time until at most 4 bytes are left */
mov.l @r5+, r0
mov.l r0, @r4
add #-4, r6
cmp/ge r6, r2
bf/s .aligned4_4
bf/s .aligned4
add #4, r4
bra _naive_memcpy

View File

@ -31,28 +31,12 @@ _memset_align:
bf/s _memset_align
dt r6
mov #40, r2
.aligned4_32:
add #-32, r4
add #-32, r6
mov.l r0, @(28,r4)
mov.l r0, @(24,r4)
mov.l r0, @(20,r4)
mov.l r0, @(16,r4)
mov.l r0, @(12,r4)
mov.l r0, @(8,r4)
mov.l r0, @(4,r4)
cmp/ge r6, r2
bf/s .aligned4_32
mov.l r0, @r4
mov #8, r2
.aligned4_4:
.aligned4:
mov.l r0, @-r4
cmp/ge r6, r2
bf/s .aligned4_4
bf/s .aligned4
add #-4, r6
_naive_memset: