Previous Thread
Next Thread
Print Thread
Page 55 of 61 1 2 53 54 55 56 57 60 61
Joined: Mar 2001
Posts: 16,613
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,613
Thanks again!

Joined: Feb 2014
Posts: 504
G
Senior Member
Offline
Senior Member
G
Joined: Feb 2014
Posts: 504
Hi guys,

I was fiddling around trying to get the ap2000 working on the apple2 parallel interface and couldn't get it to work. It looks like somewhere between 219 and 220 that the little printhead block stopped moving on the ap2000 when you boot.

Typing PR#1 should activate the printer but it doesn't seem to do anything.

./mame64 apple2p -sl1 parallel -sl1:parallel:pic_ctx ap2000

I tried it with the cpc6128 and got the same behavior.

./mame64 cpc6128 -centronics ap2000

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

By default, the keys for the ap2000 are mapped to FLEO for Form Feed / Line Feed / Eject / Online so hitting O will move the printhead from the center to the left under 219, so it's alive (at least a little 8-)


Trying the cpc6128 and typing PRINT #8,"QQQQQQ" will hang the command line until you type O but it won't print anything. Subsequent PRINT #8 will hang.

Joined: Mar 2001
Posts: 16,613
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,613
So the AP2000 regressed? That's too bad, I had it working a while ago. I'll have to check the git logs.

Joined: Feb 2014
Posts: 504
G
Senior Member
Offline
Senior Member
G
Joined: Feb 2014
Posts: 504
Thanks for having a look, RB.

While fiddling around, I was changing the video options while having the dual screens active for the apple and the ap2000, and noticed that changing the screen from left to right, then single, then back again would give a segfault under -video bgfx and would be fine under -video soft or -video opengl. (Running under Ubuntu 19.10)

[Linked Image from i.imgur.com]
change to single (screen 0)
[Linked Image from i.imgur.com]
change to single (screen 1)
change back to left to right.
then segfault.


I think it happened somewhere between 214 and 215 because 215 will segfault immediately when changing screens around and 214 seems ok for me.

Joined: Mar 2001
Posts: 16,613
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,613
Have you tried it on latest? Several crashes in BGFX (especially related to tearing down a context and opening a new one) were fixed for 0.222.

Joined: Feb 2014
Posts: 504
G
Senior Member
Offline
Senior Member
G
Joined: Feb 2014
Posts: 504
Hi RB,

I haven't pulled for a week or so, but it's at least 222.

Code
mame 0.222	
Copyright (C) Nicola Salmoria and the MAME team

Debug Build: Disabling input grab for -debug
[MAME]> at93c06 NOT FOUND (NO GOOD DUMP KNOWN) (tried in ap2000 apple2p apple2)
WARNING: the machine might not run correctly.

MAME debugger version 0.222 (mame0222-276-g4999038a1c9-dirty)
Currently targeting apple2p (Apple ][+)
[MAME]> 

>g
[MAME]> Segmentation fault (core dumped)

Joined: Feb 2014
Posts: 504
G
Senior Member
Offline
Senior Member
G
Joined: Feb 2014
Posts: 504
Fiddling with the ap2000, I was able to get the printer to have the moving block by changing this line in upd7810.cpp, there was quite a bit of change between 219 and 220 in upd7810 that seemed to make it stop working. I have no idea what this breaks, but at least it shows activity.

It just puts that line back to the way it was in 219.

Unfortunately, it still doesn't seem to get any data.

Code
git diff src/devices/cpu/upd7810/upd7810.cpp
diff --git a/src/devices/cpu/upd7810/upd7810.cpp b/src/devices/cpu/upd7810/upd7810.cpp
index bd459b2f141..25ac83fa794 100644
--- a/src/devices/cpu/upd7810/upd7810.cpp
+++ b/src/devices/cpu/upd7810/upd7810.cpp
@@ -749,7 +749,8 @@ void upd7810_device::upd7810_take_irq()
        int irqline = 0;
 
        /* global interrupt disable? */
-       if (0 == IFF && !(IRR & INTNMI))
+        if (0 == IFF)
+//     if (0 == IFF && !(IRR & INTNMI))
                return;
 
        /* check the interrupts in priority sequence */

Joined: Mar 2001
Posts: 16,613
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,613
I've tagged the change to the upd7810 interrupt behavior so AJR can take a look.

Joined: Dec 2015
Posts: 119
A
AJR Online Content
Senior Member
Online Content
Senior Member
A
Joined: Dec 2015
Posts: 119
I might not be able to for a while, since my development machine is now on its last legs. I do think my change here is logically correct: NMI should be nonmaskable.

