Previous Thread
Next Thread
Print Thread
Page 1 of 6 1 2 3 4 5 6
Hanimex Pencil 2 - vdp interrupts #114969
04/01/19 06:52 PM
04/01/19 06:52 PM
Joined: Jan 2019
Posts: 13
France
xavierm Offline OP
Member
xavierm  Offline OP
Member
Joined: Jan 2019
Posts: 13
France
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
Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #114977
04/04/19 03:20 AM
04/04/19 03:20 AM
Joined: Aug 2004
Posts: 1,382
Robbbert Offline
Very Senior Member
Robbbert  Offline
Very Senior Member
Joined: Aug 2004
Posts: 1,382
We need a schematic of the Pencil II, to know how any interrupts might be used.

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #114978
04/04/19 03:50 AM
04/04/19 03:50 AM
Joined: Mar 2001
Posts: 16,206
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,206
USA
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?

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #114979
04/04/19 10:51 AM
04/04/19 10:51 AM
Joined: Aug 2004
Posts: 1,382
Robbbert Offline
Very Senior Member
Robbbert  Offline
Very Senior Member
Joined: Aug 2004
Posts: 1,382
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.

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #114980
04/04/19 10:56 AM
04/04/19 10:56 AM
Joined: May 2004
Posts: 1,571
H
Haze Offline
Very Senior Member
Haze  Offline
Very Senior Member
H
Joined: May 2004
Posts: 1,571
are we sure the expansion card isn't generating the interrupts, and that without it no interrupts are generated?

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #114981
04/04/19 11:06 AM
04/04/19 11:06 AM
Joined: Dec 2015
Posts: 97
A
AJR Online content
Member
AJR  Online Content
Member
A
Joined: Dec 2015
Posts: 97
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.
Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #114983
04/04/19 12:17 PM
04/04/19 12:17 PM
Joined: Aug 2004
Posts: 1,382
Robbbert Offline
Very Senior Member
Robbbert  Offline
Very Senior Member
Joined: Aug 2004
Posts: 1,382
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.

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #114984
04/04/19 02:07 PM
04/04/19 02:07 PM
Joined: Mar 2001
Posts: 16,206
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,206
USA
If his still works he's probably had that done already, but good pointer smile

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #114985
04/04/19 05:26 PM
04/04/19 05:26 PM
Joined: Jan 2019
Posts: 13
France
xavierm Offline OP
Member
xavierm  Offline OP
Member
Joined: Jan 2019
Posts: 13
France
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.

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #114987
04/05/19 12:46 PM
04/05/19 12:46 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
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.
Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #114988
04/05/19 01:47 PM
04/05/19 01:47 PM
Joined: Mar 2001
Posts: 16,206
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,206
USA
ColecoVision is in turn nearly MSX-1, so it's not too surprising there are other Coleco-alikes.

Re: Hanimex Pencil 2 - vdp interrupts [Re: plgDavid] #114989
04/05/19 02:03 PM
04/05/19 02:03 PM
Joined: Jan 2019
Posts: 13
France
xavierm Offline OP
Member
xavierm  Offline OP
Member
Joined: Jan 2019
Posts: 13
France
Really good news!

This is a so rare machine that need to be in good hands πŸ‘

Unfortunately for the moment I never see any dump rom to play on it. Only 2 exists it seems.

