Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in 
CSDb User Forums

Forums > C64 Coding > 1541-II Emulation
2019-09-10 14:04

Registered: Jan 2011
Posts: 7
1541-II Emulation

What does the 6502 receive when reading from unmapped memory?
2019-09-10 14:11

Registered: Sep 2003
Posts: 1391
I would guess that it usually receives what was last on the bus due to the data lines not being driven.

Because there isn't a VIC-II using the bus every other half so it's longer since the bus was driven, maybe there are bit errors in some cases?

Anyone tested this on hw?
2019-09-10 14:44

Registered: Apr 2002
Posts: 1522
Never tested this extensively, but i always saw what was last put on the bus.

That is, the address high-byte, so you see $08 everywhere at $08xx, $09 at $09xx, etc.

A microsecond isn't very long, so i guess bit errors are really rare.
2019-09-10 14:47

Registered: Jan 2011
Posts: 7
Thanks for the quick replies! <3
2019-09-12 02:16

Registered: Sep 2009
Posts: 8
Yo! I guess you are talking about truly unmapped areas, not the mirrored parts.. Assuming so, I still would think there could be other effects depending on the state of things.

A 0300 LDA $1400

Would lead to the address/data bus being:
1400/Z = 14(?!)

Or would it??? The transition from 0302 to 1400 will take us past other combos which in that case can infact cause other things pushed onto the data bus. It wouldn't normally be latched by the CPU but it could probably interfere with the assumed stored MSB (14).

0302 transitioning to 1400 could pass states:
..and more.. but the obvious problem here is that both 0000 and 0400 will keep the SRAM enabled briefly and possibly get something out of those addresses... Well, it's a late night theory anyway. Never tested it myself on real HW, maybe Krill can kill the theory with practical experience? But your examples of reading 0800/0900 wouldn't have the same issue.

time for zzzzZ.. g'nite
2019-09-12 12:33

Registered: Apr 2002
Posts: 1522
Sorry, no practical experience on that one.

Address transition detection circuits weren't a thing back then, apparently, so yeah, could well be that data from such an intermediate address is put on the bus.

A quick check of the 1541 testsuite that VICE uses didn't bring up any tests for that one, whatever that may mean. =)
2019-09-12 18:25

Registered: Sep 2009
Posts: 8
I checked the schematics, so for sure there is a chance those intermediate addresses occur. Depends on the timing of the 6502 address bus.

Even if they do, they will be brief, and not sure the SRAM would even react. Also here depends on timing to the decoder... Practical tests would be interesting though. One of these days/years!

If VICE doesn't test it, there might be an opportunity to tell emu-users from real HW-users.. ;)
2019-09-12 20:25

Registered: Sep 2003
Posts: 1391
But if there is no _CS and/or _OE asserted it doesn't really matter if there is a weird address in there briefly. If that is messed up there will be data contention on the bus during normal operation.

Mind you there is a contention issue on at least some of the drive variants, but only when writing the ROM area. That is a logic problem of always issuing a read to the ROM even if it is a write access.
2019-09-13 00:22

Registered: Sep 2009
Posts: 8
_CS and _OE will be asserted by the decoder, when it sees 0000 and 0400 ... Or in my particular example of going 0302 -> 0000 -> 0400 they would just stay asserted.

Once the address bus reaches the target of 1400 _CS and _OE will be deasserted. 1400 is not mapped at all (even not as a mirror) so the data bus will go Z.

The debate is where the remaining voltage came from. The last stable value seen was 14, but the intermediate addresses 0000 and 0400 are in the SRAM... so if they were there long enough my bet would be the content of 0400 would be on the bus.

I am sure there is contention on that bus all the time, but only briefly so it won't kill any chips.

Offtopic: Funny enough I just compiled your CBM tools, like 20 minutes ago :o I just wish CLD could depack in place and not always use the upper part of memory! /end OT
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Users Online
Dex-D/Airsomjith Class
Radd Maxx/SWIM
Guests online: 97
Top Demos
1 Memento Mori  (9.7)
2 Uncensored  (9.7)
3 Edge of Disgrace  (9.6)
4 Coma Light 13  (9.6)
5 Unboxed  (9.6)
6 Comaland 100%  (9.6)
7 The Shores of Reflec..  (9.6)
8 Lunatico  (9.6)
9 Remains  (9.5)
10 C=Bit 18  (9.5)
Top onefile Demos
1 Cuarentenauta  (9.5)
2 Dawnfall V1.1  (9.5)
3 Listen to Your Eyes  (9.5)
4 Rewind  (9.5)
5 Instinct  (9.5)
6 Daah, Those Acid Pil..  (9.5)
7 Crystal Gazer  (9.5)
8 Smile to the Sky  (9.5)
9 The Tuneful Eight [u..  (9.5)
10 Bad Boy  (9.5)
Top Groups
1 PriorArt  (9.4)
2 Booze Design  (9.4)
3 Censor Design  (9.4)
4 Fossil  (9.4)
5 Performers  (9.3)
Top Graphicians
1 Mirage  (9.7)
2 Archmage  (9.7)
3 Mikael  (9.7)
4 Razorback  (9.7)
5 Electric  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2020
Page generated in: 0.061 sec.