Sega Genesis Dev Kit (SGDK)

SGDK only sub forum

Moderator: Stef

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

Re: Sega Genesis Dev Kit (SGDK)

Post by Stef » Fri Jun 05, 2020 7:31 pm

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

cloudstrifer
Very interested
Posts: 95
Joined: Mon Feb 19, 2018 7:31 pm

Re: Sega Genesis Dev Kit (SGDK)

Post by cloudstrifer » Fri Jun 05, 2020 7:46 pm

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!

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

Re: Sega Genesis Dev Kit (SGDK)

Post by Stef » Fri Jun 05, 2020 9:42 pm

Ok, thanks for testing and reporting ! Sound like i didn't fixed everything then :-/

cloudstrifer
Very interested
Posts: 95
Joined: Mon Feb 19, 2018 7:31 pm

Re: Sega Genesis Dev Kit (SGDK)

Post by cloudstrifer » Fri Jun 05, 2020 11:09 pm

Please test this project.

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

Thank you!

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

Re: Sega Genesis Dev Kit (SGDK)

Post by Stef » 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 !

cloudstrifer
Very interested
Posts: 95
Joined: Mon Feb 19, 2018 7:31 pm

Re: Sega Genesis Dev Kit (SGDK)

Post by cloudstrifer » Sun Jun 07, 2020 6:56 pm

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

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

Re: Sega Genesis Dev Kit (SGDK)

Post by Stef » Sun Jun 07, 2020 7:38 pm

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)

cloudstrifer
Very interested
Posts: 95
Joined: Mon Feb 19, 2018 7:31 pm

Re: Sega Genesis Dev Kit (SGDK)

Post by cloudstrifer » Mon Jun 08, 2020 4:16 pm

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

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

Re: Sega Genesis Dev Kit (SGDK)

Post by Stef » Tue Jun 09, 2020 7:36 am

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.

cloudstrifer
Very interested
Posts: 95
Joined: Mon Feb 19, 2018 7:31 pm

Re: Sega Genesis Dev Kit (SGDK)

Post by cloudstrifer » Tue Jun 09, 2020 10:51 pm

Thank you!

cloudstrifer
Very interested
Posts: 95
Joined: Mon Feb 19, 2018 7:31 pm

Re: Sega Genesis Dev Kit (SGDK)

Post by cloudstrifer » Wed Jul 08, 2020 6:10 pm

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 322 times
Thank you!

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

Re: Sega Genesis Dev Kit (SGDK)

Post by Stef » Thu Jul 09, 2020 9:51 am

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 :)

Post Reply