Skip to content

Commit

Permalink
beta version
Browse files Browse the repository at this point in the history
  • Loading branch information
Kannagi committed Mar 23, 2024
1 parent e72a55c commit 845312c
Show file tree
Hide file tree
Showing 103 changed files with 9,145 additions and 221 deletions.
1 change: 1 addition & 0 deletions DATA/Jean.pal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
|�,MA6f>��6�K�!�1�>�;�C �_
Binary file added DATA/Jean.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DATA/Jean.spr
Binary file not shown.
Binary file added DATA/Mana Seed Farmer Sprite Free Sample.zip
Binary file not shown.
Binary file added DATA/RetroConvert
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DATA/farmer base sheets/fbas_blank_sheet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions DATA/man.pal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
|��6?G{.;��4�L�,�=NI2b�N
Binary file added DATA/man.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DATA/man.spr
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions DATA/map/tile_0.pal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
|$��&z7�� v: �1�WtZ:c�I)-
Binary file added DATA/map/tile_0.spr
Binary file not shown.
1 change: 1 addition & 0 deletions DATA/map/tile_1.pal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
|[c)4>� ���}O�&�!�;�=(f�
Expand Down
Binary file added DATA/map/tile_1.spr
Binary file not shown.
1 change: 1 addition & 0 deletions DATA/map/tile_2.pal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
|%�.�"�S#Au����0^;� �
Expand Down
Binary file added DATA/map/tile_2.spr
Binary file not shown.
Binary file added DATA/map/tile_3.pal
Binary file not shown.
Binary file added DATA/map/tile_3.spr
Binary file not shown.
2 changes: 2 additions & 0 deletions DATA/map/tile_4.pal
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
|
"�&�-�)�50!�$/X6�-�J(%�=gRN
Binary file added DATA/map/tile_4.spr
Binary file not shown.
Binary file added DATA/map/tile_5.pal
Binary file not shown.
Binary file added DATA/map/tile_5.spr
Binary file not shown.
Binary file added DATA/map/tile_6.pal
Binary file not shown.
Binary file added DATA/map/tile_6.spr
Binary file not shown.
Binary file added DATA/map/tile_A.ktm
Binary file not shown.
Binary file added DATA/map/tile_B.ktm
Binary file not shown.
1 change: 1 addition & 0 deletions DATA/old_man.pal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
|�V1�=�N�s{.;mG5~;��/�
Binary file added DATA/old_man.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DATA/old_man.spr
Binary file not shown.
1 change: 1 addition & 0 deletions DATA/randi.pal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
|�y�T$9�RQ�>�)�Gb�%�{
Expand Down
Binary file added DATA/randi.spr
Binary file not shown.
Binary file added DATA/seasonal sample (spring).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions DATA/soldat.pal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
|��5m)U:\O�o��2_;�(�E�0)!�-3B
Binary file added DATA/soldat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added DATA/soldat.spr
Binary file not shown.
17 changes: 7 additions & 10 deletions SNDK/Init.egl
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ func SNDK_Init:;
DMA_7 = 0x18;
DMA_BADD_7 = 0x80; //WMDATA memset $80

SNDK_memset SNDK_RAM,SNDK_INIT_DATA1,0xFE00
//clear RAM
SNDK_memset SNDK_RAM,SNDK_INIT_DATA1,0xFE00

MODE16


//VRAM CLEAR
idx = 0;
Expand Down Expand Up @@ -152,20 +152,13 @@ func SNDK_Init:;
loop idy == 0

MODE8






SNDK_SendVRAM 0x4000,DATA_FONT_SNDK_S,0x400


SNDK_memcopy SNDK_PALBG0,DATA_FONT_SNDK_P,0x20


SNDK_SendOAM


OBJSEL = SNDK_SPR_16_32;
SNDK_SPR_META 16,32
}
Expand Down Expand Up @@ -227,6 +220,10 @@ funclib tesss:uint8 ok;
ok = 8;

[SNDK_OAMH,posxh] = ok;


uint16 tadr;
tadr =+ LIST_SPR1:
}

DATA_FONT_SNDK_S:
Expand Down
142 changes: 95 additions & 47 deletions SNDK/Sprite.egl
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,29 @@ func SNDK_Sprite:;
{
uint16 oam;

//init OAM
idx = 0;
oam = idx;
oam =? 0;

SNDK_memset SNDK_OAM0.x,SNDK_OAM_INIT_DATA,0x200

idy = 0x8;
idx = 0;

MODE16
acc = 0;
do
{

[SNDK_OAMH,idx] = acc;
idx += 2;
[SNDK_OAMH,idx] = acc;
idx += 2;
}
loop idy == 0
MODE8

SNDK_memset SNDK_OAMH,SNDK_OAM_INIT_DATA2,0x20
}

