Skip to content

Commit

Permalink
First commit, 1.0 RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Aug 10, 2009
0 parents commit 3fd21ee
Show file tree
Hide file tree
Showing 30 changed files with 1,639 additions and 0 deletions.
Empty file added README.txt
Empty file.
Binary file added data/DSding.raw
Binary file not shown.
Binary file added data/DSkill.raw
Binary file not shown.
Binary file added data/DSload.raw
Binary file not shown.
Binary file added data/DSnew.raw
Binary file not shown.
3 changes: 3 additions & 0 deletions include/DSding_raw.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
extern const u8 DSding_raw_end[];
extern const u8 DSding_raw[];
extern const u32 DSding_raw_size;
3 changes: 3 additions & 0 deletions include/DSkill_raw.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
extern const u8 DSkill_raw_end[];
extern const u8 DSkill_raw[];
extern const u32 DSkill_raw_size;
3 changes: 3 additions & 0 deletions include/DSload_raw.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
extern const u8 DSload_raw_end[];
extern const u8 DSload_raw[];
extern const u32 DSload_raw_size;
3 changes: 3 additions & 0 deletions include/DSnew_raw.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
extern const u8 DSnew_raw_end[];
extern const u8 DSnew_raw[];
extern const u32 DSnew_raw_size;
28 changes: 28 additions & 0 deletions include/tileedit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

//{{BLOCK(tileedit)

//======================================================================
//
// tileedit, 216x8@4,
// + palette 16 entries, not compressed
// + 27 tiles not compressed
// Total size: 32 + 864 = 896
//
// Time-stamp: 2007-09-19, 10:12:11
// Exported by Cearn's GBA Image Transmogrifier
// ( http://www.coranac.com )
//
//======================================================================

#ifndef __TILEEDIT__
#define __TILEEDIT__

#define tileeditPalLen 32
extern const unsigned short tileeditPal[16];

#define tileeditTilesLen 864
extern const unsigned short tileeditTiles[432];

#endif // __TILEEDIT__

//}}BLOCK(tileedit)
2 changes: 2 additions & 0 deletions include/tonc_memfunc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
extern "C" void memcpy32(void *dst, const void *src, u32 wdcount);
extern "C" void memset32(void *dst, u32 src, u32 wdn);
32 changes: 32 additions & 0 deletions include/wireworldTS.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

//{{BLOCK(wireworldTS)

//======================================================================
//
// wireworldTS, 256x192@4,
// + palette 16 entries, not compressed
// + 109 tiles (t|f|p reduced) not compressed
// + regular map (flat), not compressed, 32x24
// Total size: 32 + 3488 + 1536 = 5056
//
// Time-stamp: 2008-05-02, 18:58:34
// Exported by Cearn's GBA Image Transmogrifier
// ( http://www.coranac.com )
//
//======================================================================

#ifndef __WIREWORLDTS__
#define __WIREWORLDTS__

#define wireworldTSPalLen 32
extern const unsigned int wireworldTSPal[8];

#define wireworldTSTilesLen 3488
extern const unsigned int wireworldTSTiles[872];

#define wireworldTSMapLen 1536
extern const unsigned int wireworldTSMap[384];

#endif // __WIREWORLDTS__

//}}BLOCK(wireworldTS)
32 changes: 32 additions & 0 deletions include/wireworld_controls.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

//{{BLOCK(wireworld_controls)

//======================================================================
//
// wireworld_controls, 256x192@4,
// + palette 16 entries, not compressed
// + 99 tiles (t|f|p reduced) not compressed
// + regular map (flat), not compressed, 32x24
// Total size: 32 + 3168 + 1536 = 4736
//
// Time-stamp: 2007-09-19, 18:14:40
// Exported by Cearn's GBA Image Transmogrifier
// ( http://www.coranac.com )
//
//======================================================================

#ifndef __WIREWORLD_CONTROLS__
#define __WIREWORLD_CONTROLS__

#define wireworld_controlsPalLen 32
extern const unsigned short wireworld_controlsPal[16];

