6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon Apr 29, 2024 2:35 am

All times are UTC




Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Sat Nov 18, 2023 8:28 am 
Offline

Joined: Wed Mar 02, 2016 12:00 pm
Posts: 343
Someone was trying to figure out what the flash sequence means, and according to my old notes this is what happens:

----chop-chop-----

The 8050 routine is slightly different. First, its not as condensed as the one from the 2040. For example, the original starts with an LDX #$FF, uses this, then does an INX and uses that before going into the zeropage testing. The 8050 routine does the same, but then it uses a LDX #0 which is completely unnecessary to put X into zero.

As for the zero page testing, the 8050 routine starts the same way by filling the zero page with $00 to $ff. It then deviates from the 2040 routine by comparing the filled bytes with the same value (checking them by reading once) before it increases it, compares it again and compares that same value with the next byte. If its not the same, it would look back and increase that byte (like in the original code) and loop through it until it reaches $ff. Now, the 8050 code compares two bytes that are equal, so the lookback never happens (this was so stupid, I had to recompile this code and look on it with a debugger to be certain of how stupid it was). After that fail, the code adds zero to it, compares it again... then stores zero into the zero page location, compares that with a zero and loops.

So the Zero page testing is buggy in the 8050. Its does check the content of the bytes, but only with zero and two values, so not a good check. Well... anyway, the code continues.

The next is the ROM test routine which in the 8050 tests 32 pages (not 16) which kind of makes sense.. since its a 8KiB ROM.

The original (2040) starts testing from $FF00-$FFFF, then subtracts the MSB with one for each cycle and counts down to $D0... meaning the last ROM location to be tested was $D000 (so it tests 4KiB * 3 =12 KiB). The 901482-07 counts down to $C000, so it tests 16KiB which corresponds to the location of 901482-07 and 901482-06.

With regard to the number of flashes, the original (2040) would flash 2,3 or 4 according to which 4KiB ROM that had an error. In the 901482-07, this is either 2 or 3 flashes as it only tests two 8KiB roms. That is probably why the manual says that 4 flashes is an unused error code in the 8050: It was originally made for testing 3pcs of 4KiB ROMs, not 2pcs of 8KiB ROMS.

The original disassembly then accesses a RAM location, waits a litte and checks that location for a zero. If its not zero, it results in 5 flashes. I am not sure what location or what content it tries to poke, but probably a 6530 control register.

The 8050 test code does not do this. This is kind of confusing since the manual says that it will show 5 flashes if there is an error with "Zero Page" corresponding to the 6530 or 6502... I can say for certain that if the program reaches this point, there is nothing wrong with the 6502, and for the 8050 this has nothing to do with the 6530 either. Instead the 8050 ROM code goes directly into RAM testing which results in misnumbered error codes.

Thus RAM testing will give the following number of flashes for the 2040 and 8050 code:
Code:
RAM test range      2040 flashes      8050 flashes
$1000-$13FF         6               4
$2000-$23FF         7               5
$3000-$33FF         8               6
$4000-$43FF         9               7


So this is not according to the 8050 service manual which states the same number of flashes as the 2040.

After the RAM test, the 2040 code does all kinds of register manipulations which are probably the testing of the controller ROM as stated in the manual. At a point it will increase the flash counter to 10 flashes, so my guess is that the manual is ok.

The 8050 on the other hand does not seem to get there. I can't be sure that this isn't in some completely different part (maybe even in the other ROM), but I could not find it.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: