Question about B31 (aka #TIME) cart pin

For hardware talk only (please avoid ROM dumper stuff)
Post Reply
doragasu
Very interested
Posts: 125
Joined: Tue Oct 09, 2012 8:15 am

Question about B31 (aka #TIME) cart pin

Post by doragasu » Sun Oct 04, 2015 5:55 pm

I have read here that B31 (#TIME) line is active (low) on accesses to 0xA13000 -> 0xA130FF range. Is this true?

Could I wire this #TIME line to a battery backed 256 byte SRAM chip #CE signal, and use it to save/load games without conflicting with the ROM chips? (of course also A1~A8, D0~D7 and #LDSW would be wired to the SRAM chip).

If true, should I also wire to the SRAM the #C_OE (B16) line too? Or is this line only active on 000000~3FFFFF accesses?

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

Re: Question about B31 (aka #TIME) cart pin

Post by HardWareMan » Tue Oct 06, 2015 4:13 am

doragasu wrote:Could I wire this #TIME line to a battery backed 256 byte SRAM chip #CE signal, and use it to save/load games without conflicting with the ROM chips?
Yes.
doragasu wrote:If true, should I also wire to the SRAM the #C_OE (B16) line too?
No.

Eke
Very interested
Posts: 884
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Re: Question about B31 (aka #TIME) cart pin

Post by Eke » Tue Oct 06, 2015 6:42 am

Also, it's only 128 bytes if you only use /LWR and D0-D7. Only A1-A7 can be used, not A8 since /TIME is not asserted for $A131xx.

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Question about B31 (aka #TIME) cart pin

Post by Sik » Wed Oct 07, 2015 2:57 am

Couldn't you use that as A0, though? IIRC this is how Z80 RAM gets mapped (at the expense of requiring all accesses to be 8-bit).
Sik is pronounced as "seek", not as "sick".

Eke
Very interested
Posts: 884
Joined: Wed Feb 28, 2007 2:57 pm
Contact:

Re: Question about B31 (aka #TIME) cart pin

Post by Eke » Wed Oct 07, 2015 11:21 am

Sik wrote:Couldn't you use that as A0, though?
Use what ?
Sik wrote: IIRC this is how Z80 RAM gets mapped (at the expense of requiring all accesses to be 8-bit).
AFAIK, Z80 A0 is asserted by the bus arbiter based on the /LDS and /UDS signals from 68k.
These signals are not available on the cartridge port, only /LWR and /UWR which are only asserted for writes.
For reading 256 bytes, you need 16-bit SRAM and use D0-D15.

doragasu
Very interested
Posts: 125
Joined: Tue Oct 09, 2012 8:15 am

Re: Question about B31 (aka #TIME) cart pin

Post by doragasu » Wed Oct 07, 2015 3:06 pm

Thanks for the replies!

Just to complete the topic, is there detailed information about the timing of this signal? Is it asserted the same time as e.g. #C_CE?

doragasu
Very interested
Posts: 125
Joined: Tue Oct 09, 2012 8:15 am

Re: Question about B31 (aka #TIME) cart pin

Post by doragasu » Thu Nov 12, 2015 2:56 pm

I have another question about mapping things using #TIME signal.

Do I have to assert the #DTACK signal for data reads? IFAIK this is not needed for logic mapped under the first 32 Mib address range, but I was wondering if I'll experiment a hardware lock or any other undesired effect if reading from #TIME address range without generating a valid #DTACK.

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

Re: Question about B31 (aka #TIME) cart pin

Post by TmEE co.(TM) » Fri Nov 13, 2015 4:40 am

!DTACK is generated in the !TIME range. You can only generate !DTACK for the machine in 8...10MByte range (like 32X does). Rest of the range is handled by the VDP already.
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

doragasu
Very interested
Posts: 125
Joined: Tue Oct 09, 2012 8:15 am

Re: Question about B31 (aka #TIME) cart pin

Post by doragasu » Fri Nov 13, 2015 8:04 am

Thanks!

I just wanted to make sure.

doragasu
Very interested
Posts: 125
Joined: Tue Oct 09, 2012 8:15 am

Re: Question about B31 (aka #TIME) cart pin

Post by doragasu » Sat Jan 09, 2016 1:17 pm

I was wondering if #TIME signal behaves exactly like a #CE or has other behaviour that justifies its weird name, so I wired a cheap 8 Channel, 24 MHz logic analyzer and soldered some wires. Then made a program that continuously reads 0xA13CA. I was surprised by the result, to the point that I'm wondering if I made a mistake on the wiring:

Image

The first read in the #TIME range looks OK, but for the second read, #OE signal is not lowered... is this OK? Why?

doragasu
Very interested
Posts: 125
Joined: Tue Oct 09, 2012 8:15 am

Re: Question about B31 (aka #TIME) cart pin

Post by doragasu » Sat Jan 09, 2016 3:51 pm

I have changed the program to write to 0xA130CE, and then read from the same address to a variable, and... mystery solved!:

Image

I was wrongly assuming that when writing to even addresses, #LDSW was active, but it is #UDSW line the one that is lowered! In the upper capture can be seen a write to #TIME range, then a write to internal RAM (I presume) and then a read to #TIME range, and this is repeated forever. Looks good to me, and it looks like #TIME signal behaves like a normal #CE signal :)

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

Re: Question about B31 (aka #TIME) cart pin

Post by HardWareMan » Sat Jan 09, 2016 5:49 pm

doragasu wrote:it looks like #TIME signal behaves like a normal #CE signal :)
And why it shouldn't?

doragasu
Very interested
Posts: 125
Joined: Tue Oct 09, 2012 8:15 am

Re: Question about B31 (aka #TIME) cart pin

Post by doragasu » Sat Jan 09, 2016 6:27 pm

It's just the weird name that made me suspect... Why is it called #TIME and not something like #CEX?

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

Re: Question about B31 (aka #TIME) cart pin

Post by HardWareMan » Sat Jan 09, 2016 7:31 pm

doragasu wrote:It's just the weird name that made me suspect... Why is it called #TIME and not something like #CEX?
Because it is select some timer, I guess. Maybe some add-on. In fact, it is !CS for $A130xx region.

Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: Question about B31 (aka #TIME) cart pin

Post by Sik » Mon Jan 11, 2016 12:10 am

One of the theories is that they may have planned for some early software to include a RTC that would be accessed through this port (hence "time", since it's related to time keeping). Given how early on Sega insisted on treating the console like a computer as well (at least when the modem was involved), I wouldn't be surprised.
Sik is pronounced as "seek", not as "sick".

Post Reply