MD-NICCC - a 3D Mega Drive experience by TiTAN

Announce (tech) demos or games releases

Moderator: Mask of Destiny

Chilly Willy
Very interested
Posts: 2754
Joined: Fri Aug 17, 2007 9:33 pm

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by Chilly Willy » Fri May 10, 2019 8:14 pm

Yeah, what I said was a bit ambiguous, so I don't blame you for the confusion. That web page on 65xx timing was awesome! Bookmarked. :D

As demonstrated on that page, read/write cycles take one cycle, but the 6502 isn't a single cycle processor, which is why I said that despite taking one cycle to read data from a rom, it can't read data EVERY cycle, making that speed moot. Then there's also the issue that the MD can use DMA to read data from the rom, and it doesn't actually access the rom the same way (or at the same speed) as the 68000. So there's more to it than just processor access times.

User avatar
Sik
Very interested
Posts: 860
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by Sik » Fri May 10, 2019 10:02 pm

It's even messier with the 65816:
http://forum.6502.org/viewtopic.php?f=4&t=2438

On top of that… let's not forget about the operands. The fastest instructions on 68000 that access memory are 8 cycles (4 to read opcode, 4 to read/write a word). Not sure what it is on 65816, but from what I recall pretty much all its memory instructions take extra operands (save the stack ones, I think?), so they need to be read on top of the value being accessed… and then there's the part where all these comparisons go to hell even when accounting for clock speed, because the instruction set itself gets in the way (65816 is a lot more verbose generally requiring more instructions to achieve the same thing than 68000).

And yeah, when it comes to DMA none of that matters as that does its own thing (kind of the whole point of DMA). SNES DMA speed is roughly comparable to Mega Drive DMA in H32 mode. The main catch is that access to video memory outside blank is asking for trouble on the SNES, while it just slows down on Mega Drive (so the latter gets room to stream in some more tiles if doing a huge DMA, think about 100 more or so before the next vblank kicks in). Of course you still want to avoid the slow down because that eats lots of CPU time, but if you'll just spend that time waiting you may as well take it.
Sik is pronounced as "seek", not as "sick".

User avatar
Miquel
Very interested
Posts: 441
Joined: Sat Jul 30, 2016 12:33 am

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by Miquel » Sat May 11, 2019 9:05 am

TmEE co.(TM) and Stef, If that’s to be believed:
http://laughtonelectronics.com/Arcana/V ... iming.html
data bus is in use by two cycles.

By reading earlier you are only imposing more speed on RAM.

In other words, can you read a byte per cycle? Is NOP a single cycle instruction?

User avatar
Miquel
Very interested
Posts: 441
Joined: Sat Jul 30, 2016 12:33 am

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by Miquel » Sat May 11, 2019 10:18 am

Oh! There is no instruction prefech on the 65c816, now this makes sense. So this is really a read cycle of one cycle.

User avatar
Miquel
Very interested
Posts: 441
Joined: Sat Jul 30, 2016 12:33 am

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by Miquel » Mon May 13, 2019 12:41 pm

Stef wrote:
Fri May 10, 2019 2:11 pm
No, the 7.67 Mhz 68000 is actually *slower* than the 2.68 Mhz 65C816 at accessing memory...
Chilly Willy wrote:
Fri May 10, 2019 2:27 pm
However, the 65xx cannot transfer memory on every clock, so that's moot.
Stef is correct, 65816 transfers 1 byte per 1 cycle, non-stop if needed, no problem.
Chilly Willy wrote:
Fri May 10, 2019 2:27 pm
You have to remember that the 68000 takes multiple clock cycles to access memory (generally 4 clocks), while 65xx variants take 1 cycle.
Actually is 3 cpu cycles per read/write cycle, and then at least an extra is needed cycle to store data somewhere in case of read, or anyway a micro-instruction is always 2 cycles, so at the end is always 4 cycles. Add 2n more cycles if the cpu operation is delayed. But the proper read/write cycle is 3 cpu cycles, could it be significative for DMA speed?
Stef wrote:
Fri May 10, 2019 2:11 pm
it's why the 65C816 can work at 2 speeds, fast memory (ROM) were too expensive in 1990 so they voluntary limited it to 2.68 Mhz to reduce cost on RAM (which is fixed to work at 2.68 Mhz) and to maintain acceptable cost on ROM too (while leaving possibility to increase ROM speed later when chips would become cheapers).
I'm not sure about that, the thing is that the increment of speed is only working on the second half of the memory mapping. That sounds to me like they use to many levels of glue logic at the addressing decoding to be compatible with nes (at first), which is situated on the first half, and that effected memory speed. Snes is a very neat design overall except the mapping, witch is simply nasty.

