Posted: Sat Jun 23, 2012 12:30 pm
photobucket and imgur can put other data except images?TmEE co.(TM) wrote:photobucket and imgur are some free places to put images.
Sega Megadrive/Genesis development
http://gendev.spritesmind.net/forum/
http://gendev.spritesmind.net/forum/viewtopic.php?f=8&t=1167
photobucket and imgur can put other data except images?TmEE co.(TM) wrote:photobucket and imgur are some free places to put images.
Thank you very musch!KanedaFr wrote:mirror : http://gendev.spritesmind.net/files/sha ... dsdemo.rar
(my own way to congrats you !)
He does but he want a sort of multi system debugger (and so not only for Gens) so it takes sometime to design it.KanedaFr wrote:Yeah, I'm behind Gens KMod while Stef is behind Gens
I won't update it anymore.
We are all waiting for version of Medarin but it seems he doesn't work on it anymore
The new features you're asking it is exactly what Medarin is working onzhengyaxin_8bit wrote:Thank you very musch!KanedaFr wrote:mirror : http://gendev.spritesmind.net/files/sha ... dsdemo.rar
(my own way to congrats you !)
The Gen-debuger is writed by you?
I used it to watch some memory unit,and vdp's status etc, it's very usefull. But I think that somewhere will need improved. Can you
append more debuger function, "step into","step out","step over","set breakpoint for cpu address or R/W ram","set breakpoint for R/W vdp vrom,crom,scrollrom",
Now, The debug code is a difficult work for me,Have you a good way?
Not really, i believe he does not have many free time but at least he seems really motiveddjcouchycouch wrote:Has he ever given a roadmap as to when he'll release something?
Code: Select all
#include <genesis.h>
//this demo demonstrates what is called a small bmp
//this is useful for if you just want to draw a line some were on the screen
//bmp_size is in tiles
//change bmp_size_x and bmp_size_y to set the size of the mini_bmp buffer
#define bmp_size_x 8
#define bmp_size_row bmp_size_x*4
#define bmp_size_y 8
#define bmp_size_y_pixel bmp_size_y*8
#define bmp_tiles_total bmp_size_x*bmp_size_y
#define bmp_size_bytes_total bmp_tiles_total*32
u8 bmp_buffer[bmp_size_bytes_total];
//bmp_begin_tile is determains were the bmp outputed tiles are stored in the vram
void set_two_pixel(u16 x,u16 y,u8 color)
{
bmp_buffer[(y*bmp_size_row)+x]=color;
}
s16 abs_gen(s16 val)
{
if (val < 0) val = -val;
return val;
}
void draw_line(s16 x0,s16 y0,s16 x1,s16 y1,u8 color)
{
//dx := abs(x1-x0)
s16 dx=abs_gen(x1-x0);
//dy := abs(y1-y0)
s16 dy=abs_gen(y1-y0);
s8 sx,sy;
//if x0 < x1 then sx := 1 else sx := -1
if (x0 < x1)
{
sx=1;
}
else
{
sx=-1;
}
// if y0 < y1 then sy := 1 else sy := -1
if (y0 < y1)
{
sy=1;
}
else
{
sy=-1;
}
//err := dx-dy
s16 err=dx-dy;
// loop
while (1)
{
// setPixel(x0,y0)
set_two_pixel(x0,y0,color);
//if x0 = x1 and y0 = y1 exit loop
if (x0 == x1 && y0 == y1)
{
break;
}
//e2 := 2*err
s16 e2=2*err;
// if e2 > -dy then
//if (e2 > -dy)
if (e2 > -dy)
{
// err := err - dy
err-=dy;
// x0 := x0 + sx
x0+=sx;
}
//end if
//if e2 < dx then
if (e2 < dx)
{
//err := err + dx
err+=dx;
//y0 := y0 + sy
y0+=sy;
//end if
}
}
//end loop
}
void bmp_clear()
{
u16 clear_loop=bmp_size_bytes_total;
while (clear_loop--)
{
bmp_buffer[clear_loop]=0;
}
}
int main()
{
//first place the tiles that will be the bmp_buffer
//void VDP_fillTileMapRectInc(u16 plan, u16 basetile, u16 x, u16 y, u16 w, u16 h)
VDP_fillTileMapRectInc(APLAN,1,0,0,bmp_size_x,bmp_size_y);//change the 0,0 to the loaction in tiles of were you want the line to apper
while (1)
{
u16 x,y;
for (y=0;y<bmp_size_y_pixel;y++)
{
for (x=0;x<bmp_size_row;x++)
{
draw_line(x,y,0,0,0xFF);//color is two colors packed into one byte
//void VDP_loadBMPTileData(const u32 *data, u16 index, u16 w, u16 h, u16 bmp_w);
VDP_loadBMPTileData((const u32*)bmp_buffer, 32, bmp_size_x, bmp_size_y, bmp_size_x);
bmp_clear();
VDP_waitVSync();
}
}
for (y=0;y<bmp_size_y_pixel;y++)
{
for (x=0;x<bmp_size_row;x++)
{
draw_line(bmp_size_row,bmp_size_y_pixel,x,y,0xFF);//color is two colors packed into one byte
//void VDP_loadBMPTileData(const u32 *data, u16 index, u16 w, u16 h, u16 bmp_w);
VDP_loadBMPTileData((const u32*)bmp_buffer, 32, bmp_size_x, bmp_size_y, bmp_size_x);
bmp_clear();
VDP_waitVSync();
}
}
}
}
Indeed!