Page 55 of 57

Re: Sega Genesis Dev Kit (SGDK)

Posted: Fri Jun 05, 2020 7:31 pm
by Stef
cloudstrifer wrote:
Fri Jun 05, 2020 4:44 pm
@stef

Hi.
I have a sound corruption in my first sfx, fruit.pcm, fruit2.pcm and fruit3.pcm are same sfx.

fruit.pcm = OK
fruit2.pcm = OK
fruit3.pcm = Sound Corruption
...
I fixed a bug when some resources shared same binary data (rescomp detect it to avoid storing 2 times same data).
Can you try to pick up the last rescomp.jar tool directly from the Github repository and rebuild the project to see if the bug still occurs ?
I love SGDK, it's marvelous.

Thank you!
Thanks you :oops: Glad you like it that much :D

Re: Sega Genesis Dev Kit (SGDK)

Posted: Fri Jun 05, 2020 7:46 pm
by cloudstrifer
Tested with version 1.51 replacing rescomp.jar, replacing BIN folder and replacing entire SGDK by GitHub files.

VIDEO
https://youtu.be/fp6pkZ9joKE

Same results.


Thank you!

Re: Sega Genesis Dev Kit (SGDK)

Posted: Fri Jun 05, 2020 9:42 pm
by Stef
Ok, thanks for testing and reporting ! Sound like i didn't fixed everything then :-/

Re: Sega Genesis Dev Kit (SGDK)

Posted: Fri Jun 05, 2020 11:09 pm
by cloudstrifer
Please test this project.

https://www.mediafire.com/file/vfboo7gk ... g.rar/file

Thank you!

Re: Sega Genesis Dev Kit (SGDK)

Posted: Sat Jun 06, 2020 8:32 pm
by Stef
I made a mini test project to replicate your issue without success.
I used jump sound form sonic, i both tried to use 2 XGM PCM resources from same WAV file, then tried to use 2 XGM PCM resources using 2 WAV files but with identical data and it worked in both case.
If you can provide me a very example reproducing the issue it would be really helpful !

Re: Sega Genesis Dev Kit (SGDK)

Posted: Sun Jun 07, 2020 6:56 pm
by cloudstrifer
Stef wrote:
Sat Jun 06, 2020 8:32 pm
I made a mini test project to replicate your issue without success.
I used jump sound form sonic, i both tried to use 2 XGM PCM resources from same WAV file, then tried to use 2 XGM PCM resources using 2 WAV files but with identical data and it worked in both case.
If you can provide me a very example reproducing the issue it would be really helpful !

https://www.mediafire.com/file/vfboo7gk ... g.rar/file

Re: Sega Genesis Dev Kit (SGDK)

Posted: Sun Jun 07, 2020 7:38 pm
by Stef
Oh ok, you're using BIN resource to play your PCM.
Normally you need to use WAV resource to play PCM from XGM driver and internally rescomp will align it to 256 bytes as XGM driver require it.
If you really want to use BIN resource for your PCM, then use 256 bytes align (align) and size alignment (salign), and 128 value for padding (fill).
BIN name file [align [salign [fill [compression [far]]]]]

name BIN data variable name
file path of the data file to convert to binary data array
align memory address alignment for generated data array (default is 2)
salign size alignment for the generated data array (default is 2)
fill fill value for the size alignment (default is 0)
compression compression type, accepted values:
-1 / BEST / AUTO = use best compression
0 / NONE = no compression
1 / APLIB = aplib library (good compression ratio but slow)
2 / FAST / LZ4W = custom lz4 compression (average compression ratio but fast)
far 'far' binary data flag to put it at the end of the ROM (useful for bank switch, default = TRUE)

Re: Sega Genesis Dev Kit (SGDK)

Posted: Mon Jun 08, 2020 4:16 pm
by cloudstrifer
Hi.

fill = 128 not work for me, only work's with default value.