User avatar
Sik
Very interested
Posts: 860
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by Sik » Mon May 13, 2019 7:01 pm

Miquel wrote:
Mon May 13, 2019 12:41 pm
Actually is 3 cpu cycles per read/write cycle, and then at least an extra is needed cycle to store data somewhere in case of read, or anyway a micro-instruction is always 2 cycles, so at the end is always 4 cycles. Add 2n more cycles if the cpu operation is delayed. But the proper read/write cycle is 3 cpu cycles, could it be significative for DMA speed?
1) VDP has a complete disregard for paying attention to signals for memory accesses
2) That has actually caused trouble back then
Miquel wrote:
Mon May 13, 2019 12:41 pm
I'm not sure about that, the thing is that the increment of speed is only working on the second half of the memory mapping. That sounds to me like they use to many levels of glue logic at the addressing decoding to be compatible with nes (at first), which is situated on the first half, and that effected memory speed. Snes is a very neat design overall except the mapping, witch is simply nasty.
The NES clock speed is used for the I/O ports (controller comes to mind) but not for the slow ROM area. There's definitely some weird mess which looks like the outcome of an early attempt at compatibility, but I don't think the way slow vs fast ROM works is one of those. Splitting clock speed by address range was probably just an easy way to determine what speed to use.
Sik is pronounced as "seek", not as "sick".

User avatar
Miquel
Very interested
Posts: 441
Joined: Sat Jul 30, 2016 12:33 am

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by Miquel » Tue May 14, 2019 11:56 am

Sik wrote:
Mon May 13, 2019 7:01 pm
1) VDP has a complete disregard for paying attention to signals for memory accesses
Are you saying DTACK signal (and his companion, I don't remember the name) is ignored ?

That's hard to believe.

User avatar
Sik
Very interested
Posts: 860
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by Sik » Tue May 14, 2019 8:05 pm

It is :​D (which also means DMA will not hang on areas where the 68000 usually would) It seems they just assumed DMA would only be used with memory that would always respond in time.
Sik is pronounced as "seek", not as "sick".

User avatar
Miquel
Very interested
Posts: 441
Joined: Sat Jul 30, 2016 12:33 am

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by Miquel » Wed May 15, 2019 12:25 pm

That’s like ignoring the father of all signals, what you say is truly reality breaking.

I just booked it in my “to do” list to study and resolve once for all this affair.

User avatar
TmEE co.(TM)
Very interested
Posts: 2360
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by TmEE co.(TM) » Wed May 15, 2019 9:56 pm

VDP is what generates the !DTACK *for* 68K. During DMA the 68K is in bus requested state so that signal has no meaning of any sort.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Chilly Willy
Very interested
Posts: 2754
Joined: Fri Aug 17, 2007 9:33 pm

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by Chilly Willy » Thu May 16, 2019 2:23 pm

TmEE co.(TM) wrote:
Wed May 15, 2019 9:56 pm
VDP is what generates the !DTACK *for* 68K. During DMA the 68K is in bus requested state so that signal has no meaning of any sort.
Indeed. Think of it like the 68000's wait control rather than a vital bus control signal independent of the 68000.

User avatar
Miquel
Very interested
Posts: 441
Joined: Sat Jul 30, 2016 12:33 am

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by Miquel » Fri May 17, 2019 9:13 pm

I haven't check how the VPD works but judging by how the 68k does: VDP has to signal !BR (bus request) and wait for !BG (bus grand); the same when Z80 access main memory.

Also !DTACK could be used to put the cpu in a wait state, the problem is the address bus is being used by the cpu while !DTACK is low.

User avatar
TmEE co.(TM)
Very interested
Posts: 2360
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by TmEE co.(TM) » Sat May 18, 2019 7:39 pm

It can only be used in ranges where VDP doesn't generate it for you such as 800000...9FFFFF. This area is used by 32X and SVP for example. You cannot forcibly override !DTACK since VDP actively drives it on most accesses.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

User avatar
HardWareMan
Very interested
Posts: 727
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by HardWareMan » Sun May 19, 2019 5:00 pm

TmEE co.(TM) wrote:
Sat May 18, 2019 7:39 pm
It can only be used in ranges where VDP doesn't generate it for you such as 800000...9FFFFF. This area is used by 32X and SVP for example. You cannot forcibly override !DTACK since VDP actively drives it on most accesses.
There is also A14000...BFFFFF without !DTACK.

User avatar
Sik
Very interested
Posts: 860
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: MD-NICCC - a 3D Mega Drive experience by TiTAN

Post by Sik » Sun May 19, 2019 5:29 pm

$A14xxx has the TMSS-related ports (on systems with TMSS, that is).
Sik is pronounced as "seek", not as "sick".

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot] and 2 guests