Page 40 of 57

Posted: Sun Apr 14, 2013 2:53 am
by djcouchycouch
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.

Bitmap Issues

Posted: Sun Apr 28, 2013 6:41 pm
by kubilus1
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!

Posted: Sat May 04, 2013 5:11 pm
by kubilus1
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.

Re: Bitmap Issues

Posted: Sat May 04, 2013 10:44 pm
by POLYGAMe
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?

Posted: Sun May 05, 2013 3:14 pm
by kubilus1
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

Posted: Thu May 16, 2013 3:08 pm
by Moon-Watcher
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?

Posted: Thu May 16, 2013 4:59 pm
by Stef
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.

Posted: Mon May 20, 2013 12:12 pm
by Moon-Watcher
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.

Posted: Mon May 20, 2013 3:11 pm
by Moon-Watcher
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?

Posted: Mon May 20, 2013 9:55 pm
by Stef
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 :)

Posted: Sun Jun 09, 2013 1:34 am
by Zontar
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.

Posted: Mon Jun 10, 2013 7:14 pm
by Stef
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.

Posted: Thu Jun 20, 2013 3:27 am
by densir
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.

Posted: Thu Jun 20, 2013 5:10 am
by bastien
You missed to add it to the PATH variable

Posted: Thu Jun 20, 2013 5:14 am
by densir
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.