Previous Thread
Next Thread
Print Thread
Page 3 of 8 1 2 3 4 5 6 7 8
Joined: Feb 2020
Posts: 4
A
Member
Offline
Member
A
Joined: Feb 2020
Posts: 4
Correct files of dump are sent. Once again, sorry for mistake.

Artiom #120417 01/25/22 06:32 PM
Joined: Feb 2014
Posts: 796
Likes: 24
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 796
Likes: 24
No worries!

Thanks for the updated dump, Artiom.

I'm trying to make sense of it. I always thought that the CPU on the Imagewriter II was a upd7810, looking at the computerfacts schematic, since it seems to line up pretty closely to the pins of a upd7810. They label it as an "EC-A056" and it has a 64 pin QIP.

I run unidasm on it


./unidasm -arch upd7810 ImageWriter2_new.bin | less

and everything looks mostly sane, except for the illegal instructions.


Code

0000: ba           DI      
0001: ba           DI      
0002: 68 ff        MVI     V,$FF
0004: 48 ad        illegal 
0006: 4e 24        JRE     $002C
0008: ba           DI      
0009: b0           PUSH    VA
000a: b1           PUSH    BC
000b: b2           PUSH    DE
000c: b3           PUSH    HL
000d: 54 f2 25     JMP     $25F2
0010: ba           DI      
0011: b0           PUSH    VA
0012: b1           PUSH    BC
0013: b2           PUSH    DE
0014: b3           PUSH    HL
0015: 54 30 1b     JMP     $1B30
0018: ba           DI      
0019: b0           PUSH    VA
001a: b1           PUSH    BC
001b: b2           PUSH    DE
001c: b3           PUSH    HL
001d: 54 0a 1b     JMP     $1B0A
0020: ff           JR      $0020
0021: ff           JR      $0021
0022: ff           JR      $0022
0023: ff           JR      $0023
0024: ff           JR      $0024
0025: ff           JR      $0025
0026: ff           JR      $0026
0027: ff           JR      $0027
0028: ba           DI      
0029: 54 02 21     JMP     $2102
002c: 68 ff        MVI     V,$FF
002e: 69 00        MVI     A,$00
0030: 70 79 72 fe  MOV     ($FE72),A
0034: 34 00 fe     LXI     HL,$FE00
0037: 3d           STAX    (HL+)
0038: 32           INX     HL
0039: 3d           STAX    (HL+)
003a: 32           INX     HL
003b: 3b           STAX    (HL)
003c: 70 79 06 fe  MOV     ($FE06),A
0040: 4d d2        MOV     MA,A
0042: 69 20        MVI     A,$20
0044: 4d d4        MOV     MC,A
0046: 69 0f        MVI     A,$0F
0048: 4d d1        MOV     MCC,A
004a: 69 00        MVI     A,$00
004c: 4d d3        MOV     MB,A
004e: 64 02 c0     MVI     PC,$C0
0051: 69 08        MVI     A,$08
0053: 4d e5        illegal 
0055: 64 00 0c     MVI     PA,$0C
0058: 5f b2        BIT     7,VV:B2


Looking at the opcodes it says are illegal

Code
./unidasm -arch upd7810 ImageWriter2_new.bin | grep 'illegal'
0004: 48 ad        illegal 
0053: 4d e5        illegal 
00a6: 73           illegal 
01fd: 4c ce        illegal 
0202: 4c ce        illegal 
0273: 64 ce        illegal 
0632: 06           illegal 
06ea: 4c ce        illegal 
06ef: 4c ce        illegal 
06fa: 48 aa        illegal 
0750: 64 ce        illegal 
0ad6: 4c ce        illegal 
0adb: 4c ce        illegal 
0b63: 4c ce        illegal 
0b69: 48 aa        illegal 
0b6f: 4c ce        illegal 
0b74: 4c ce        illegal 
0b83: 4c ce        illegal 
0b8b: 48 aa        illegal 
0b91: 4c ce        illegal 
0b9b: 48 aa        illegal 
0f8a: 64 ca        illegal 
13de: 48 aa        illegal 
144d: 70 a8        illegal 
17ec: 06           illegal 
17ee: 06           illegal 
1c19: 06           illegal 
20f8: 06           illegal 
2102: 48 ad        illegal 
2133: 48 ad        illegal 
26d2: 4c 4f        illegal 
26fc: 28           illegal 
2706: 28           illegal 
271b: 4d 3d        illegal 
272d: 4c 4f        illegal 
28c6: 06           illegal 
28d6: 28           illegal 
2c43: 4d 2d        illegal 
2c5d: 06           illegal 
2ffd: 4c b8        illegal 
3dd9: 28           illegal 
3f71: 06           illegal 
3f96: 60 5f        illegal 


