Sega Genesis Dev Kit (SGDK)

SGDK only sub forum

Moderator: Stef

djcouchycouch
Very interested
Posts: 683
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Sun Apr 14, 2013 2:53 am

POLYGAMe wrote:Is it possible to use SGDK with XCode? My main dev system is my Mac...
Unfortunately, no. From what I remember, I think some of the tools could be ported, but not everything can be at the moment.

I've previously used Windows XP in Virtual Box. It was workable but after a while I got annoyed by the fact that a lot of emulators didn't work properly in it and the one that did (Gens) had the habit of totally chugging the virtual machine *and* the Mac.

I picked up a cheap 100$ PC from a friend and used that for a while. Then I got tired of the giant roaring fans, so I repaired an old iMac I had and installed WinXP through Bootcamp on it.

kubilus1
Very interested
Posts: 237
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Bitmap Issues

Post by kubilus1 » Sun Apr 28, 2013 6:41 pm

I'm picking up a project I was working on and it appears that the bitmap handling has changed a bit.

Before bitmap headers ended up being:

Code: Select all

extern const u16 a_sprite[0x112];
Which could be loaded with something like:

Code: Select all

VDP_loadBMPTileData((u32*) &a_sprite[18], vdp_pos, 6, 2, 6);
But now that fails, with an error about the sprite not being an array. I see that the sprite header is now:

Code: Select all

extern const Bitmap a_sprite;
Is there a different method I need to use to load these now?

Thanks!

kubilus1
Very interested
Posts: 237
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Post by kubilus1 » Sat May 04, 2013 5:11 pm

I ended up just reverting the bintos program in order to keep this stuff working. The new bitmap features look pretty neat (scaling!), and I'll have to try them later.

I would love to keep my old stuff working with the new formats, but not sure how to do that. Perhaps I'll switch back to bintoc.

POLYGAMe
Very interested
Posts: 151
Joined: Sun Apr 14, 2013 1:19 am
Location: Auckland, New Zealand
Contact:

Re: Bitmap Issues

Post by POLYGAMe » Sat May 04, 2013 10:44 pm

kubilus1 wrote:I'm picking up a project I was working on and it appears that the bitmap handling has changed a bit.

Before bitmap headers ended up being:

Code: Select all

extern const u16 a_sprite[0x112];
Which could be loaded with something like:

Code: Select all

VDP_loadBMPTileData((u32*) &a_sprite[18], vdp_pos, 6, 2, 6);
But now that fails, with an error about the sprite not being an array. I see that the sprite header is now:

Code: Select all

extern const Bitmap a_sprite;
Is there a different method I need to use to load these now?

Thanks!
I think you're having the same issue I did. Check out this thread for how to fix it.

viewtopic.php?t=1429

Also, are you loading bitmaps as sprites? Is that possible without genres?

kubilus1
Very interested
Posts: 237
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Post by kubilus1 » Sun May 05, 2013 3:14 pm

That post was the key to getting this working. I don't use genres, but just load a sprite list BMP, which I put together with some scripts. See:

viewtopic.php?t=1312

Moon-Watcher
Very interested
Posts: 117
Joined: Sun Jan 02, 2011 9:14 pm

Post by Moon-Watcher » Thu May 16, 2013 3:08 pm

I've been working in a little game for three months. Now I need some advice related to sound drivers: how to play music and FX at the same time?

Stef
Very interested
Posts: 3004
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Thu May 16, 2013 4:59 pm

The only suitable solution for that is Echo :
http://segaretro.org/Echo
viewtopic.php?t=1186

Still the Echo integration in SGDK is rather poor and need some work.
Another solution is to play music via the Z80 (MVS, TFM or VGM) and use the PSG from 68000 for SFX.

Moon-Watcher
Very interested
Posts: 117
Joined: Sun Jan 02, 2011 9:14 pm

Post by Moon-Watcher » Mon May 20, 2013 12:12 pm

Stef wrote:The only suitable solution for that is Echo :
http://segaretro.org/Echo
viewtopic.php?t=1186