Not Good

Code: Select all

BIN fruit3_sfx "sfx/fruit3.pcm" 256 256 128
XGM stage1 "music/sonic1.vgm"
BIN fruit2_sfx "sfx/fruit2.pcm" 256 256 128
BIN fruit_sfx "sfx/fruit.pcm" 256 256 128
Good.

Code: Select all

BIN fruit3_sfx "sfx/fruit3.pcm" 256 256
XGM stage1 "music/sonic1.vgm"
BIN fruit2_sfx "sfx/fruit2.pcm" 256 256
BIN fruit_sfx "sfx/fruit.pcm" 256 256

Re: Sega Genesis Dev Kit (SGDK)

Posted: Tue Jun 09, 2020 7:36 am
by Stef
Oh yeah stupid me, XGM requires signed PCM so default level is $00 and not $80. So yeah default value is right, sorry for the mistake.

Re: Sega Genesis Dev Kit (SGDK)

Posted: Tue Jun 09, 2020 10:51 pm
by cloudstrifer
Thank you!

Re: Sega Genesis Dev Kit (SGDK)

Posted: Wed Jul 08, 2020 6:10 pm
by cloudstrifer
Hi.

Please tell me if it is normal, SGDK 1.51 shows strange tiles on sprite list.
sonic_sample.png
sonic_sample.png (82.39 KiB) Viewed 30584 times
Thank you!

Re: Sega Genesis Dev Kit (SGDK)

Posted: Thu Jul 09, 2020 9:51 am
by Stef
To be honest that doesn't matter, still i need to investigate why it's initialized that way...

Edit: Ok it turned out to be an initialization order issue, not very important but still better to have that correct :)
Thanks for reporting :)

Re: Sega Genesis Dev Kit (SGDK)

Posted: Fri Jul 17, 2020 7:07 pm
by Miquel
@cloudstrifer: The sprites you show on the image are leftovers from past use, and innocuous since they are not linked in the list (“Link” field).

Re: Sega Genesis Dev Kit (SGDK)

Posted: Mon Aug 03, 2020 4:49 pm
by danibus
@Stef
I was wondering how many tiles are for sprites, backgrounds, etc by default in SGDK.

I just search and found:
512 tiles for sprites
1024 tiles for each background = 2048 tiles for backgrounds
"some" tiles for text (don't know how many)
....put here more...

Is there a table with all these numbers? I read 4096 tiles for user somewhere in the web.

I'm working in my game to get small amount of tiles for every graphic resource, using Imagenesis (not SGDK but faster to check how many tiles a resource use, IMO). I guess that if there is a big PNG (like player sprite, with all the animations), every time graphic animation change necessary tiles are loaded from ROM instead VRAM, but not sure who is working.
Just to avoid strange behaviours.

Re: Sega Genesis Dev Kit (SGDK)

Posted: Tue Aug 04, 2020 7:59 am
by Stef
@danibus There is no such thing as default number of tiles for background in SGDK.
Well afaik it's true that the Sprite Engine can be initialized with a default value which is now 420 tiles for sprite (this is for SGDK 1.5 or >) but of course, you can freely change this value (and i recommend to do it) depending your need.
What you need to know is that VRAM is 64 KBytes, so it has the capacity of storing 2048 tiles at max *but* then, you need to take in account all the tables which share the VRAM space as tilemap for BG B and BG A, the window tilemap, sprite attributes table, hscroll table.. and a default font (92 tiles) that SGDK embed so in the end it let you space for about ~1400 tiles. And this is using the default SGDK VRAM layout (64x32 sized BG) but again you can tweak it if need to get more space. Still the default layout should be enough for the majority of case, 1400 tiles so about 1000 tiles for background and 400 tiles for sprites (again you can adjust depending your need). You also have some holes in the high part of the VRAM that you can use to store some extra tiles that will never change (HUD for instance).
Hope that clarify a bit :)