A long time ago when I was 11 and lived in Basra south of Iraq my parents thought it was a good idea to get me into computers and programming. I’ve always been a gamer since birth pretty much so it fit nicely.

The year was around 1996 and Iraq was way behind the world in computing due to unfortunate circumstances.

During the 80s however, Iraq was a regional pioneer in digital technology despite the devastating 8 years war with Iran, this growth was led by a national group of companies collectively named: Electronics Industry Company or EIC (شركة الصناعات الوطنية).

The EIC produced a variety of electronic products including a number of personal computers.

And there I was in 1996, at the appropriately named “The Computer Institute” in Basra standing in front of a collection of Warka 6001 computers among the usual green and amber display IBM 286s burning to learn to speak their language.

EIC produced two lines of personal computers both licensed from overseas manufacturers. The first was the Al-Warka الوركاء PC based on NEC’s popular Japanese PC-6001 series and targeting enthusiasts and students.

Al-Warka PC-6002 is identical to this, mine was in white:

pc6001_mk2_sr

And the second line of products was called Salah Al-Deen صلاح الدين and these were based on 286 architecture (as far as I know) and targeted business and professional applications.

The computing course I signed up for along with 2 friends was an introduction to programming BASIC for the Al-Warka PC-6001. And I had a blast! Couldn’t wait to learn more.

Fast forward a few months later, our parents all agreed that getting us computers was better for our school than nintendos. I totally agreed. It happened quickly, I had two choices either a colorful used computer (which I now know was an Amstrad CPC 464) or an Al-Warka PC-6002, I liked the CPC but felt that I’d be alone since all my friends went with the Warka.

warka_6001

( Photo from Yousif Abood’s blog, this blog post about Warka history )

It was a life-changing day when I turned that PC on for the first time! after the excitement calmed down I sat down and wrote a simple program I learned from a friend that makes a colored line move back and forth horizontally. Here it is running in all its emulated glory:

pc_6001_darting_line

All BASIC interpreters in PC-6001 series are developed by Microsoft. Al-Warka PC-6001 (equivalent to Japan’s NEC PC-6001 Mk2) offer 5 modes of BASIC 4 of which are there for back-compatibility. Mode 5 uses N66 BASIC and that’s the one I learned first.

mode5_basic

This is how that simple moving line program looks like in N66 BASIC:

10 SCREEN 4,2,2:CLS
20 C=2
30 LINE(140,100)-(200,100),C
40 GOSUB 90
50 GOSUB 150
60 C=C+1
70 IF C>4 THEN C=2
80 GOTO 30
90 REM move left

100 FOR I=0 TO 20
110 PSET(140-I,100),C
120 PSET(200-I,100),1
130 NEXT I
140 RETURN
150 REM move right

160 FOR I=0 TO 20
170 PSET(180-I,100),C
180 PSET(120+I,100),1
190 NEXT I
200 RETURN
210 END

My Al-Warka was a PC-6002 (which is equivalent to PC-6001 Mk2 SR) had 1 extra BASIC mode called “N66 SR” that’s super fast and has higher resolution screen modes and an extra FM sound chip! Which happens to be Yamaha YM-2203 and sounded amazing through the internal speaker.

In Japan the PC-6001 Mk2 was very popular and loads of software was developed and sold for it throughout the 80s. Games and demos did trickle down and at one point I had 36 games in total on 3 floppy disks!

While Mode 6 is superior, it was rarely used. In both the Japanese and Iraqi programming scenes.

Here’s a modern music demo done by Tiny Yarou for PC-6001 Mk2 SR in Mode 6 that uses the YM2203 to its full potential:

And this is his comment on the video translated through Google:

Tried to make something like Ys with IISR + DISK. Previously, I made an extended RAM compatible version, but this is a disc version that works even without RAM. SR is faster than mkII, but it took more time to draw as much as VRAM increased, which made it far from comfortable

I spent years programming on this PC. It’s basically my computing childhood.

