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
Account closed

Registered: Jan 2011
Posts: 8
1541-II Emulation

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

Registered: Sep 2003
Posts: 1790
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: 2980
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
Account closed

Registered: Jan 2011
Posts: 8
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: 2980
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: 1790
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
Rub_0201
Fred/Channel 4
YPS
Jason/Antic
ged/Samar
Hagar/The Supply Team
Guests online: 110
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Party Elk 2  (9.6)
4 Cubic Dream  (9.6)
5 Copper Booze  (9.6)
6 Rainbow Connection  (9.5)
7 Dawnfall V1.1  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Fullscreen Graphicians
1 Joe  (9.7)
2 Sulevi  (9.6)
3 The Sarge  (9.6)
4 Veto  (9.6)
5 Facet  (9.6)

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