Code analysis: NMI is sourced from the E05A30, which asserts it (once) in device_reset. NMIs at reset have been known to cause problems with other CPUs (e.g. sdk85), because the internal flipflop will be set by the (synced) transition after the CPU's device_reset has already finished. Behavior may not be accurate in this particular case anyway.

Last edited by AJR; 07/12/20 06:05 PM.
Joined: Feb 2014
Posts: 504
G
Senior Member
Offline
Senior Member
G
Joined: Feb 2014
Posts: 504
Thanks guys for having a look, I don't think there's a quick fix to the ap2000.

I wanted to make sure that it's getting data from the parallel port, and it didn't seem to be getting data.

It seemed to have a lot of trouble with the m_centronics_busy check so after removing the check, it would get data.

Code
WRITE_LINE_MEMBER( e05a30_device::centronics_input_strobe )
{

//       if (m_centronics_strobe == true && state == false && !m_centronics_busy) {
   if ((state == false) && (m_centronics_strobe == true)) {

         printf("ACCEPT_STROBE **** Strobe %x\n",m_centronics_data);

                m_centronics_data_latch   = m_centronics_data;
                m_centronics_data_latched = true;
                m_centronics_busy         = true;
                m_write_centronics_busy(m_centronics_busy);
        }

        m_centronics_strobe = state;
}


Adding a few prints to see if the ap2000 is reading the data:

Code
uint8_t e05a30_device::read(offs_t offset)
 
        switch (offset) {
        case 0x02:
                result = m_centronics_data_latched << 7;
+                printf("0x02 CENTRONICS DATA LATCHED === %x     %s\n",m_centronics_data_latched,machine().describe_context().c_str());
                break;
        case 0x03:
+                printf("0x03 CENTRONICS DATA LATCH === %x     %s\n",m_centronics_data_latch,machine().describe_context().c_str());
                result = m_centronics_data_latch;
                m_centronics_data_latched = false;
                break;


but the ap2000 would grab a couple of bytes and then happily run off into the weeds...where it hangs on JR FF which is an infinite loop.

After typing PR#1

Code
ACCEPT_STROBE **** Strobe 8d  enter
ACCEPT_STROBE **** Strobe 8a  linefeed
ACCEPT_STROBE **** Strobe dd  ] basic prompt
ACCEPT_STROBE **** Strobe c1  A
ACCEPT_STROBE **** Strobe c1  
ACCEPT_STROBE **** Strobe c1
ACCEPT_STROBE **** Strobe c1
ACCEPT_STROBE **** Strobe c1
ACCEPT_STROBE **** Strobe cf   O    hitting O and L trying to get online
ACCEPT_STROBE **** Strobe cc  L
0x02 CENTRONICS DATA LATCHED === 1     ':sl1:parallel:pic_ctx:ap2000:maincpu' (2096)
0x02 CENTRONICS DATA LATCHED === 1     ':sl1:parallel:pic_ctx:ap2000:maincpu' (209C)
0x03 CENTRONICS DATA LATCH === cc     ':sl1:parallel:pic_ctx:ap2000:maincpu' (209C)

yay it did get a single byte!

0x02 CENTRONICS DATA LATCHED === 0     ':sl1:parallel:pic_ctx:ap2000:maincpu' (2096)
0x02 CENTRONICS DATA LATCHED === 0     ':sl1:parallel:pic_ctx:ap2000:maincpu' (2096)
0x02 CENTRONICS DATA LATCHED === 0     ':sl1:parallel:pic_ctx:ap2000:maincpu' (2096)
0x02 CENTRONICS DATA LATCHED === 0     ':sl1:parallel:pic_ctx:ap2000:maincpu' (2096)


Changing the code to make the block a different color based on m_online_led shows it flickering like crazy.

[Linked Image from i.imgur.com] red here, also comes in green [Linked Image from i.imgur.com]

Code
uint32_t epson_lx810l_device::screen_update_lx810l(screen_device &screen, bitmap
        copyscrollbitmap(bitmap, m_bitmap, 0, nullptr, 1, &scrolly, cliprect);
 
        /* draw "printhead" */
-       bitmap.plot_box(m_real_cr_pos + CR_OFFSET - 10, PAPER_HEIGHT - 36, 20, 36, 0x888888);
+
+       bitmap.plot_box(m_real_cr_pos + CR_OFFSET - 10, PAPER_HEIGHT - 36, 20, 36, m_online_led ? 0x008800 : 0x880000);
 
        return 0;
 }



So, no joy in Mudville... 8-)

Page 55 of 61 1 2 53 54 55 56 57 60 61

Link Copied to Clipboard
Who's Online Now
1 members (r09), 36 guests, and 3 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics8,836
Posts116,222
Members4,921
Most Online890
Jan 17th, 2020
Powered by UBB.threads™ PHP Forum Software 7.7.5