Found some things that look like stepper motor code:

Code
201d: 34 33 20     LXI     HL,$2033
2020: ac           LDAX    (HL+A)
2021: 1f           MOV     L,A
2022: 4c c0        MOV     A,PA
2024: 07 f0        ANI     A,$F0
2026: 60 9f        ORA     A,L
2028: 4d c0        MOV     PA,A
202a: 70 79 01 fe  MOV     ($FE01),A
202e: 70 79 73 fe  MOV     ($FE73),A
2032: b8           RET     
// stepper motor pattern here
2033: 0c           MOV     A,D
2034: 0d           MOV     A,E
2035: 09           MOV     A,EAL
2036: 0b           MOV     A,C
2037: 03           DCX     SP
2038: 07 06        ANI     A,$06
203a: 0e           MOV     A,H


206d: 34 7f 20     LXI     HL,$207F
2070: ac           LDAX    (HL+A)
2071: 1f           MOV     L,A
2072: 4c c1        MOV     A,PB
2074: 07 cf        ANI     A,$CF
2076: 60 9f        ORA     A,L
2078: 4d c1        MOV     PB,A
207a: 70 79 05 fe  MOV     ($FE05),A
207e: b8           RET     
// stepper motor pattern here
207f: 10           EXA     
2080: 30 20        DCRW    VV:20
2082: 00           NOP     


20e5: 34 f7 20     LXI     HL,$20F7
20e8: ac           LDAX    (HL+A)
20e9: 1f           MOV     L,A
20ea: 4c c1        MOV     A,PB
20ec: 07 f0        ANI     A,$F0
20ee: 60 9f        ORA     A,L
20f0: 4d c1        MOV     PB,A
20f2: 70 79 03 fe  MOV     ($FE03),A
20f6: b8           RET     
// stepper motor pattern here
20f7: 03           DCX     SP
20f8: 06           illegal 
20f9: 0c           MOV     A,D
20fa: 09           MOV     A,EAL


There's a lot of accesses to the $FExx range, I wonder if that goes to the gate array chip
Code
1b30: b4           PUSH    EA
1b31: 70 69 61 fe  MOV     A,($FE61)
1b35: 57 01        OFFI    A,$01
1b37: 70 79 6c fe  MOV     ($FE6C),A
1b3b: 57 02        OFFI    A,$02
1b3d: 70 79 6d fe  MOV     ($FE6D),A
1b41: 57 04        OFFI    A,$04
1b43: 70 79 6e fe  MOV     ($FE6E),A
1b47: 57 08        OFFI    A,$08
1b49: 70 79 6f fe  MOV     ($FE6F),A
1b4d: 70 79 07 aa  MOV     ($AA07),A

Joined: Feb 2014
Posts: 796
Likes: 24
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 796
Likes: 24
I wonder if it could be a upd7807?

Code
 ./unidasm -arch upd7807 ImageWriter2_new.bin | grep 'illegal'
005a: 5a e1        MOV     illegal,7,CY
00a0: 5d 27        SK      illegal,1
00a6: 73           illegal 
011e: 5d 61        SK      illegal,3
0125: 5d e1        SK      illegal,7
012b: 5f 41        MOV     CY,illegal,2
012d: 5a 66        MOV     illegal,3,CY
013e: 58 c6        SETB    illegal,6
0144: 58 a6        SETB    illegal,5
0146: 5d 66        SK      illegal,3
0164: 58 63        SETB    illegal,3
0173: 58 09        SETB    illegal,0
0179: 58 29        SETB    illegal,1
0184: 58 69        SETB    illegal,3
018d: 5b a6        CLR     illegal,5
018f: 58 c6        SETB    illegal,6
01a5: 5d c6        SK      illegal,6
01e0: 5f c6        MOV     CY,illegal,6
01e2: 5c 69        OR      CY,illegal,3
022d: 58 e3        SETB    illegal,7
0232: 50 e3        SKN     illegal,7
0271: 58 85        SETB    illegal,4
0276: 58 a5        SETB    illegal,5
0279: 5d 63        SK      illegal,3
027c: 58 03        SETB    illegal,0
027e: 58 43        SETB    illegal,2
0294: 5b 25        CLR     illegal,1
0296: 5b 05        CLR     illegal,0
0298: 5b 06        CLR     illegal,0

[Linked Image from i.imgur.com]
[Linked Image from i.imgur.com]

Joined: Feb 2014
Posts: 796
Likes: 24
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 796
Likes: 24
If I look at some of the code and interpret it as 7807 code, I think it would make sense

