mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
amips asm tile renderer
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@286 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
c5b61ac25d
commit
8ef001cc89
4 changed files with 1688 additions and 18 deletions
|
@ -66,6 +66,10 @@ void blockcpy_or(void *dst, void *src, size_t n, int pat)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _ASM_DRAW_C_MIPS
|
||||||
|
int TileNorm(int sx,int addr,int pal);
|
||||||
|
int TileFlip(int sx,int addr,int pal);
|
||||||
|
#else
|
||||||
static int TileNorm(int sx,int addr,int pal)
|
static int TileNorm(int sx,int addr,int pal)
|
||||||
{
|
{
|
||||||
unsigned char *pd = HighCol+sx;
|
unsigned char *pd = HighCol+sx;
|
||||||
|
@ -108,7 +112,7 @@ static int TileFlip(int sx,int addr,int pal)
|
||||||
}
|
}
|
||||||
return 1; // Tile blank
|
return 1; // Tile blank
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// tile renderers for hacky operator sprite support
|
// tile renderers for hacky operator sprite support
|
||||||
#define sh_pix(x) \
|
#define sh_pix(x) \
|
||||||
|
|
1666
Pico/Draw_amips.s
1666
Pico/Draw_amips.s
File diff suppressed because it is too large
Load diff
|
@ -10,7 +10,7 @@ amalgamate = 0
|
||||||
#up = 1
|
#up = 1
|
||||||
|
|
||||||
|
|
||||||
CFLAGS += -I../.. -I. -D_UNZIP_SUPPORT -DNO_SYNC # -DBENCHMARK
|
CFLAGS += -I../.. -I. -D_UNZIP_SUPPORT -DNO_SYNC -D_ASM_DRAW_C_MIPS # -DBENCHMARK
|
||||||
CFLAGS += -Wall -Winline -G0
|
CFLAGS += -Wall -Winline -G0
|
||||||
ifeq ($(DEBUG),)
|
ifeq ($(DEBUG),)
|
||||||
CFLAGS += -O2 -ftracer -fstrength-reduce -ffast-math
|
CFLAGS += -O2 -ftracer -fstrength-reduce -ffast-math
|
||||||
|
|
32
tools/mkt1.c
32
tools/mkt1.c
|
@ -20,7 +20,7 @@ static void out(int r, int is_last)
|
||||||
|
|
||||||
unsigned char pattern_db[0x100];
|
unsigned char pattern_db[0x100];
|
||||||
|
|
||||||
static int check(unsigned char i)
|
static int check_label(unsigned char i)
|
||||||
{
|
{
|
||||||
if (!pattern_db[i]) {
|
if (!pattern_db[i]) {
|
||||||
fprintf(fo, "tile%i%i%i%i%i%i%i%i:\n", (i&0x80)?1:0, (i&0x40)?1:0, (i&0x20)?1:0, (i&0x10)?1:0,
|
fprintf(fo, "tile%i%i%i%i%i%i%i%i:\n", (i&0x80)?1:0, (i&0x40)?1:0, (i&0x20)?1:0, (i&0x10)?1:0,
|
||||||
|
@ -44,22 +44,22 @@ int main()
|
||||||
|
|
||||||
for (i = 0xff; i > 0; i--)
|
for (i = 0xff; i > 0; i--)
|
||||||
{
|
{
|
||||||
if (check(i)) continue;
|
if (check_label(i)) continue;
|
||||||
|
|
||||||
if (i & 0x01) out(0, 0);
|
if (i & 0x01) out(0, !(i&0xfe));
|
||||||
check(i&0xfe);
|
check_label(i&0xfe);
|
||||||
if (i & 0x02) out(1, 0);
|
if (i & 0x02) out(1, !(i&0xfc));
|
||||||
check(i&0xfc);
|
check_label(i&0xfc);
|
||||||
if (i & 0x04) out(2, 0);
|
if (i & 0x04) out(2, !(i&0xf8));
|
||||||
check(i&0xf8);
|
check_label(i&0xf8);
|
||||||
if (i & 0x08) out(3, 0);
|
if (i & 0x08) out(3, !(i&0xf0));
|
||||||
check(i&0xf0);
|
check_label(i&0xf0);
|
||||||
if (i & 0x10) out(4, 0);
|
if (i & 0x10) out(4, !(i&0xe0));
|
||||||
check(i&0xe0);
|
check_label(i&0xe0);
|
||||||
if (i & 0x20) out(5, 0);
|
if (i & 0x20) out(5, !(i&0xc0));
|
||||||
check(i&0xc0);
|
check_label(i&0xc0);
|
||||||
if (i & 0x40) out(6, 0);
|
if (i & 0x40) out(6, !(i&0x80));
|
||||||
check(i&0x80);
|
check_label(i&0x80);
|
||||||
if (i & 0x80) out(7, 1);
|
if (i & 0x80) out(7, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue