Incorrect DMA code in KOS?
- bogglez
- Moderator
- Posts: 578
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Sun Apr 20, 2014 9:45 am
- Has thanked: 0
- Been thanked: 0
Incorrect DMA code in KOS?
I've compared kos/kernel/arch/dreamcast/hardware/pvr/pvr_dma.c to the official SH4 documentation "Hitachi SuperH RISC engine SH7750 Series SH7750, SH7750S
Hardware Manual" (page 436 of 850) and found the code to write to reserved bits, for example in line 113.
Is this code just incorrect or are the bits used in the DC CPU?

Hardware Manual" (page 436 of 850) and found the code to write to reserved bits, for example in line 113.
Is this code just incorrect or are the bits used in the DC CPU?

Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
-
- DCEmu Crazy Poster
- Posts: 28
- Joined: Wed Apr 23, 2014 3:04 pm
- Has thanked: 0
- Been thanked: 0
Re: Incorrect DMA code in KOS?
you mean shdma[DMAC_CHCR2] = 0x12c1; ?
cant see anything wrong here
on side note... not well known fact - HOLLY-chipset based hardware (DC, NAOMI, etc) uses *NOT* SH4 CPU.
but custom designed chip - SH7091 (HD6417091), sadly there no public available docs for it, we only know it have several (but not all) SH-4A SH7780 extended CPU instructions - FSRRA, FSCA, etc
but there can be more differences with 'regular' SH4, so SH7750's hardware manuals is not really trustable source of information about Dreamcast's CPU.
cant see anything wrong here
on side note... not well known fact - HOLLY-chipset based hardware (DC, NAOMI, etc) uses *NOT* SH4 CPU.
but custom designed chip - SH7091 (HD6417091), sadly there no public available docs for it, we only know it have several (but not all) SH-4A SH7780 extended CPU instructions - FSRRA, FSCA, etc
but there can be more differences with 'regular' SH4, so SH7750's hardware manuals is not really trustable source of information about Dreamcast's CPU.
- BlueCrab
- The Crabby Overlord
- Posts: 5658
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: Incorrect DMA code in KOS?
Actually, I'm pretty sure that all of the SH4 line had the fsca and fsrra instructions (source: GCC mailing list post from a SuperH employee).
-
- DCEmu Crazy Poster
- Posts: 28
- Joined: Wed Apr 23, 2014 3:04 pm
- Has thanked: 0
- Been thanked: 0
Re: Incorrect DMA code in KOS?
well, I've seen two gaming systems with 'regular' SH7750 - Gaelco's ATV Track and Smashing Drive (2x SH7750 + PVR2 NEON250) and Aristokrat MK6 gambling machines (SH7750 + PVR2 NEON250).
both of them doesn't use FSRAA or FSCA opcodes, so I'm pretty sure 7750 haven't them.
I think you misunderstood that employee message, its more likely he meant this instructions is SH4 because DC's custom SH7091 is part of SH4 line/family, and he have this instructions.
but it doesn't mean 'regular' SH7750 SH4 have them
both of them doesn't use FSRAA or FSCA opcodes, so I'm pretty sure 7750 haven't them.
I think you misunderstood that employee message, its more likely he meant this instructions is SH4 because DC's custom SH7091 is part of SH4 line/family, and he have this instructions.
but it doesn't mean 'regular' SH7750 SH4 have them
- BlueCrab
- The Crabby Overlord
- Posts: 5658
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: Incorrect DMA code in KOS?
That is not what that employee said (and what other replies in the thread have also indicated). He clearly said that the SH4 has those opcodes, and GCC/GNU Assembler fully support using them on SH4 (not just SH4A) targets.
A later reply in the thread also confirms that the entire SH4 line has the opcodes, but that they were only majorly tested on the SH7750 (as a "customer" requested them).
A later reply in the thread also confirms that the entire SH4 line has the opcodes, but that they were only majorly tested on the SH7750 (as a "customer" requested them).
-
- DC Developer
- Posts: 414
- Joined: Thu Aug 20, 2009 11:00 am
- Has thanked: 0
- Been thanked: 2 times
- BlueCrab
- The Crabby Overlord
- Posts: 5658
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: Incorrect DMA code in KOS?
Those would be fsrra and fsca. They've been supported in GNU Assembler for a while (about 10 years or so, IIRC).Chilly Willy wrote:Does gas support the known DC-SH4 opcodes?
EDIT: Make that about 12 and a half years (source)...
-
- DCEmu Crazy Poster
- Posts: 28
- Joined: Wed Apr 23, 2014 3:04 pm
- Has thanked: 0
- Been thanked: 0
Re: Incorrect DMA code in KOS?
it depends on definition of term "SH4"BlueCrab wrote:That is not what that employee said (and what other replies in the thread have also indicated). He clearly said that the SH4 has those opcodes, and GCC/GNU Assembler fully support using them on SH4 (not just SH4A) targets.
as far as I know there no some specific "SH4" chip, it is family of MCUs, often very different.
can you please point this message ? about it was tested (using some 7750 dev board ?)BlueCrab wrote: A later reply in the thread also confirms that the entire SH4 line has the opcodes, but that they were only majorly tested on the SH7750 (as a "customer" requested them).
- BlueCrab
- The Crabby Overlord
- Posts: 5658
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: Incorrect DMA code in KOS?
https://gcc.gnu.org/ml/gcc-patches/2005 ... 01176.htmlMetalliC wrote:can you please point this message ? about it was tested (using some 7750 dev board ?)BlueCrab wrote: A later reply in the thread also confirms that the entire SH4 line has the opcodes, but that they were only majorly tested on the SH7750 (as a "customer" requested them).
Note: This is speaking of "internal" testing (i.e, during the actual development process at the company making the CPU -- not on random development boards after the CPU design was finalized and produced).