6

The Neo Kobe - NEC PC-6001 "software capsule" on Internet Archive includes a 126 MB ZIP file, Neo Kobe - NEC PC-6001 (2016-02-25).zip, containing a subdirectory 1-Screen Programs (Kaw)/. This contains two .7z archives:

1-Screen Programs [CT].7z
1-Screen Programs [extras].7z

The first, when unpacked, gives me files around 300-500 bytes long with .p6 extensions:

1-Screen Programs (01 On-naji) {m1p1}.p6
1-Screen Programs (02 Iroai) {m1p1}.p6
1-Screen Programs (03 Tiny Typing Game) {m1p1}.p6
...

Based on looking at the files themselves, the accompanying descriptions in .txt files in the "extras" archive and the "CT" in the archive name, I am guessing that these are the data of cassette tape saves of tokenzied BASIC programs. Here's a dump of the tiny typing game from above:

00000000: d3d3 d3d3 d3d3 d3d3 d3d3 546e 7954 7970  ..........TnyTyp
00000010: 0dc4 0000 53d2 303a 54d2 3000 35c4 0100  ....S.0:T.0.5...
00000020: a03a a526 4831 3035 383a 50d2 353a 57d2  .:.&H1058:P.5:W.
00000030: d528 dd28 3129 cc32 3629 ca39 373a 54d2  .(.(1).26).97:T.
00000040: 54ca 3100 53c4 0200 58d2 d528 dd28 3129  T.1.S...X..(.(1)
00000050: cc33 3229 3a59 d2d5 28dd 2831 29cc 3134  .32):Y..(.(1).14
00000060: 2900 6ec4 0300 a158 2c59 3a95 e928 5729  ).n....X,Y:..(W)
00000070: 3a81 4ad2 30c3 3530 cb54 3a82 0082 c404  :.J.0.50.T:.....
00000080: 0049 24d2 c63a 8a49 24d2 e928 5729 c737  .I$..:.I$..(W).7
00000090: 0095 c405 0050 d250 cb31 3aa0 3a8a 50d1  .....P.P.1:.:.P.
000000a0: 30c7 3200 9cc4 0600 8838 00c6 c407 00a1  0.2......8......
000000b0: 3135 2c31 323a 9522 4f4b 2122 3aa7 2266  15,12:."OK!":."f
000000c0: 223a 53d2 53ca 503a 814a d230 c335 303a  ":S.S.P:.J.0.50:
000000d0: 823a 8831 00d1 c408 008a 50d1 30c7 3100  .:.1......P.0.1.
000000e0: 08c5 0900 a131 2c31 313a 9522 596f 7520  .....1,11:."You
000000f0: 6172 6522 54cb 3122 2074 696d 6573 204f  are"T.1" times O
00000100: 4b2c 222c 5322 2f22 54cc 3522 2070 7473  K,",S"/"T.5" pts
00000110: 2047 6574 2e22 0000 0000 0000 0000 0000   Get."..........
00000120: 0000 

This one is slightly unusual in that appears to include its name near the beginning of the file; only one other does this. My guess is that this would be the name you can assign to a cassette tape save to be shown on load, or specified so that one can skip past files with other names.

Does anybody know how I might detokenize these to read them, turn them into WAV files or similar that I could load in via the cassette interface on my PC-6001, or otherwise get them on to my PC-6001?

(I would also welcome hints in the comments pointing to other sources of PC-6001 software that, if investigated, might provide illumination on this matter.)


Update: I've also found another file, Ax7 Demo (19xx)(-)[Mode 1, Page 1].cas from a completely different source that has a .cas extension instead of of .p6, but also appears to be in the same format: five words of $d3d3 followed by a filename. It may be machine language instead of tokenized basic, or a BASIC loader followed by machine language in some form, but it seems to be becoming clear that these are cassette tape file images.

6

am guessing that these are the data of cassette tape saves of tokenzied BASIC programs.

Exactly. It's what they are. .P6 files are basically cassette images for some Emulators. Detecting the extension allows automatic switching to P[C-]6[001] mode - or at least helps the user to keep them apart.

In fact, it's common practice in the P6 community to use the program name of cassette files to denote video mode and pages, as they differ between models and emulators have to be set up the right way beforehand. Something like {m1p1}.p6 is a casettte save for a program to be executed on a computer (emulation) capable (set) to screen mode 1, using 1 page of video RAM.

