Search found 338 matches

by cero
Tue May 03, 2016 8:40 am
Forum: SGDK
Topic: XGM driver hangs during fades
Replies: 12
Views: 6644

Re: XGM driver hangs during fades

Do you plan to fix this on the xgm side, by allowing interrupts during fades, or by allowing interrupts + clearing the pointers during the fade?
by cero
Sat Apr 30, 2016 8:43 am
Forum: SGDK
Topic: RAM not cleared on reset
Replies: 10
Views: 7007

Re: RAM not cleared on reset

Yes, they most certainly are made in quantity. Even if you care about singles pricing: 32kb, single pricing at 4 UK cents: http://uk.rs-online.com/web/p/sram-memory-chips/0538142/ (it's been a while since I did electronics, so no guarantee that chip is straight Gen compatible. Just to show the gener...
by cero
Fri Apr 29, 2016 11:52 am
Forum: SGDK
Topic: RAM not cleared on reset
Replies: 10
Views: 7007

Re: RAM not cleared on reset

Sure, but in 2016 that costs about 0.15 cents :P
by cero
Fri Apr 29, 2016 8:18 am
Forum: SGDK
Topic: RAM not cleared on reset
Replies: 10
Views: 7007

Re: RAM not cleared on reset

I'd like a way to disable it completely. Any game with a high score would use SRAM.

Would it be enough to edit boot/sega.s, such that "bne.s SkipSetup" became "bne.s Continue"?
by cero
Thu Apr 28, 2016 5:04 pm
Forum: SGDK
Topic: RAM not cleared on reset
Replies: 10
Views: 7007

RAM not cleared on reset

I want a soft-reset to be exactly the same as a hard reset. I see sgdk currently doesn't zero anything on a soft reset. How do I change it? Where is the reset vector set up?
by cero
Sun Apr 24, 2016 8:20 am
Forum: SGDK
Topic: BCD computations ?
Replies: 14
Views: 8334

Re: BCD computations ?

I doubt it'll be of much help though since I'm 100% sure it was optimized for modern architectures. I had considered once making a fast 32-bit integer to string subroutine in assembly, but again it requires the BCD instructions ( and a good bunch of look-up tables). At least could be called as a no...
by cero
Fri Apr 22, 2016 4:54 pm
Forum: SGDK
Topic: How much of the DMA budget does XGM take?
Replies: 7
Views: 4556

Re: How much of the DMA budget does XGM take?

I measured the DMA queue, and it took about 19 lines. Seems I had some too long frames on rarely executed functions, optimized a bit, let's see if that takes care of it.
by cero
Fri Apr 22, 2016 3:25 pm
Forum: SGDK
Topic: BCD computations ?
Replies: 14
Views: 8334

Re: BCD computations ?

Have you tried the number-to-string function from Facebook (IIRC)?

It used a lot of ifs instead of division, and it was faster on x86_64.
by cero
Thu Apr 21, 2016 4:36 pm
Forum: SGDK
Topic: How much of the DMA budget does XGM take?
Replies: 7
Views: 4556

Re: How much of the DMA budget does XGM take?

I think you can even measure it using background color change but really the overhead is small enough... How would you measure something that lasts less than a frame with a color change? Emulators only display at 60fps, hw displays at 60fps, and even if you had a 200Hz screen, you'd also need a hig...
by cero
Thu Apr 21, 2016 4:19 pm
Forum: SGDK
Topic: How much of the DMA budget does XGM take?
Replies: 7
Views: 4556

Re: How much of the DMA budget does XGM take?

Hm, so 7.2kb if you use XGM, and 6.8kb with the XGM extra protection. I ask about this, because in a game I was writing 4.4kb in the dma queue, and it was lagging on hw. So I wondered if the XGM overhead was big enough to cause that. If the overhead would indeed drop the budget to just 6.8kb, then I...
by cero
Thu Apr 21, 2016 2:23 pm
Forum: SGDK
Topic: How much of the DMA budget does XGM take?
Replies: 7
Views: 4556

Re: How much of the DMA budget does XGM take?

In _vint_callback(): if (vintp & PROCESS_XGM_TASK) XGM_doVBlankProcess(); // dma processing if (vintp & PROCESS_DMA_TASK) { // DMA protection for XGM driver if (currentDriver == Z80_DRIVER_XGM) { SND_set68KBUSProtection_XGM(TRUE); // delay enabled ? --> wait a bit to improve PCM playback (test on SO...
by cero
Thu Apr 21, 2016 9:57 am
Forum: SGDK
Topic: How much of the DMA budget does XGM take?
Replies: 7
Views: 4556

How much of the DMA budget does XGM take?

The docs say a NTSC system can DMA 7.6kb per vsync. Since XGM does some processing there, and the DMA protection also affects some, what is the safe DMA budget when using XGM?

In other words, what is the worst-case amount XGM will steal from the DMA budget?
by cero
Thu Apr 21, 2016 7:56 am
Forum: SGDK
Topic: XGM driver hangs during fades
Replies: 12
Views: 6644

Re: XGM driver hangs during fades

Is it perhaps because the fade disables interrupts, and XGM does some processing in vint? // process asynchrone fading if (async) VIntProcess |= PROCESS_PALETTE_FADING; // process fading immediatly else { // disable interrupts to avoid VDP accesses conflict SYS_disableInts(); while (VDP_doStepFading...
by cero
Thu Apr 21, 2016 7:50 am
Forum: SGDK
Topic: XGM driver hangs during fades
Replies: 12
Views: 6644

Re: XGM driver hangs during fades

Taking a closer look, it's not waitVsync(), but just the fade. It happens in multiple emulators. SND_startPlay_XGM(sample); for (i = 0; i < 180; i++) VDP_waitVSync(); // the first time, this short song plays properly VDP_fadeIn(1, 15, intropal, 30, 0); // during the fade, the first note hangs. After...
by cero
Wed Apr 20, 2016 1:49 pm
Forum: SGDK
Topic: XGM driver hangs during fades
Replies: 12
Views: 6644

XGM driver hangs during fades

Whenever there's a fade, or just a loop of "for (i = 0; i < 180; i++) VDP_waitVSync();", the XGM driver just plays one note, as if it's stuck. Known issue? Any workarounds?