Previous Thread
Next Thread
Print Thread
Page 1 of 6 1 2 3 4 5 6
Joined: Jan 2019
Posts: 14
xavierm Offline OP
Member
OP Offline
Member
Joined: Jan 2019
Posts: 14
Hi,

I'm trying to use hanimex pencil II driver, a very rare Z80 computer from 1983. Only 2 cartridges were made and another for sdbasic.
It has nearly the same hardware as a colecovision and had an expansion card to make games works without modifying them.

I had used z80dasm to have a clue of how it works, where are entry points, how things are done.

I have succeeded to know how work cartridges and now can make z80 programs to have fun.

Some z80 / tms9928 examples can be converted with a little work, i had a mandelbrot cartridge and an ascii table printed on screen.

I was about to tried some animated examples when i saw a blank screen and my pc counter stay at a halt instruction.

If i use this same example on the colecovision driver, animated sprites appeared on screen.

My guess is that the pencil2 driver doesn't handle interrupts. In fact, in pencil2.cpp there is nothing about nmi or int. I have tried to port colecovision code with a little success. PC is moving across interrupts but i have glitch on screen or nothing more. I don't know if it's the z80 code or my poorly C code.

Does anyone have tried to add some interrupts handle for pencil2 ? it would be so fun to have a new product for this computer 36 years after it's release smile
Maybe with a little explanation about how to implement interrupts i could handle it smile

Xavier.

Last edited by xavierm; 04/01/19 07:04 PM. Reason: published too fast
Joined: Aug 2004
Posts: 1,458
Likes: 9
Very Senior Member
Offline
Very Senior Member
Joined: Aug 2004
Posts: 1,458
Likes: 9
We need a schematic of the Pencil II, to know how any interrupts might be used.

Joined: Mar 2001
Posts: 16,985
Likes: 83
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,985
Likes: 83
Alternatively, we need to know how the interrupts are hooked up. I assume the interrupt source is the TMS9927, does it go to IRQ or NMI? And is there some hardware in the way to gate it?

Joined: Aug 2004
Posts: 1,458
Likes: 9
Very Senior Member
Offline
Very Senior Member
Joined: Aug 2004
Posts: 1,458
Likes: 9
Maybe I'll have to pull my Pencil II out of storage, and try to trace tracks....

And the video chip is a TMS9929 btw.

Joined: May 2004
Posts: 1,740
Likes: 8
H
Very Senior Member
Offline
Very Senior Member
H
Joined: May 2004
Posts: 1,740
Likes: 8
are we sure the expansion card isn't generating the interrupts, and that without it no interrupts are generated?

Joined: Dec 2015
Posts: 153
Likes: 4
A
AJR Offline
Senior Member
Offline
Senior Member
A
Joined: Dec 2015
Posts: 153
Likes: 4
The main board ROM trampolines the NMI and RST handlers (with the understandable exception of RST 00) into cartridge space. However, as SD-BASIC never enables maskable interrupts at any point, I'd guess that NMI is the only actual interrupt.

On closer examination, NMI does write to the VDP after four or five layers of indirection. I've added that as the interrupt.

Last edited by AJR; 04/04/19 11:16 AM.
Joined: Aug 2004
Posts: 1,458
Likes: 9
Very Senior Member
Offline
Very Senior Member
Joined: Aug 2004
Posts: 1,458
Likes: 9
If you happen to own a Pencil II, you need to do some preventative maintenance to keep it working. After all, the reason it is rare is because most of them failed in the warranty period and were returned to the store for a refund.

You need to open it, and locate the cart slot in the middle of the motherboard. You'll probably find that the slot socket is loose. Hold it in firmly and resolder every joint on it. Then put it back together and make sure the 2 self-tapping screws on the slot socket are screwed in firmly. After that, it should work well for many years.

Joined: Mar 2001
Posts: 16,985
Likes: 83
R
Very Senior Member
Offline
Very Senior Member
R
Joined: Mar 2001
Posts: 16,985
Likes: 83
If his still works he's probably had that done already, but good pointer smile

Joined: Jan 2019
Posts: 14
xavierm Offline OP
Member
OP Offline
Member
Joined: Jan 2019
Posts: 14
Thanks for reply 😊

Yesturday i asked someone on eBay to send me hight resolution pictures of the motherboard. I don't know if he will send them to me... Wait and see 😏

Today i cleaned up the assembly code and to my surprise it nearly works. I can follow my code into the nmi interrupt.

To reply at your question about to know if it nmi or not, I'm nearly sure that nmi is triggered by the tms9928 vdp.

The rom bios has jump from 66h to 8014h which jump into the nmi custom rout. It works with my patch. But when the interrupt return, the pencil go to 18h and reset and restart the whole thing for ever... I miss some z80 knowledge 😅

I could share what I've done on pencil2.cpp driver if you want.
For the z80 assembly code I nead to minimize it just to have the interrupt enabled and make it works without doing graphics that can brings some other bugs I cannot understand 😁

Hope pencil2 can have some enhancements. I plan to make something on it, perhaps just a little demo with sound and graphic, a little game, or porting an existing game from colecovision. For that it needs to have joystick support 😅.... But it's another step.

Thanks for your help.

Joined: Aug 2009
Posts: 192
P
Senior Member
Offline
Senior Member
P
Joined: Aug 2009
Posts: 192
Originally Posted by xavierm
Thanks for reply 😊

Yesturday i asked someone on eBay to send me hight resolution pictures of the motherboard.


I bought this unit yesterday so it should be in safe hands. Also ran the Pencil II bios (from mame) in my hacked colecovision, so more fun down the road...

We need them carts!
Picture of the Pencil II Bios in a ColecoVision: https://twitter.com/plgDavid/status/1114147940296220672

Last edited by plgDavid; 04/05/19 12:52 PM.
Page 1 of 6 1 2 3 4 5 6

Link Copied to Clipboard
Who's Online Now
3 members (robcfg, yugffuts, 1 invisible), 23 guests, and 6 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,170
Posts120,090
Members5,039
Most Online1,283
Dec 21st, 2022
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