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


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

Registered: Jan 2011
Posts: 7
1541-II Emulation

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

Registered: Sep 2003
Posts: 1714
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
Krill

Registered: Apr 2002
Posts: 2839
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
Papademos

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

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.

Example:
A 0300 LDA $1400

Would lead to the address/data bus being:
0300/AD
0301/00
0302/14
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:
0302
0000
0400
1400
..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
Krill

Registered: Apr 2002
Posts: 2839
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
Trasher

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
tlr

Registered: Sep 2003
Posts: 1714
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
Trasher

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
Advanced
Users Online
Scrap/Genesis Project
Menace/Spaceballs
Youth
Guests online: 100
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Logo Graphicians
1 Sander  (10)
2 Facet  (9.7)
3 Mermaid  (9.4)
4 Pal  (9.4)
5 Shine  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.037 sec.