While I got pretty good at BASIC and had a number of tricks to extend some things further with some magic POKEs and EXECs, I felt severely limited and dragged down by my very limited knowledge of the hardware architecture and the fact I never figured out how to program directly in Z80 and talk directly to the video and audio hardware.

There was no internet back then. All I had were 2 official manuals I found and copied (BASIC and the internal MONITOR debugger), the only other source of tricks were programs other people made and distributed through local programming gatherings, these resembled the demoscene although on a much smaller scale.

I feel I have unfinished business. Many years later I visited Basra and was there for a few days, I purposefully dug out the PC-6002 and turned it on one last time, except this time I had access to information..

It took me most of a day but I wrote a simple BASIC/z80 program to write pixels to the screen buffer and measure how much time I could do it in (fill-rate basically). It was around 700ms to fill 320x200 16 color screen. I was floored! I could have done some basic level scrolling on the Warka if I knew what I was doing.

Since information outside of Japan is scarce about this PC. Armed with a set of tools and emulators, I’ll be writing a series of posts to cover different aspects of the PC-6001 Mk2/SR and programming for it using modern methods.

Here’s a listing of the PC-6001 Mk2 SR specs in as much detail as I have:

Processor:

Main Processor: µPD 780C-1 (Z80 Compatible) clocked at 3.59 MHz to 3.9936 MHz depending on BASIC mode.

Co-Processor: ìPD8049 clocked 8 MHz, used for I/O management. Wasn’t able to find a datasheet for the chip.

RAM:

Both Mode 5 and Mode 6 (N66 and N66 SR) give you 64KB of RAM.

Video:

The PC-6001 Mk2 SR had multiple video chips: MC6845 + M5C6847P-1

One or both of those chips are possibly modified.

Audio:

N66 BASIC provided access to the usual PSG chip: AY-3-8910

Japanese PC-6001 Mk2 had a speech synthesizer. Al-Warka didn’t. In Mode 6 the TALK command does nothing.

N66 SR BASIC provided access to an FM chip: Yamaha YM-2203 in addition to the PSG chip.

They were both usable. So you can actually play 6 tracks at the same time: 3 FM and 3 PSG.

N66 SR BASIC came with 12 FM preset instruments and it also allowed programming your own instrument if you knew the right combination of magical POKEs to the right addresses.

Display

Al-Warka PC-6001 had TV-out and can be connected to any normal TV with component video. It also had an RGB display port.

Al-Warka PC-6002 had an RGB display port and required a compatible NEC monitor to work.

N66 BASIC provided 2 graphics modes and 2 to 4 PAGES for display that could be either text or graphics:

  • 40x20 text mode with 15 colors foreground 8 colors background.
  • 320x200 @ 15 colors: pixels were written in pairs horizontally so in reality this was a 160x200 mode.
  • 320x200 @ 4 colors: pixels were true 320x200.

N66 SR BASIC provided 2 graphics mode as well. Always 2 PAGES, first is text and second is graphics.

  • Selectable text mode: 40x20, 40x25, 80x20, 80x25 with 16 colors.
  • 320x200 @ 16 colors: 15 color pixels
  • 640x200 @ 4 colors: palette was selectable out of the groups of 4 from the 15 colors available.

Storage

3.5” floppy disks compatible with normal 3.5” floppies.

Standard storage per floppy is around 160 KB. I’ve seen one disk that had more than 320 KB and it blew my mind back then. So it’s either 160 or 320 in double-sided mode. Never knew how to format disks to have 320 KB.

My PC came with a system disk that had two tools: FORMAT and BACKUP.

FORMAT of course formats new floppies to be used by BASIC. The actual code is in BASIC but the format functions are in assembly so it just looked like magic to me.

BACKUP was a very primitive disk-to-disk copy utility, you had to sit there and swap the floppies 20-30 times until the copying is done. It took nearly 40 minutes. It essentially copied disk tracks one at a time.

There were two types of Floppy Disk Drives. Called B and BE. Mine was the BE type. They were one-way compatible (B works on BE) and the FORMAT tool is different for them.



blog comments powered by Disqus

Published

20 April 2018

Category

pc-6002

Tags