IP6WIN and PC6001VW being the most well known Emulators. Another one would be yaPC-6001 for Windows. It's part of the 'Common Source Code Project', kind of a Japan specific MAME, and for sure wort a second and third look.

This one is slightly unusual in that appears to include its name near the beginning of the file; only one other does this. My guess is that this would be the name you can assign to a cassette tape save [...]

Yes. When saved with a name, the name can be used for searching along a tape. Names are not required, so not every file will have one. Much like with other BASICs of that era, like PET BASIC. After all, the P6's BASIC is a straight Microsoft Z80-BASIC.

Does anybody know how I might detokenize these to read them, turn them into WAV files or similar that I could load in via the cassette interface on my PC-6001, or otherwise get them on to my PC-6001?

They are straight forward saves of the cassette data, so the best way is to just load them with the corresponding emulator. For use with a real machine it's as usual your specific setup, especially the ways data can be transferred to them. But that's a huge topic on it's own.

Turning them into sound files again seams like a way too complicated attempt (*1) There was a serial interface (PC-6061) which could be build into the base housing (*2). This might be hard to find nowadays (unless already build in by the previous owner), but the PC-6001 is a rather clean Z80 machine, so building a new one - maybe even compatible - should be not hard (*3).

With some willingness to write code and an interface it may be a considerable task to write a small program receiving these files from a PC, striping the headers and placing them in memory, ready to be saved to disk. Programming can be done with Z88DK's ZCC C-Compiler as it got as well a PC-6001 target.

I would recommend to browse thru Japanese sites for the P6001 as there are plenty of information hidden (yes, I know, it takes lots of time :)) p6ers.net is a very active community and may be the best starting point to dig into the P6-Verse.


*1 - There is no tool I know of to convert .P6 into .WAV again, but one for the other way around: P6DatRec. It also can convert them to BASIC listings. So maybe a starting point if there's source available.

*2 - Note the little break out area in the upper right corner when looking at from behind.

*3 - In similar cases I tend to use a FTDI UM245R module to directly bring a USB connection to the 8 bit machine without going thru all the hassles of serial drivers and so on. The Module handles all USB communication and offers an extreme simple parallel port, easy to integrate - sometimes all it needs are a few wires - and software is thus extreme simple - read byte/write byte style.

  • My PC-6001 has no disk and is never likely to have one. The easiest way for me to get data into it is to play audio into the cassette port. Munging something to transfer data via the printer or cartridge ports (there is no hardware serial interface, as far as I'm aware) is a possibility, but even once it's in there's still the issue of getting it into the right internal format. I'll investigate the links in your answer; they look very helpful! – Curt J. Sampson Sep 5 at 13:25
  • @CurtJ.Sampson There is an external serial adaptor for the P6. And it might be straight forward to build some interface as well. After all, it's a rather plain Z80 machine. No need to 'make' a 'right' format, as the fles are already that way. Like with any other MS-BASIC it's just a memory dump of the program section. And turning them into sound is quite work - then again, I think there was even something like that ... I remember having seen it once ... let me google a bit. – Raffzahn Sep 5 at 13:39
  • @CurtJ.Sampson got it, wasn only the other way around - called P6DatRec, see update. – Raffzahn Sep 5 at 14:02
  • One can get from .p6 at least part-way back to audio; I dropped the info that and different tool for converting .p6 to BASIC listings into my answer. The UM245R is a brilliant little device; thanks for that! Re the break out area, I can't see it in the Wikipedia mobo image. Looking at the adapter itself it looks like it plugs into the headers at the right of that image; the "RS-232C" panel on the back is to the right of the RF modulator. – Curt J. Sampson Sep 5 at 14:24
  • 1
    Oh, wait, I see; by "break out" you meant not a break-out area on the PC board, but a break-out panel on the case. Got it. – Curt J. Sampson Sep 5 at 14:25
2

The PC6100V emulator has a file format called P6T which appears to describe cassette tape files as their audio format, rather than as the data in them. There is a conversion tool P6toP6T (C source included) that converts P6 files to P6T files. (A quick scan of the read_basic() function seems to indicate that the "P6" format it reads is the one described in the question.) So that gets one part way to getting an audio version of the cassette file.

Another option, if one just wants to read the BASIC code from the above files on a modern computer (perhaps to type it in by hand :-)) is to use the bas2txt program from N6XBasicChecker (source available), which converts from the tape images with BASIC programs described in the question to text files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.