Recording utility published for my Commodore datasette emulator, C2NEmu

It has been a while since I had done any software development for C2NEmu but I thought to publish one missing utility that might be quite handy, albeit not for many: recording DMP files directly from a host computer where a saving process is running (e.g. the BASIC SAVE command or the Cyberload tape masterer is running).

For the time being only the Windows binary is available here.

The way it works is quite simple: users just run the utility on a PC pointing it to the virtual COM port C2NEmu is attached to and select an output filename.

D:\development\embedded\c2n_emulator\software\c2nemu-record\bin>c2nemu-record.exe COM9 helloworld.dmp
C2NEmu record utility, rel 1.0 - (C) 2017 Luigi Di Fraia
Communicates with a C2NEmu device to record tapes

Reading from COM9
Issue SAVE on the host... OK
Stop the recording chain with spacebar
Filename intercepted: HELLO WORLD!
Request to stop recording sent
Finished!
Total bytes saved: 85330

You might notice that the filename interceptor is available (for “CBM ROM Loader” and “Tutbotape 250″) and that multiple files can be saved to a single tape image in order to create a multiload tape or simply group together a few files. Once users are happy with the result, pressing space on the PC side stops the recording process.

Let’s have a look at TAPClean’s report for the file I saved above with SAVE”HELLO WORLD!” from BASIC:

TAPClean version: 0.35-pre8

GENERAL INFO AND TEST RESULTS

TAP Name    : D:\development\embedded\c2n_emulator\software\c2nemu-record\bin\helloworld.dmp
TAP Size    : 42506 bytes (41 kB)
TAP Version : 1
Recognized  : 100%
Data Files  : 4
Pauses      : 3
Gaps        : 0
Magic CRC32 : E594EE40
TAP Time    : 0:22.78
Bootable    : YES (1 part, name: HELLO WORLD!)
Loader ID   : n/a

Overall Result    : FAIL

Header test       : PASS [Sig: OK] [Ver: OK] [Siz: OK]
Recognition test  : PASS [42486 of 42486 bytes accounted for] [100%]
Checksum test     : PASS [4 of 4 checksummed files OK]
Read test         : PASS [0 Errors]
Optimization test : FAIL [0 of 4 files OK]






FILE FREQUENCY TABLE

PAUSE (3)
C64 ROM-TAPE HEADER (2)
C64 ROM-TAPE DATA (2)





FILE DATABASE

---------------------------------
Seq. no.: 1
File Type: PAUSE
Location: $0014 -> $0000 -> $0000 -> $0017
 - Length : 5137160 cycles (5.2141 secs)

---------------------------------
Seq. no.: 2
File Type: C64 ROM-TAPE HEADER
Location: $0018 -> $6ACC -> $79CC -> $79E1
LA: $033C  EA: $03FB  SZ: 192
File Name: HELLO WORLD!
Pilot/Trailer Size: 27136/0
Checkbyte Actual/Expected: $3F/$3F, PASS
Read Errors: 0
Unoptimized Pulses: 29961
CRC32: A104AF98
 - File ID : FIRST
 - DATA FILE type : BASIC
 - DATA FILE Load address : $0801
 - DATA FILE End address : $081E
 - DATA FILE Size (calculated) : 29 bytes

---------------------------------
Seq. no.: 3
File Type: C64 ROM-TAPE HEADER
Location: $79E2 -> $7AE5 -> $89E5 -> $8A48
LA: $033C  EA: $03FB  SZ: 192
File Name: HELLO WORLD!
Pilot/Trailer Size: 79/78
Checkbyte Actual/Expected: $3F/$3F, PASS
Read Errors: 0
Unoptimized Pulses: 2986
CRC32: A104AF98
 - File ID : REPEAT
 - DATA FILE type : BASIC
 - DATA FILE Load address : $0801
 - DATA FILE End address : $081E
 - DATA FILE Size (calculated) : 29 bytes

---------------------------------
Seq. no.: 4
File Type: PAUSE
Location: $8A49 -> $0000 -> $0000 -> $8A4C
 - Length : 327688 cycles (0.3326 secs)

---------------------------------
Seq. no.: 5
File Type: C64 ROM-TAPE DATA
Location: $8A4D -> $A001 -> $A245 -> $A25A
LA: $0801  EA: $081D  SZ: 29
Pilot/Trailer Size: 5376/0
Checkbyte Actual/Expected: $2A/$2A, PASS
Read Errors: 0
Unoptimized Pulses: 5916
CRC32: D1C5C788
 - File ID : FIRST

---------------------------------
Seq. no.: 6
File Type: C64 ROM-TAPE DATA
Location: $A25B -> $A35E -> $A5A2 -> $A605
LA: $0801  EA: $081D  SZ: 29
Pilot/Trailer Size: 79/78
Checkbyte Actual/Expected: $2A/$2A, PASS
Read Errors: 0
Unoptimized Pulses: 686
CRC32: D1C5C788
 - File ID : REPEAT

---------------------------------
Seq. no.: 7
File Type: PAUSE
Location: $A606 -> $0000 -> $0000 -> $A609
 - Length : 322880 cycles (0.3277 secs)






PULSE FREQUENCY TABLE

0x2B (49)
0x2C (3)
0x2D (2254)
0x2E (17459)
0x2F (17400)
0x30 (3)
0x3F (11)
0x40 (873)
0x41 (1185)
0x42 (2751)
0x55 (4)
0x56 (171)
0x57 (311)




And here’s the Data PRG decoded as BASIC program:

1 PRINT"HELLO WORLD!"
2 GOTO1

Not bad, is it? 🙂

This entry was posted in Retrocomputing, Technical and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s