|
Joined: Mar 2001
Posts: 17,217 Likes: 234
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,217 Likes: 234 |
|
|
|
|
Joined: Feb 2014
Posts: 1,102 Likes: 173
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,102 Likes: 173 |
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 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: 17,217 Likes: 234
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,217 Likes: 234 |
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: 1,102 Likes: 173
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,102 Likes: 173 |
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) change to single (screen 0) 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: 17,217 Likes: 234
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,217 Likes: 234 |
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: 1,102 Likes: 173
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,102 Likes: 173 |
Hi RB, I haven't pulled for a week or so, but it's at least 222.
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: 1,102 Likes: 173
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,102 Likes: 173 |
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.
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: 17,217 Likes: 234
Very Senior Member
|
Very Senior Member
Joined: Mar 2001
Posts: 17,217 Likes: 234 |
I've tagged the change to the upd7810 interrupt behavior so AJR can take a look.
|
|
|
|
Joined: Dec 2015
Posts: 173 Likes: 11
Senior Member
|
Senior Member
Joined: Dec 2015
Posts: 173 Likes: 11 |
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: 1,102 Likes: 173
Very Senior Member
|
Very Senior Member
Joined: Feb 2014
Posts: 1,102 Likes: 173 |
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.
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:
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
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. red here, also comes in green 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-)
|
|
|
3 members (Olivier Galibert, Dodg, 1 invisible),
321
guests, and
6
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
Forums9
Topics9,320
Posts121,944
Members5,074
|
Most Online1,283 Dec 21st, 2022
|
|
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!
|
|
|
|