Code
002c: 68 ff        MVI     V,$FF
002e: 69 00        MVI     A,$00
0030: 70 79 72 fe  MOV     ($FE72),A
0034: 34 00 fe     LXI     HL,$FE00
0037: 3d           STAX    (HL+)
0038: 32           INX     HL
0039: 3d           STAX    (HL+)
003a: 32           INX     HL
003b: 3b           STAX    (HL)
003c: 70 79 06 fe  MOV     ($FE06),A
0040: 4d d2        MOV     MA,A
0042: 69 20        MVI     A,$20
0044: 4d d4        MOV     MC,A
0046: 69 0f        MVI     A,$0F
0048: 4d d1        MOV     MCC,A
004a: 69 00        MVI     A,$00
004c: 4d d3        MOV     MB,A
004e: 64 02 c0     MVI     PC,$C0
0051: 69 08        MVI     A,$08
0053: 4d e5        MOV     MT,A
0055: 64 00 0c     MVI     PA,$0C
0058: 5f b2        MOV     CY,PC,5      <<< get PC bit 5 and put into CY
005a: 5a e1        MOV     illegal,7,CY     <<< says that this is illegal but it would put CY into VV:01 bit 7
005c: 6b 07        MVI     C,$07

Looking at how one of the opcodes gets handled:

Code
/* 5d: 0101 1111 bbbb bbbb (7807 only) */
void upd7810_device::SK_bit()
{
        uint8_t imm;
        int val;

        RDOPARG( imm );

        switch( imm & 0x1f )
        {
                case 0x10:  /* PA */
                        val = RP( UPD7810_PORTA );
                        break;
                case 0x11:  /* PB */
                        val = RP( UPD7810_PORTB );
                        break;
                case 0x12:  /* PC */
                        val = RP( UPD7810_PORTC );
                        break;
                case 0x13:  /* PD */
                        val = RP( UPD7810_PORTD );
                        break;
                case 0x15:  /* PF */
                        val = RP( UPD7810_PORTF );
                        break;
                case 0x16:  /* MKH */
                        val = MKH;
                        break;
                case 0x17:  /* MKL */
                        val = MKL;
                        break;
                case 0x19:  /* SMH */
                        val = SMH;
                        break;
                case 0x1b:  /* EOM */
                        val = EOM;
                        break;
                case 0x1d:  /* TMM */
                        val = TMM;
                        break;
                case 0x1e:  /* PT */
                        val = RP( UPD7807_PORTT );
                        break;
                default:
                        logerror("uPD7810 '%s': illegal opcode %02x %02x at PC:%04x\n", tag(), OP, imm, PC);
                        val = 0;
                        break;
        }
        if (val & (1 << (imm >> 5)))
                PSW |= SK;
}


so if I understand this correctly, the upper 3 bits are the bit number and the lower 5 specify the location, where locations < 0x10 are first bytes in the working area addressed by VV and locations >= 0x10 are the special registers.

It appears that the anything less than 0x10 isn't currently handled by the code.


So 5a e1 above would be interpreted as e1 = 1110 0001 upper 3 bits = 111 lower = 00001

so it would refer to bit 7 of VV:01


and many of those aren't currently implemented yet.

Code
       {&upd7810_device::SKN_bit,       2,13,13,L0|L1}, /* 50: 0101 0000 bbbb bbbb                      */  /* 7807 */
        {&upd7810_device::DCR_A,         1, 4, 4,L0|L1}, /* 51: 0101 0001                                */
        {&upd7810_device::DCR_B,         1, 4, 4,L0|L1}, /* 52: 0101 0010                                */
        {&upd7810_device::DCR_C,         1, 4, 4,L0|L1}, /* 53: 0101 0011                                */
        {&upd7810_device::JMP_w,         3,10,10,L0|L1}, /* 54: 0101 0100 llll llll hhhh hhhh            */
        {&upd7810_device::OFFIW_wa_xx,   3,19,19,L0|L1}, /* 55: 0101 0101 oooo oooo xxxx xxxx            */
        {&upd7810_device::ACI_A_xx,      2, 7, 7,L0|L1}, /* 56: 0101 0110 xxxx xxxx                      */
        {&upd7810_device::OFFI_A_xx,     2, 7, 7,L0|L1}, /* 57: 0101 0111 xxxx xxxx                      */
        {&upd7810_device::SETB,          2,13,13,L0|L1}, /* 58: 0101 1000 bbbb bbbb                      */  /* 7807 */
        {&upd7810_device::illegal,       2, 8, 8,L0|L1}, /* 59: 0101 1001 bbbb bbbb                      */  /* 7807 */
        {&upd7810_device::illegal,       2, 8, 8,L0|L1}, /* 5a: 0101 1010 bbbb bbbb                      */  /* 7807 */
        {&upd7810_device::CLR,           2,13,13,L0|L1}, /* 5b: 0101 1011 bbbb bbbb                      */  /* 7807 */
        {&upd7810_device::illegal,       2, 8, 8,L0|L1}, /* 5c: 0101 1100 bbbb bbbb                      */  /* 7807 */
        {&upd7810_device::SK_bit,        2,10,10,L0|L1}, /* 5d: 0101 1101 bbbb bbbb                      */  /* 7807 */
        {&upd7810_device::illegal,       2, 8, 8,L0|L1}, /* 5e: 0101 1110 bbbb bbbb                      */  /* 7807 */
        {&upd7810_device::illegal,       2, 8, 8,L0|L1}, /* 5f: 0101 1111 bbbb bbbb                      */  /* 7807 */