Still the Echo integration in SGDK is rather poor and need some work.
Another solution is to play music via the Z80 (MVS, TFM or VGM) and use the PSG from 68000 for SFX.
I already expected an answer like this but had the slight hope there were an magic and simpler solution :P Think I going the Echo way.

Thanks for your answer, Stef.

Moon-Watcher
Very interested
Posts: 117
Joined: Sun Jan 02, 2011 9:14 pm

Post by Moon-Watcher » Mon May 20, 2013 3:11 pm

I had a look at psg.c file
Stef wrote:(...) and use the PSG from 68000 for SFX.
I suspect it could be done that way, isn't it?

Stef
Very interested
Posts: 3004
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Mon May 20, 2013 9:55 pm

Moon-Watcher wrote:I had a look at psg.c file
Stef wrote:(...) and use the PSG from 68000 for SFX.
I suspect it could be done that way, isn't it?
Yeah exactly, by using methods declared in psg.h file you can use the PSG from 68000 side :)

Zontar
Very interested
Posts: 55
Joined: Fri Oct 21, 2011 8:58 pm

Post by Zontar » Sun Jun 09, 2013 1:34 am

Quick question, is spriteDefCache emptied after I call VDP_updateSprites() or can I still use and manipulate its contents directly (proceeding to call VDP_updateSprites() again and update which sprite is null-terminated)?

The sprite cache is not cleared so you can update only the meaningful sprite and update it then call VDP_updateSprites(). Right now the method is not yet optimized so it will send to VRAM all sprites in the cache until the last sprite you modified.

Stef
Very interested
Posts: 3004
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Mon Jun 10, 2013 7:14 pm

The sprite cache is not cleared so you can update only the meaningful sprite and update it by calling VDP_updateSprites(). The method is not yet optimized so it will send to VRAM all sprites in the cache until the last sprite you modified.

densir
Newbie
Posts: 4
Joined: Thu Jun 20, 2013 3:03 am

Post by densir » Thu Jun 20, 2013 3:27 am

Hello everyone!
I decided to try my hand at SGDK. Previously tried to use Basiegahorz, but the number of users it is less.
Downloaded SGDK 0.94 and then beginning About most interesting. unpacked it. Ordered environment GDK and GDK_VIN. all the instructions http://code.google.com/p/sgdk/wiki/HowToUseSGDK. downloaded the sample code in C from your own site
http://sgdk.googlecode.com/svn/wiki/fil ... oWorld.zip
Put it in the required directory. entered the command
% GDK_WIN% \ bin \ make-f% GDK_WIN% \ makelib.gen and got the following:

c:/sgdk/bin/bintos -bmp c:/sgdk/res/logo_lib.bmp
c:/sgdk/bin/gcc -m68000 -Wall -O1 -fomit-frame-pointer -fno-builtin-memset -fno -builtin-memcpy -Ic:/sgdk/include -Ic:/sgdk/src -Ic:/sgdk/res -c c:/sgdk/res/logo_lib.s -o c:/sgdk/res/logo_lib.ogcc: installation problem, cannot exec `as': No such file or directory make: *** [c:/sgdk/res/logo_lib.o] Error 1 rm c:/sgdk/res/logo_lib.s

Checked the file does not exist c:/sgdk/res/logo_lib.o . tried to remove logo_lib.bmp and logo_lib.h
Run the command
% GDK_WIN% \ bin \ make-f% GDK_WIN% \ makelib.gen
The system reported that there c:/sgdk/src/z80_drv1.o80
what kind of files that contain О the expansion?
I apologize for the stupid questions and mistakes, I new to programming, but still can not learn how to use your compiler.

bastien
Very interested
Posts: 208
Joined: Mon Jun 25, 2007 7:19 pm
Location: Besançon,France
Contact:

Post by bastien » Thu Jun 20, 2013 5:10 am

You missed to add it to the PATH variable

densir
Newbie
Posts: 4
Joined: Thu Jun 20, 2013 3:03 am

Post by densir » Thu Jun 20, 2013 5:14 am

bastien wrote:You missed to add it to the PATH variable
Thank you. I saw my mistake.

tried, it came to collect. I will understand.

Post Reply