That's why I'm learning z80 to make a little funny demo with sound or a little game.... If I have time 😊 it would be soooo exciting to see it running on a real hardware. After owning one, 33 years later it's time to release new roms for it 😁

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #114990
04/05/19 02:12 PM
04/05/19 02:12 PM
Joined: May 2004
Posts: 1,571
H
Haze Offline
Very Senior Member
Haze  Offline
Very Senior Member
H
Joined: May 2004
Posts: 1,571
the MSX video was also common to the early Sega systems, with the SMS VDP even having compatible screen modes for backwards compatibility with SG-1000 software. (the MD version of the VDP drops that mode, so SMS titles using it won't run on an MD but that was mostly just bootleg conversions)

Seems like it was a popular video setup anyway.

Re: Hanimex Pencil 2 - vdp interrupts [Re: Haze] #114991
04/05/19 02:18 PM
04/05/19 02:18 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
Indeed. I have a cross emulation hardware setup based on this idea where my Coleco/MSX/SMS can plan games from various similar systems.

Last edited by plgDavid; 04/05/19 02:24 PM.
Re: Hanimex Pencil 2 - vdp interrupts [Re: Haze] #114992
04/05/19 02:24 PM
04/05/19 02:24 PM
Joined: Jan 2019
Posts: 13
France
xavierm Offline OP
Member
xavierm  Offline OP
Member
Joined: Jan 2019
Posts: 13
France
To know how this machine should works I've looked at msx 1, SMS, colecovision, sg-1000, Adam.

At this time they share nearly the same hardware and even the port map with little differences.

The only big difference is for the bios. Entry points is not known for the pencil. For the moment I've identified only for shutting down the soundchip...it's a good start πŸ˜‰

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #114993
04/05/19 03:07 PM
04/05/19 03:07 PM
Joined: Aug 2004
Posts: 1,382
Robbbert Offline
Very Senior Member
Robbbert  Offline
Very Senior Member
Joined: Aug 2004
Posts: 1,382
The original post said only 2 carts were made, but that isn't quite correct, as the box has pictures of many more carts and other software. I listed everything from the box in hash\pencil2.xml

With the unit I received 6 cassettes with demo programs. These have been extracted and are on my site which I'm sure you can find. There's a manual there too.

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #114994
04/05/19 03:27 PM
04/05/19 03:27 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
I'm in touch with someone who has at least one undumped game, I might have to send them a dumping rig smile

Re: Hanimex Pencil 2 - vdp interrupts [Re: Robbbert] #115000
04/05/19 07:20 PM
04/05/19 07:20 PM
Joined: Jan 2019
Posts: 13
France
xavierm Offline OP
Member
xavierm  Offline OP
Member
Joined: Jan 2019
Posts: 13
France
Originally Posted by Robbbert
The original post said only 2 carts were made, but that isn't quite correct, as the box has pictures of many more carts and other software. I listed everything from the box in hash\pencil2.xml

With the unit I received 6 cassettes with demo programs. These have been extracted and are on my site which I'm sure you can find. There's a manual there too.


You are wright for the tapes, i have found them in an old lost forum and archive them too 😊 But for the cartridges I've always heard about 2 only games and one cartridge for the sdbasic 2.0. Maybe sdbasic 1.0 exist but i' m not sure.

What is exciting is to learn that more things exist and can be fonctionnal. I just read the xml and I'm just so happy to see that there are well known games as on colecovision.

Hope that somebody could find them and archive them.

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115001
04/05/19 07:25 PM
04/05/19 07:25 PM
Joined: Jan 2019
Posts: 13
France
xavierm Offline OP
Member
xavierm  Offline OP
Member
Joined: Jan 2019
Posts: 13
France
I've tested the last version with vdp interrupt. It works as mine.... But it's far more cleaner 😊 now I need to understand how interrupts work and why there is a reset.
I like to learn with failure, even more when it's for something that is nearly inexistant πŸ˜…

Great job and thanks a lot for improving this multi emulator. Without him I think that many many old computers would have been lost for ever. πŸ‘

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115002
04/06/19 01:03 AM
04/06/19 01:03 AM
Joined: Jul 2008
Posts: 24
S
starlord Offline
Member
starlord  Offline
Member
S
Joined: Jul 2008
Posts: 24
I remember an Atari age user named coleconut who had the only two games I have noticed (ladybug and treasure hunt I believe) as well as a coleco adaptor. Sadly it seems he didn’t manifest himself despite my PMs.

Another lead I had regarding the carts was the Canadian pc museum with mention of another game called big foot chase. Sadly seems I can’t contact them by phone. Furthermore the curator of the museum has passed away.

https://pcmuseum.ca/details.asp?id=19

Re: Hanimex Pencil 2 - vdp interrupts [Re: starlord] #115003
04/06/19 01:36 PM
04/06/19 01:36 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
I tried to ping both without success two days ago. Sad to hear.

Last edited by plgDavid; 04/06/19 02:17 PM.
Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115004
04/06/19 06:05 PM
04/06/19 06:05 PM
Joined: Jul 2008
Posts: 24
S
starlord Offline
Member
starlord  Offline
Member
S
Joined: Jul 2008
Posts: 24
The museum’s definitely an eye keeper, as i’ve Never seen that game cart before.

Re: Hanimex Pencil 2 - vdp interrupts [Re: starlord] #115011
04/08/19 07:04 PM
04/08/19 07:04 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
coleconut answered me, and as I guessed sending the cart away is not interesting to them. Well that will not stop me, I'll just send a dumping rig their way.

Last edited by plgDavid; 04/08/19 07:04 PM.
Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115012
04/09/19 12:40 AM
04/09/19 12:40 AM
Joined: Jul 2008
Posts: 24
S
starlord Offline
Member
starlord  Offline
Member
S
Joined: Jul 2008
Posts: 24
Ah! great to know.

Out of curiosity, can you ask whether he knows about the museum game? I know he tried to go after anything pencil 2 related.

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115073
04/15/19 04:27 PM
04/15/19 04:27 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
I just got my unit from eBay. Bitrot is real people the M5L2764 read half garbage compared with the BIOS in MESS. (same file I'm pretty sure).
more later

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115074
04/15/19 06:22 PM
04/15/19 06:22 PM
Joined: Jul 2008
Posts: 24
S
starlord Offline
Member
starlord  Offline
Member
S
Joined: Jul 2008
Posts: 24
I have notified members of mysilicium: I believe they are in possession of one, maybe a few, card games for the pencil 2.

Re: Hanimex Pencil 2 - vdp interrupts [Re: starlord] #115075
04/15/19 06:30 PM
04/15/19 06:30 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
Originally Posted by starlord
I have notified members of mysilicium: I believe they are in possession of one, maybe a few, card games for the pencil 2.


Pretty cool!

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115079
04/15/19 11:13 PM
04/15/19 11:13 PM
Joined: Jul 2008
Posts: 24
S
starlord Offline
Member
starlord  Offline
Member
S
Joined: Jul 2008
Posts: 24
No answers yet, but one of the games one of the users have is treasure hunt. Should anyone have specific infos on big foot chase, that would be great, as aside from the canadian pcmuseum, there is absolutely nothing on this one.

It also appears to be a pencil 2 exclusive (several titles seem to have been ported or were planned to be ported to the pencil 2 directly from the arcade, CBS and emerson arcadia: ladybug is such a title).

Also, PLGdavid, I believe coleconut should have both treasure hunt and secret garden (not sure he knows about big foot chase though).

Last edited by starlord; 04/15/19 11:16 PM.
Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115081
04/16/19 02:56 PM
04/16/19 02:56 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
If the carts use the same M5L2764 eproms, time is not on our side. I've had many die on me or ROT.

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115096
04/17/19 02:23 PM
04/17/19 02:23 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
In the mean time I just mapped out the cartridge slot and its _exactly_ mapped like the ColecoVision.

Traced out the main MREQ decoding and its a 74LS138 (typical)
With A=A15, B=A14, C=A13 (other way around in Coleco but doesn't matter)

Y0:$0000 (BIOS EPROM)
Y1:$8000 (Cart pin 18)
Y2:$4000 (External memory slot pin 18)
Y3:$C000 (Cart pin 2)
Y4:$2000 (External memory slot pin 16)
Y5:$A000 (Cart pin 22)
Y6:$6000 (RAM chip)
Y7:$E000 (Cart pin 27)





Last edited by plgDavid; 04/17/19 02:24 PM.
Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115097
04/17/19 03:52 PM
04/17/19 03:52 PM
Joined: Mar 2001
Posts: 16,206
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,206
USA
Nice. Hopefully we can get the remaining games dumped before they bitrot.

Re: Hanimex Pencil 2 - vdp interrupts [Re: R. Belmont] #115098
04/17/19 06:40 PM
04/17/19 06:40 PM
Joined: Jul 2008
Posts: 24
S
starlord Offline
Member
starlord  Offline
Member
S
Joined: Jul 2008
Posts: 24
So in essence, aside from differences in dimensions, pencil 2 carts are coleco carts correct?

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115099
04/17/19 06:55 PM
04/17/19 06:55 PM
Joined: Mar 2001
Posts: 16,206
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,206
USA
Right, which is why there was a cartridge converter.

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115101
04/17/19 08:46 PM
04/17/19 08:46 PM
Joined: Jul 2008
Posts: 24
S
starlord Offline
Member
starlord  Offline
Member
S
Joined: Jul 2008
Posts: 24
I see. Speaking of which, I'm curious regarding the innards of said converter.

Last edited by starlord; 04/17/19 08:51 PM.
Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115102
04/17/19 08:56 PM
04/17/19 08:56 PM
Joined: Mar 2001
Posts: 16,206
USA
R
R. Belmont Online content
Very Senior Member
R. Belmont  Online Content
Very Senior Member
R
Joined: Mar 2001
Posts: 16,206
USA
It shouldn't have any innards from what plg said. It's purely making the connections work.

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115103
04/17/19 08:57 PM
04/17/19 08:57 PM
Joined: May 2004
Posts: 1,571
H
Haze Offline
Very Senior Member
Haze  Offline
Very Senior Member
H
Joined: May 2004
Posts: 1,571
I thought the bios was different and incompatible? assuming cart space can completely override system space, I guess it contains a compatible bios?

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115104
04/17/19 09:30 PM
04/17/19 09:30 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
The ColecoVision carts insert perfectly in the main slot.

[EDIT] guess there is a CV compatible bios and some glue chips and thats it in the adapter

*NOT MY PICTURE*
[Linked Image]

I'm confident I can just hook up a 27128+switch and have the bios change from one to the other.

Last edited by plgDavid; 04/17/19 09:34 PM.
Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115107
04/18/19 01:53 PM
04/18/19 01:53 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
I was saying...

[Linked Image]
[Linked Image]

Last edited by plgDavid; 04/18/19 01:54 PM.
Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115108
04/18/19 02:17 PM
04/18/19 02:17 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
Just tried one game. Surely the switch from 1KiB to 2KiB of RAM will cause issues to some game assuming mirroring. I'll try a few more later.

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115110
04/19/19 02:53 PM
04/19/19 02:53 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
Didn't find a non working ColecoVision game so far (tried 20 or so)

Scanned the PCBs
https://imageshack.com/a/wFco/1

Re: Hanimex Pencil 2 - vdp interrupts [Re: plgDavid] #115122
04/20/19 08:00 PM
04/20/19 08:00 PM
Joined: Jan 2019
Posts: 13
France
xavierm Offline OP
Member
xavierm  Offline OP
Member
Joined: Jan 2019
Posts: 13
France
Originally Posted by plgDavid
Didn't find a non working ColecoVision game so far (tried 20 or so)

Scanned the PCBs
https://imageshack.com/a/wFco/1

Amazing! Good scans of the inside were really needed πŸ‘Œ hope this would help one day πŸ€— maybe for a fpga project πŸ€”?

You said you have only plugged the coleco games and it worked?
I had tried this with the emulator and nothing worked. It said "no cartridge".
What I had understood with the help of the debugger is that the bios search for "COPYRIGHT SOUNDIC" from $8000 to $8010. If it's not equal the cartridge is set unknown.
Maybe I've missed something?

For the adapter I had a pic of the inside I'll post it when I'll find it. In fact there is only one chip. My guess is there is only bios code. Maybe a replacement of the main bios? For me it's the only thing it does, but I don't know how πŸ˜…

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115124
04/21/19 12:03 AM
04/21/19 12:03 AM
Joined: Jan 2019
Posts: 13
France
xavierm Offline OP
Member
xavierm  Offline OP
Member
Joined: Jan 2019
Posts: 13
France
You can see on these pics the pcb of the colecovision adapter.
Only one chip, nothing else.
It's the only reference I have. Hope it helps 😊

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115125
04/21/19 08:22 AM
04/21/19 08:22 AM
Joined: Aug 2004
Posts: 1,382
Robbbert Offline
Very Senior Member
Robbbert  Offline
Very Senior Member
Joined: Aug 2004
Posts: 1,382
It looks like a ROM. Are you in a position to dump it?

Re: Hanimex Pencil 2 - vdp interrupts [Re: Robbbert] #115128
04/21/19 05:00 PM
04/21/19 05:00 PM
Joined: Jan 2019
Posts: 13
France
xavierm Offline OP
Member
xavierm  Offline OP
Member
Joined: Jan 2019
Posts: 13
France
Originally Posted by Robbbert
It looks like a ROM. Are you in a position to dump it?

I'm not owning this rom, nor able to get it to make a dump. I had told the owner if it was possible for him but... No.

I will send him a new message, perhaps things have changed 😁

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115131
04/21/19 11:32 PM
04/21/19 11:32 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
Originally Posted by xavierm

You said you have only plugged the coleco games and it worked?
I had tried this with the emulator and nothing worked. It said "no cartridge".
What I had understood with the help of the debugger is that the bios search for "COPYRIGHT SOUNDIC" from $8000 to $8010. If it's not equal the cartridge is set unknown.
Maybe I've missed something?


Yes I was doing a hardware test replacing the Pencil Bios for the Coleco bios (my Pencil now has a switch to toggle between both).
With the coleco bios all games that I've tried work as if they were in a ColecoVision.... Well they are PAL and slow, but they work.

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115133
04/22/19 01:18 AM
04/22/19 01:18 AM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
As far as the ColecoVision adapter is concerned, this is interesting.
The 2764 in there has its !OE on the memory slot pin 17 (which is connected just like the BIOS to the same Y0 line of the 74138, (missed this info last time)
So it maps to $0000 and most possibly a Coleco-Compatible BIOS that we do not have dumped. (or the real thing which would be very surprising)

So there is of course a needed mechanism to shut down the native Pencil II bios.

The console's bios's !OE line is called !XTM0 on the silkscreen, (not external M0)
Its pulled down on the mainboard through R6 and connects to line 2 of the memory slot
Looking into the ColecoVision adapter you can see that pin2 is connected to VCC, so there is no conflict for $0000

Back to the 74LS138@U10: [edit]

Y0:$0000 (BIOS EPROM - and memory slot pin 17)
Y1:$8000 (Cart pin 18)
Y2:$4000 (External memory slot pin 18)
Y3:$C000 (Cart pin 2)
Y4:$2000 (External memory slot pin 16)
Y5:$A000 (Cart pin 22)
Y6:$6000 (RAM chip)
Y7:$E000 (Cart pin 27)

Last edited by plgDavid; 04/22/19 01:21 AM.
Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115199
04/30/19 01:01 PM
04/30/19 01:01 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
All set https://twitter.com/occitel/status/1123126397864697856?s=20 just waiting for my IZE80 board to cross the Atlantic to France and they should get the first game dumped.

Last edited by plgDavid; 04/30/19 01:01 PM.
Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115210
05/01/19 11:40 AM
05/01/19 11:40 AM
Joined: Jul 2008
Posts: 24
S
starlord Offline
Member
starlord  Offline
Member
S
Joined: Jul 2008
Posts: 24
Great! Who came through? My silicium i take it?

Edit: never mind, just saw the tweet. Great job.

Last edited by starlord; 05/01/19 01:58 PM.
Re: Hanimex Pencil 2 - vdp interrupts [Re: plgDavid] #115214
05/01/19 05:04 PM
05/01/19 05:04 PM
Joined: Jan 2019
Posts: 13
France
xavierm Offline OP
Member
xavierm  Offline OP
Member
Joined: Jan 2019
Posts: 13
France
Originally Posted by plgDavid
All set https://twitter.com/occitel/status/1123126397864697856?s=20 just waiting for my IZE80 board to cross the Atlantic to France and they should get the first game dumped.

I think things would go further after the game will be dumped. We could see how it works and make emulation better.

I'll post something about that shortly. I have a simple code showing rasters, so using nmi, and with a normal execution rasters seems not to be at the right place on screen. If after i use the debugger and follow step by step the execution, rasters go at the wright place. It's like if there is some timer issue or wrong cycle count.
I'll post screen shots and the assembly code.

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115216
05/01/19 07:39 PM
05/01/19 07:39 PM
Joined: Jan 2019
Posts: 13
France
xavierm Offline OP
Member
xavierm  Offline OP
Member
Joined: Jan 2019
Posts: 13
France
In this picture we can see a normal execution. Lines are drawn during nmi. [Linked Image]

In this one all lines are correctly drawn.[Linked Image].

The only difference is that the second one is drawn using the debugger by pressing F11 after every instructions. I'm maybe wrong, but i'm thinking of a wrong timing in normal run.

Code
	; Header d'une cartouche Pencil II
	org $8000
	; COPYRIGHT SOUNDIC
	defb "COPYRIGHT SOUNDIC"	; 8000 - 8010
	; 8011 - 8034
	;
	; 8011 - START
	; 8014 - NMI
	; 8029 - INT
	; Point d'entrΓ©e du lancement du programme sur la cartouche
	jp start			; 8011 - 8013

	;defs 32,0
        ; NMI
        jp inthandler           	; 8014 - 8016
	;defs 10,0
	defs 6,0
	; RST 18
	ret
	nop
	defs 13,0
	;jp inthandler			; 8029 - 802B
	reti
	nop
        ;defs 32,0
        defs 27,0 

	; VERSION!TITRE!DATE (C)
	defb "BETA!** VDP TESTS **!2019"
	defs 10,0


; VARIABLES

dataVDP:	EQU $BE ; VDP Data port
cmdVDP:		EQU $BF ; VDP Command port
ramtop:         equ $7050
        include "tms.asm"

inthandler:
        in      a, (tmsreg)             ; clear interrupt flag
        call    rasters 
        ei
        reti
        
rasters:
	; Register 7 = $2 => 0000 0010 (BGC)
	ld c, $02
lp_b:
	ld a, c
	out ($bf), a
	ld a, $87
	out ($bf), a

        inc c
        ld a, $15
lp_a:
	dec a
	jp nz, lp_a
	nop
	nop
	add a, 1
	add a, 1
	add a, 1
	ld a, c
	sub a, $50
	jp nz, lp_b

	xor a, a
	out ($bf), a
	ld a, $87
	out ($bf), a

	ret


start:
	ld	($7000),sp			; save old stack poitner
        ld      sp, ramtop                      ; set up stack

	call    tmsbitmap
        call	$505 ; TURN_OFF_SOUND
	call	tmsintenable

mainLoop:
	jr mainLoop



Code is compiled with z80asm on Linux.

What do you think about ?

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115217
05/01/19 07:49 PM
05/01/19 07:49 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal
I think if there is a timing issue for the Pencil II there is one for the colecovision driver as well, since they are identical, minus a few ports for the keyboard and tape.
No game on the colecovision uses rasters that way to my knowedge but surely MSX games does and its, again near exact hardware.

Re: Hanimex Pencil 2 - vdp interrupts [Re: plgDavid] #115218
05/01/19 08:43 PM
05/01/19 08:43 PM
Joined: Jan 2019
Posts: 13
France
xavierm Offline OP
Member
xavierm  Offline OP
Member
Joined: Jan 2019
Posts: 13
France
I know 😁
It's just a strange behavior. The code was made for rc2014. I've just tried to adapt it. Maybe something wrong with my code... Again πŸ˜…

I'll try to do some more tests with sprites this time 😏

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115241
05/07/19 01:23 PM
05/07/19 01:23 PM
Joined: Aug 2009
Posts: 191
Montreal
P
plgDavid Offline
Senior Member
plgDavid  Offline
Senior Member
P
Joined: Aug 2009
Posts: 191
Montreal

Last edited by plgDavid; 05/07/19 01:23 PM.
Re: Hanimex Pencil 2 - vdp interrupts [Re: plgDavid] #115243
05/07/19 07:17 PM
05/07/19 07:17 PM
Joined: Jan 2019
Posts: 13
France
xavierm Offline OP
Member
xavierm  Offline OP
Member
Joined: Jan 2019
Posts: 13
France
Originally Posted by plgDavid

Sooooo nice 😁
Really good job. So excited to download it and see how it works πŸ˜…
We have a lot to learn now.

Re: Hanimex Pencil 2 - vdp interrupts [Re: xavierm] #115244
05/07/19 09:42 PM
05/07/19 09:42 PM
Joined: Jul 2008
Posts: 24
S
starlord Offline
Member
starlord  Offline
Member
S
Joined: Jul 2008
Posts: 24
Great job! Congrats to all involved. I will make a post on atariage. It could motivate coleconut further.

Edit: and it seems that’s done already! Let’s see what happens next.

Last edited by starlord; 05/07/19 09:44 PM.
Page 1 of 6 1 2 3 4 5 6

Who's Online Now
1 registered members (EoceneMiacid), 30 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Shout Box
Forum Statistics
Forums9
Topics8,654
Posts113,414
Members4,846
Most Online324
Dec 20th, 2018
Powered by UBB.threads™ PHP Forum Software 7.6.1.1
(Release build 20180111)
Page Time: 0.060s Queries: 14 (0.021s) Memory: 6.1689 MB (Peak: 6.7036 MB) Zlib enabled. Server Time: 2019-05-26 07:54:32 UTC