Joined: Mar 2006
Posts: 1,069
Likes: 4
L
Very Senior Member
Offline
Very Senior Member
L
Joined: Mar 2006
Posts: 1,069
Likes: 4
The uPD7807 core in MAME at least currently has the same bug with those opcodes mentioned earlier that the uPD7810 did, so be warned. The 'base, non-prefixed' opcode table for uPD7807 was (mostly) a copy-paste of the uPD7810 one so it inherited the same bug at some point.


"When life gives you zombies... *CHA-CHIK!* ...you make zombie-ade!"
Joined: Feb 2014
Posts: 796
Likes: 24
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 796
Likes: 24
Man, so many interesting things to look at. I keep falling asleep at my computer with my head down like I've been sleeping on a plane.


I came across a commodore mcs820 which is the same as an okimate20. The 8051 code looks reasonably sane, it has a couple of chips that do the heavy lifting, lots of reads and writes around $8000-$8010 or so. Making a driver file for it and running some code, it looks to be flashing an error led possibly.


I found a facit 4513 printer, so another neat thing to study. Looks like it uses an intel 8085.


Searching on the digital LA50, there's supposed to be a technical manual listed at manx:

LA50 Printer Technical Manual
Company: Digital Equipment Corporation
Part: EK-0LA50-TM-001
Date: 1983-03
Keywords:

Copies
Address: http://dundas-mac.caltech.edu/%7Edundas/retro/Printers/ek-ola50-tm-001.pdf
Site: John's Retro Computing Notes
Format: PDF
Size: 2835368 bytes (2.7 MiB)
MD5: cc67d0474977405a4a79f163b1224df5

but sadly, I think that the site has been gone for a long while, and wayback doesn't have it.

Joined: May 2008
Posts: 27
W
Member
Offline
Member
W
Joined: May 2008
Posts: 27

Last edited by Walker; 01/29/22 05:05 PM.
Joined: Feb 2014
Posts: 796
Likes: 24
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 796
Likes: 24
Thanks for the links, Walker.

The HSC manual is for the DEC Hierarchical Storage Controllers and just mentions the LA50.

The other one is a user's manual which does give some helpful information like DIP switch settings.



Looking at this DEC stuff reminds me of the days of VMS and its file system that kept 3 different versions of a file. I think I used that capability a few times 8-)

An interesting tidbit from the dip switch settings, the LA50 will support a baud rate of 110. Why is 110 interesting? It's the rate of the ASR33 teletype, which is something I've been reading up on. A teletype terminal that is purely electromechanical and prints at 10 characters per second at 110 baud.

1 start bit + 7 data bits + 1 parity bit + 2 stop bits = 11 bits per character for 10 characters per second.

Joined: Jan 2011
Posts: 248
Likes: 3
Senior Member
Offline
Senior Member
Joined: Jan 2011
Posts: 248
Likes: 3
I have the Dundas LA50 manuals. ULed to bitsavers.
I'll also see about scanning the schematic
..no go. partial document with no schematic

Last edited by Al Kossow; 01/29/22 10:44 PM.
Joined: Feb 2014
Posts: 796
Likes: 24
G
Senior Member
OP Online Content
Senior Member
G
Joined: Feb 2014
Posts: 796
Likes: 24
Cool! Thanks, Al!

Lots of good details in the Tech Manual.

Page 3 of 8 1 2 3 4 5 6 7 8

Link Copied to Clipboard
Who's Online Now
2 members (Golden Child, Olivier Galibert), 27 guests, and 2 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,069
Posts118,922
Members5,014
Most Online890
Jan 17th, 2020
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com