#define wireworld_controlsTilesLen 3168
extern const unsigned short wireworld_controlsTiles[1584];

#define wireworld_controlsMapLen 1536
extern const unsigned short wireworld_controlsMap[768];

#endif // __WIREWORLD_CONTROLS__

//}}BLOCK(wireworld_controls)
Binary file added old/0.6.zip
Binary file not shown.
87 changes: 87 additions & 0 deletions source/tileedit.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@

//{{BLOCK(tileedit)

//======================================================================
//
// tileedit, 216x8@4,
// + palette 16 entries, not compressed
// + 27 tiles not compressed
// Total size: 32 + 864 = 896
//
// Time-stamp: 2007-09-19, 10:12:11
// Exported by Cearn's GBA Image Transmogrifier
// ( http://www.coranac.com )
//
//======================================================================

const unsigned short tileeditPal[16]=
{
0x0000,0x26C4,0x2108,0x7D4A,0x3DEF,0x5AD6,0x107D,0x001F,
0x233F,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,0x7FFF,
};

const unsigned short tileeditTiles[432]=
{
0x3333,0x0333,0x3333,0x0333,0x3333,0x0333,0x3333,0x0333,
0x3333,0x0333,0x3333,0x0333,0x3333,0x0333,0x0000,0x0000,
0x7777,0x0777,0x7777,0x0777,0x7777,0x0777,0x7777,0x0777,
0x7777,0x0777,0x7777,0x0777,0x7777,0x0777,0x0000,0x0000,
0x8888,0x0888,0x8888,0x0888,0x8888,0x0888,0x8888,0x0888,
0x8888,0x0888,0x8888,0x0888,0x8888,0x0888,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,

0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,0x2222,
0x2226,0x2422,0x2262,0x2422,0x2622,0x2422,0x6222,0x2422,
0x2222,0x2426,0x2222,0x2422,0x4444,0x2444,0x2222,0x2222,
0x3333,0x2433,0x3333,0x2433,0x3333,0x2433,0x3333,0x2433,
0x3333,0x2433,0x3333,0x2433,0x4444,0x2444,0x2222,0x2222,
0x0000,0x2400,0x0000,0x2400,0x0000,0x2400,0x0000,0x2400,
0x0000,0x2400,0x0000,0x2400,0x4444,0x2444,0x2222,0x2222,

0x7777,0x2477,0x7777,0x2477,0x7777,0x2477,0x7777,0x2477,
0x7777,0x2477,0x7777,0x2477,0x4444,0x2444,0x2222,0x2222,
0x8888,0x2488,0x8888,0x2488,0x8888,0x2488,0x8888,0x2488,
0x8888,0x2488,0x8888,0x2488,0x4444,0x2444,0x2222,0x2222,
0x2222,0x2222,0x4442,0x4444,0x2242,0x2222,0x2242,0x2222,
0x2242,0x2222,0x2242,0x2222,0x2242,0x2222,0x2242,0x2222,
0x2222,0x2222,0x4444,0x2444,0x2222,0x2411,0x2222,0x2411,
0x2222,0x2411,0x1222,0x2421,0x1222,0x2421,0x1122,0x2422,

0x1142,0x2222,0x1142,0x2222,0x1242,0x2221,0x2242,0x2211,
0x2242,0x1112,0x2242,0x1122,0x4442,0x4444,0x2222,0x2222,
0x2112,0x2422,0x2112,0x2422,0x2211,0x2422,0x2211,0x2422,
0x2221,0x2422,0x2222,0x2422,0x4444,0x2444,0x2222,0x2222,
0x2222,0x2222,0x4442,0x4444,0x2242,0x2222,0x0242,0x0000,
0x0242,0x9999,0x0242,0x9999,0x0242,0x9999,0x0242,0x9999,
0x2222,0x2222,0x4444,0x2444,0x2222,0x2422,0x2200,0x2422,
0x2099,0x2422,0x0999,0x2422,0x9999,0x2420,0x9999,0x2420,

0x2222,0x2222,0x4442,0x4444,0x2242,0x2222,0x2242,0x2222,
0x2242,0x0022,0x2242,0x5502,0x2242,0x5550,0x2242,0x0550,
0x0242,0x2055,0x0242,0x2055,0x0242,0x2066,0x0242,0x2066,
0x0242,0x2000,0x2242,0x2222,0x4442,0x4444,0x2222,0x2222,
0x5502,0x2420,0x5502,0x2420,0x3302,0x2420,0x3302,0x2420,
0x0002,0x2420,0x2222,0x2422,0x4444,0x2444,0x2222,0x2222,
0x3333,0x2933,0x3333,0x2933,0x3333,0x2933,0x3333,0x2933,
0x3333,0x2933,0x3333,0x2933,0x9999,0x2999,0x2222,0x2222,

0x0000,0x2900,0x0000,0x2900,0x0000,0x2900,0x0000,0x2900,
0x0000,0x2900,0x0000,0x2900,0x9999,0x2999,0x2222,0x2222,
0x7777,0x2977,0x7777,0x2977,0x7777,0x2977,0x7777,0x2977,
0x7777,0x2977,0x7777,0x2977,0x9999,0x2999,0x2222,0x2222,
0x8888,0x2988,0x8888,0x2988,0x8888,0x2988,0x8888,0x2988,
0x8888,0x2988,0x8888,0x2988,0x9999,0x2999,0x2222,0x2222,
0x2222,0x2222,0x4442,0x4444,0x2242,0x2222,0x2242,0x2222,
0x2242,0x2952,0x2242,0x9522,0x2242,0x5222,0x2242,0x2222,

0x2222,0x2222,0x4444,0x2444,0x2222,0x2422,0x2222,0x2422,
0x2222,0x2422,0x2222,0x2422,0x2229,0x2422,0x2295,0x2422,
0x2222,0x2222,0x4442,0x4444,0x2242,0x2222,0x2242,0x2222,
0x2242,0x2229,0x2242,0x2292,0x2242,0x2922,0x2242,0x9222,
0x2222,0x2222,0x4444,0x2444,0x2222,0x2422,0x2222,0x2422,
0x2292,0x2422,0x2922,0x2422,0x9222,0x2422,0x2222,0x2429,
};

//}}BLOCK(tileedit)
58 changes: 58 additions & 0 deletions source/tonc_memfunc.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@ === void memcpy32(void *dst, const void *src, u32 wdcount) CODE_IN_IWRAM; =============
@ r0, r1: dst, src
@ r2: wdcount, then wdcount>>3
@ r3-r10: data buffer
@ r12: wdn&7
.align 2
.code 32
.global memcpy32
memcpy32:
and r12, r2, #7 @ r12= residual word count
movs r2, r2, lsr #3 @ r2=block count
beq .Lres_cpy32
push {r4-r10}
@ Copy 32byte chunks with 8fold xxmia
@ r2 in [1,inf>
.Lmain_cpy32:
ldmia r1!, {r3-r10}
stmia r0!, {r3-r10}
subs r2, #1
bne .Lmain_cpy32
pop {r4-r10}
@ And the residual 0-7 words. r12 in [0,7]
.Lres_cpy32:
subs r12, #1
ldrcs r3, [r1], #4
strcs r3, [r0], #4
bcs .Lres_cpy32
bx lr

@ === void memset32(void *dst, u32 src, u32 wdn); =====================
.align 2
.code 32
.global memset32
memset32:
and r12, r2, #7
movs r2, r2, lsr #3
beq .Lres_set32
push {r4-r10}
@ set 32byte chunks with 8fold xxmia
mov r3, r1
mov r4, r1
mov r5, r1
mov r6, r1
mov r7, r1
mov r8, r1
mov r9, r1
mov r10, r1
.Lmain_set32:
stmia r0!, {r3-r10}
subs r2, r2, #1
bhi .Lmain_set32
pop {r4-r10}
@ residual 0-7 words
.Lres_set32:
subs r12, r12, #1
stmcsia r0!, {r1}
bhi .Lres_set32
bx lr
Loading

0 comments on commit 3fd21ee

Please sign in to comment.