Search found 3009 matches

by Stef
Sun Apr 05, 2020 6:49 pm
Forum: SGDK
Topic: s16/s32 and sprintf/VDP_drawText
Replies: 2
Views: 50

Re: s16/s32 and sprintf/VDP_drawText

it's the sprintf(..) function which doesn't support long type (u32 / s32), even by using %ld unfortunately.
You can use intToStr(..) method to avoid the problem (note that intToStr(..) is limited to [-500000000..500000000] range)
by Stef
Tue Mar 31, 2020 12:19 pm
Forum: SGDK
Topic: Brainstorming a way to hscan colors in SGDK
Replies: 6
Views: 195

Re: Brainstorming a way to hscan colors in SGDK

SGDK HInt handler is definitely slow when you need to do a specific task at each scanline... The interrupt process itself consume up to 44 cycles + ~124 cycles (just quickly did head cycle counting) for the ASM wrapper + 16 cycles for RTS from C routine means that you have ~184 cycles on the ~484 av...
by Stef
Wed Mar 25, 2020 9:17 am
Forum: SGDK
Topic: RESCOMP and individual nametable entries?
Replies: 15
Views: 2956

Re: RESCOMP and individual nametable entries?

Well in fact you have a way to encode priority information into the image but you need to arrange the palette properly. So you need a 8 bit image (indexed so) where : // b0-b3 = pixel data // b4-b5 = palette index (4 palette max) // b7 = priority bit So you can see that bit 7 can be used to store pr...
by Stef
Mon Mar 23, 2020 7:40 pm
Forum: SGDK
Topic: build error when trying Set_Palette
Replies: 2
Views: 111

Re: build error when trying Set_Palette

Look like you updated SGDK by copying new files directly into the SGDK folder.
The problem is that some removed files (as vdp_pal_a.s file) weren't removed from your src folder ;)
Just remove vdp_pal_a.s file from src SGDK folder and recompile the library, it should be fine :)
by Stef
Mon Mar 23, 2020 10:09 am
Forum: Demos
Topic: Sega Genesis Native Tracker
Replies: 2
Views: 304

Re: Sega Genesis Native Tracker

That looks really awesome ! I tested it very quickly (without all shortcuts so i was limited) but so far it seems to have all features needed to compose music on the Megadrive. Very well done =)
by Stef
Mon Feb 17, 2020 11:04 am
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 797
Views: 411015

Re: Sega Genesis Dev Kit (SGDK)

There is no real way of doing that automatically yet unfortunately. To disable looping you need to set sprite->timer to 0 when you're reaching last animation frame (setting timer to 0 actually disable auto animation). Also to change animation speed, again you need to set manually the sprite->timer v...
by Stef
Fri Jan 31, 2020 9:40 am
Forum: SGDK
Topic: Convert PCM to XGM
Replies: 11
Views: 2774

Re: Convert PCM to XGM

I think that is an interesting project :) When i was looking to develop my "PCMtoFM" tools i started to read some scientific literatures about it. I found some interesting articles but never got to time to investigate them in depth unfortunately, at this time IA or genetic algorithm weren't as effic...
by Stef
Thu Jan 30, 2020 12:05 pm
Forum: SGDK
Topic: Convert PCM to XGM
Replies: 11
Views: 2774

Re: Convert PCM to XGM

One way to translate PCM to FM would be to treat it as a seq2seq machine learning problem. The training sets could be generated by generating random sequences of FM commands and the corresponding PCMs; then the model could be trained to do the reverse mapping from the examples. Interested in experi...
by Stef
Wed Jan 29, 2020 11:50 am
Forum: SGDK
Topic: Convert PCM to XGM
Replies: 11
Views: 2774

Re: Convert PCM to XGM

Oh no that is something completely different here, the tool you show just convert a WAV/PCM to PSG data taking in consideration the PSG constraints to filter/process the PCM data and obtain the best quality out of it (from the PSG). The resulting PSG data size is close to the PCM data, it's just dow...
by Stef
Mon Jan 27, 2020 3:07 pm
Forum: SGDK
Topic: Convert PCM to XGM
Replies: 11
Views: 2774

Re: Convert PCM to XGM

If that is really what he want then yeah, you don't have tools for that and honestly i think that results won't be good anyway. I tried long a time ago to make a tool which could convert a PCM sample (single sound obviously) into a FM patch (kind of). It's definitely *very* complicated to develop th...
by Stef
Fri Jan 24, 2020 9:31 pm
Forum: SGDK
Topic: Convert PCM to XGM
Replies: 11
Views: 2774

Re: Convert PCM to XGM

Not sure what you mean exactly by converting PCM to XGM.
At least you ca declare your PCM resource as WAV resource then use the XGM driver to play it (whatever PCM channel you use for that).
by Stef
Wed Jan 22, 2020 6:56 pm
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 797
Views: 411015

Re: Sega Genesis Dev Kit (SGDK)

Indeed, it looks like it eliminated memcpy from linking process (probably from the LTO optimization stuff) while it was required by the code. Maybe older compiler versions weren't using memcpy to copy structure while newer versions use it when structure size is > a certain limit (which explain why t...
by Stef
Mon Jan 20, 2020 11:15 pm
Forum: SGDK
Topic: Sega Genesis Dev Kit (SGDK)
Replies: 797
Views: 411015

Re: Sega Genesis Dev Kit (SGDK)

Oh this one is a weird one ! i've no idea why it happen in SGDK 4.1 and not SGDK 4.0 though...
maybe related to linking ordering. I've to investigate that..
thanks for reporting :)
by Stef
Mon Jan 20, 2020 11:41 am
Forum: SGDK
Topic: All my VDP_drawText() are gone with SGDK 1.4.1
Replies: 3
Views: 1560

Re: All my VDP_drawText() are gone with SGDK 1.4.1

I completely missed your message @DavilaGames !
Indeed VDP_resetScreen(..) does more now than before (it also clear VRAM), explaining you need to re-upload the font after calling it.
Definitely a problem, i will add the (default) font upload to the function ! Thanks for reporting :)
by Stef
Fri Jan 03, 2020 10:14 am
Forum: SGDK
Topic: Import Sprites in main()
Replies: 1
Views: 1670

Re: Import Sprites in main()

You have indeed some limitations about the number of sprite you can use. The hardware itself is limited to 80 sprites max (H40 mode) so the sprite engine limit to 80 sprites max too. You cannot what you're doing : adding all sprites (using addSprite) for a level then hiding some of them until they b...