If anyone's interested, here's my take on the "timeout and checksum" approach:
https://github.com/viciious/d32xr/blob/ ... shw.c#L873
https://github.com/viciious/d32xr/blob/ ... t0.s#L3252
Search found 32 matches
Re: Super VDP
Yes, checksumming on the MD's 68000 is going to be slow, unless you incorporate checksums into your data in a pre-processing step.
Stupid Sega didn't think of a "FIFO empty" flag. The "FIFO full" flag alone isn't terribly useful..
Stupid Sega didn't think of a "FIFO empty" flag. The "FIFO full" flag alone isn't terribly useful..
Re: Super VDP
Note that this only works in cases where the main CPU is kept off the bus and is waiting in the hot loop for the DMA to complete. Otherwise, you're still going to get data loss and/or corruption. If you want to perform DMA transfer without halting the CPU, here's what I found works at least to a ...
Re: Super VDP
On page 240 of the manual it's said that "To clear the TE bit, read 1 from it and then write 0." <- it wants you to clear the bit, not the whole register. At least that's what we assume it wants based on how real hardware seems to work 

Re: Super VDP
In the end, Chilly Willy was able to get DREQ DMA to work by changing his code from this:
SH2_DMA_CHCR0; // read TE
SH2_DMA_CHCR0 = 0; // clear TE
SH2_DMA_DAR0 = 0x20000000 | (int)&data[0];
SH2_DMA_TCR0 = j;
SH2_DMA_CHCR0 = 0x44E1; // set DMA control mode - start DMA
MARS_SYS_COMM0 = 0x0003 ...
SH2_DMA_CHCR0; // read TE
SH2_DMA_CHCR0 = 0; // clear TE
SH2_DMA_DAR0 = 0x20000000 | (int)&data[0];
SH2_DMA_TCR0 = j;
SH2_DMA_CHCR0 = 0x44E1; // set DMA control mode - start DMA
MARS_SYS_COMM0 = 0x0003 ...
Re: DMA DEI
Chilly's sound driver uses DMA end interrupts to pass data to the PWM: http://gendev.spritesmind.net/forum/viewtopic.php?t=1253 , so we do know that setting the 2-nd bitflag in CHCR works on real hardware. Alas, Gens indeed doesn't support this feature, hence no sound effectx in Doom 32X ...
- Sun Jun 11, 2023 6:50 pm
- Forum: Announcement
- Topic: New 32x game in development!
- Replies: 101
- Views: 630588
Re: New 32x game in development!
Some nice little discussion there! And thanks for the shout-out 

- Wed Apr 19, 2023 4:25 pm
- Forum: Super 32X
- Topic: Runtime issues with built d32xr
- Replies: 1
- Views: 9293
Re: Runtime issues with built d32xr
You should use WAD file from the D32XR ROM, the one from JagDoom isn't guaranteed to work at all.
- Sat Feb 18, 2023 7:09 pm
- Forum: Announcement
- Topic: New 32x game in development!
- Replies: 101
- Views: 630588
Re: New 32x game in development!
Number of characters * character width, which I assume must be 8matthewnimmo wrote: Sat Feb 18, 2023 5:05 pm How do I gather the overall with of msx or any font for that matter?
- Sat Feb 18, 2023 11:18 am
- Forum: Announcement
- Topic: New 32x game in development!
- Replies: 101
- Views: 630588
Re: New 32x game in development!
a) the best way to do something is usually the one that works. your code looks fine to me
b) the stride that you pass for the msx font is most likely wrong. the stride has to encompass all horizontal pixels of the image/spritesheet, it can't be 8
b) the stride that you pass for the msx font is most likely wrong. the stride has to encompass all horizontal pixels of the image/spritesheet, it can't be 8
- Mon Feb 06, 2023 8:05 am
- Forum: Announcement
- Topic: New 32x game in development!
- Replies: 101
- Views: 630588
Re: New 32x game in development!
Change your drawing code to the following:
int crop_x, crop_y, crop_width, crop_height;
crop_height = 32;
crop_width = 32;
crop_y = 4;
crop_x = 4;
int src_width = 320;
unsigned char *src = (unsigned char*)(sprite_sheet + crop_y * src_width + crop_x);
draw_sprite(npc_sprite_currentX ...
int crop_x, crop_y, crop_width, crop_height;
crop_height = 32;
crop_width = 32;
crop_y = 4;
crop_x = 4;
int src_width = 320;
unsigned char *src = (unsigned char*)(sprite_sheet + crop_y * src_width + crop_x);
draw_sprite(npc_sprite_currentX ...
- Sun Feb 05, 2023 8:40 am
- Forum: Announcement
- Topic: New 32x game in development!
- Replies: 101
- Views: 630588
Re: New 32x game in development!
I've added support for custom stride to my sprite drawing routines. Check out the new function prototypes in draw.h, usage example - in main.c. Cheers!
- Sat Feb 04, 2023 9:32 am
- Forum: Announcement
- Topic: New 32x game in development!
- Replies: 101
- Views: 630588
Re: New 32x game in development!
As of now, the drawing routines in yatssd do not support arbitary stride/pitch for sprites. The stride would need to be passed as a new field in drawsprcmd_t and the routines in draw_inc.h would have to take it into account.
- Mon Sep 12, 2022 6:48 pm
- Forum: Super 32X
- Topic: Yet Another Tilemap and Super Scaler Demo
- Replies: 20
- Views: 48081
Re: Yet Another Tilemap and Super Scaler Demo
Let's say, my font binary files attached below. Here is a palette data:
$000,$EEE,$000,$EA0,$46C,$04E,$EEE,$EEE,$02A,$CCC,$68E,$AAC,$EEA,$AAC,$EC2,$EC6
What should I change in the d32xr/src-md/crt0.s text to make load_font refer to the attached files instead of assembly code, and where is the ...
- Fri Sep 09, 2022 4:05 pm
- Forum: Super 32X
- Topic: Yet Another Tilemap and Super Scaler Demo
- Replies: 20
- Views: 48081
Re: Yet Another Tilemap and Super Scaler Demo
Yes, along with put_chr, xvprintf, dbug_queue, etc