SNDK_OAM_INIT_DATA:
.data.b 0xE0;

SNDK_OAM_INIT_DATA2:
.data.b 0x00;

//---------------------------------------Engine--------------------------------------------------
// >= <

funclib SNDK_SpriteEngine:uint16 oam,uint16 n;
funclib SNDK_SpriteEngine:uint16 oam,uint16 n,uint8 ndma;
{

lib uint16 posx,posy;
lib uint8 tile,attribute;
lib uint16 posxh,indexh;

lib uint8 dma;
uint8 dma_count;
uint16 dma_count;
MODE16
if n >= 16
{
Expand All @@ -52,6 +37,14 @@ funclib SNDK_SpriteEngine:uint16 oam,uint16 n;
return;
}

if n & 1
{
return;
}

//--------------


idy = n;
idx = 0;
SNDK_Sprite.oam = oam<<2;
Expand All @@ -66,8 +59,6 @@ funclib SNDK_SpriteEngine:uint16 oam,uint16 n;

tile = [SNDK_SPRITE.t,idx] ;



asm "phx";

call SNDK_SpriteEngineDraw:;
Expand All @@ -76,41 +67,101 @@ funclib SNDK_SpriteEngine:uint16 oam,uint16 n;
asm "plx";


if posxh == 0x3F00
{

}else
{

}

MODE8
acc = dma_count&3;
if acc == 0
{
//SNDK_VBlank |= 0x01;
}
MODE16

idx+= 0x20;
}
loop idy == 0



//DMA auto
lib uint16 list,add,ianim,oldx,lista;
lib uint8 nanim,index;


//DMA1
idx = dma_count << 5;
oldx = idx;

index = [SNDK_SPRITE.index,idx];
ianim = [SNDK_SPRITE.ianim,idx];
[SNDK_SPRITE.ianim,idx] = ianim + 2;
list = [SNDK_SPRITE.list,idx];
lista = [0x830004,list];

nanim = [0x830000,lista];
idx = lista + ianim;
add = [0x830002,idx] + index;

idx = list;
SNDK_VBlank.dma_spr1.addr = [0x830000,idx] + add;
SNDK_VBlank.dma_spr1.size = [0x83000A,idx];
SNDK_VBlank.dma_spr1.add = [0x83000C,idx];
SNDK_VBlank.dma_spr1.vmaddr = [0x830008,idx];

MODE8

SNDK_VBlank.dma_spr1.bank = [0x830002,idx];
SNDK_VBlank.dma_spr1.channel = [0x83000E,idx];

if ianim == nanim
{
[SNDK_SPRITE.ianim,oldx] = 0;
}

//DMA2
MODE16
oldx += 0x20;
idx = oldx;

acc = ndma&3;
if acc == 2
{
ianim = [SNDK_SPRITE.ianim,idx];
[SNDK_SPRITE.ianim,idx] = ianim + 2;
list = [SNDK_SPRITE.list,idx];
lista = [0x830004,list];

nanim = [0x830000,lista];
idx = lista + ianim;
add = [0x830002,idx];

SNDK_VBlank.dma_spr2.addr = [0x830000,idx] + add;
SNDK_VBlank.dma_spr2.size = [0x83000A,idx];
SNDK_VBlank.dma_spr2.add = [0x83000C,idx];
SNDK_VBlank.dma_spr2.vmaddr = [0x830008,idx];
}


MODE8

if ndma == 2
{
SNDK_VBlank.dma_spr2.bank = [0x830002,idx];
SNDK_VBlank.dma_spr2.channel = [0x83000E,idx];

if ianim == nanim
{
[SNDK_SPRITE.ianim,oldx] = 0;
}
}

dma_count +=1;

//DMA end
dma_count +=ndma;
if dma_count >= n
{
dma_count = 0;
}
}

//---------------------------------------MODE--------------------------------------------------

funclib SNDK_SpriteEngineDraw:;
{

lib uint16 posx,posy;
lib uint8 tile,attribute;
lib uint16 posxh,indexh;


MODE16
acc = posy + 0xC020;
if acc & 0x3F00
Expand Down Expand Up @@ -264,6 +315,3 @@ funclib SNDK_SpriteDrawMeta2x2:uint8 position.x,uint8 position.y,uint8 tile,uint
SNDK_Sprite.oam = idx + 16;
MODE8
}



Loading

0 comments on commit 845312c

Please sign in to comment.