Menu

#517 Cannot print to text file on Mac OS X

v2.4
open-need-info
nobody
None
Printers
2019-12-28
2014-04-22
Tron Thomas
No

Steps:
1. Write a BASIC program using x64sc on Mac OS X
2. Select "Peripheral Printers" from the Settings menu
3. Select the "Unit #4" tab
4. Make sure "Use IEC Device" is checked
5. Set "Printer Emulation" to "File Output"
6. Set Driver to ASCII
7. Set "File #1" to a valid file name path
8. Issue the following commands in the emulator:
OPEN 1,4
CMD 1
LIST
9. Close the emulator

Expected:
The BASIC program listing should be written to the text file.

Actual:
No file is created.

Discussion

  • gpz

    gpz - 2015-03-18

    is this still a problem with trunk?

     
  • Greg King

    Greg King - 2015-03-22

    What happens if you add the rest of the usual BASIC commands?

    8. Issue the following commands in the emulation:
     OPEN 1,4
     CMD 1
     LIST
     PRINT#1,;
     CLOSE 1
    
    9. Close the emulator.
    
     
  • Tron Thomas

    Tron Thomas - 2015-03-22

    When I do PRINT#1,1 I get
    ?DEVICE NOT PRESENT ERROR

    and I do not get any output written to file file after issuing CLOSE 1 and the emulator.

    This is the console output:
    VICE Version 2.4
    OS compiled for: Mac OS X 10.6
    GUI compiled for: COCOA
    CPU compiled for: x86_64
    Compiler used: clang 3.0.0
    Current OS: 10.10.2
    Current CPU: x86_64 [MacBookPro5,1] [2 CPUs] [4096 MiB RAM]

    Welcome to x64sc, the free portable C64 Emulator.

    Current VICE team members:
    D. Lem, A. Matthies, M. Pottendorfer, S. Trikaliotis, M. van den Heuvel,
    C. Vogelgsang, F. Gennari, D. Kahlin, A. Lankila, Groepaz, I. Korb,
    E. Smith, O. Seibert, M. Sutton, U. Schulz, S. Haubenthal, T. Giesel,
    K. Zsolt.

    This is free software with ABSOLUTELY NO WARRANTY.
    See the "About VICE" command for more info.

    Loading system file /Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/C64/kernal'. C64MEM: Kernal rev #3. Loading system file/Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/C64/basic'.
    Loading system file /Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/C64/chargen'. Loading system file/Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/PRINTER/mps803'.
    Palette: Loading palette /Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/PRINTER/mps803.vpl'. Loading system file/Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/PRINTER/nl10-cbm'.
    Palette: Loading palette /Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/PRINTER/mps803.vpl'. NL10: Printer driver initialized. Loading system file/Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/DRIVES/dos1541'.
    Loading system file /Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/DRIVES/d1541II'. Loading system file/Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/DRIVES/dos1570'.
    Loading system file /Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/DRIVES/dos1571'. Loading system file/Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/DRIVES/dos1581'.
    Loading system file /Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/DRIVES/dos2000'. Loading system file/Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/DRIVES/dos4000'.
    Loading system file /Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/DRIVES/dos2031'. Loading system file/Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/DRIVES/dos2040'.
    Loading system file /Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/DRIVES/dos3040'. Loading system file/Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/DRIVES/dos4040'.
    Loading system file /Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/DRIVES/dos1001'. Drive: Finished loading ROM images. VIC-II: Initializing chip model "MOS6569R3" (63 cycles per line, 312 raster lines). VIC-II: BA VIC-II: cycle xpos vi M76543210 fetch border gfx sprite VIC-II: 1 Phi1 $194 -- ----**--- SprPtr(3) - - - VIC-II: -- Phi2 $198 -- ----**--- SprDma0(3) - - - VIC-II: 2 Phi1 $19c -- ---***--- SprDma1(3) - - - VIC-II: -- Phi2 $1a0 -- ---***--- SprDma2(3) - - - VIC-II: 3 Phi1 $1a4 -- ---**---- SprPtr(4) - - - VIC-II: -- Phi2 $1a8 -- ---**---- SprDma0(4) - - - VIC-II: 4 Phi1 $1ac -- --***---- SprDma1(4) - - - VIC-II: -- Phi2 $1b0 -- --***---- SprDma2(4) - - - VIC-II: 5 Phi1 $1b4 -- --**----- SprPtr(5) - - - VIC-II: -- Phi2 $1b8 -- --**----- SprDma0(5) - - - VIC-II: 6 Phi1 $1bc -- -***----- SprDma1(5) - - - VIC-II: -- Phi2 $1c0 -- -***----- SprDma2(5) - - - VIC-II: 7 Phi1 $1c4 -- -**------ SprPtr(6) - - - VIC-II: -- Phi2 $1c8 -- -**------ SprDma0(6) - - - VIC-II: 8 Phi1 $1cc -- -**------ SprDma1(6) - - - VIC-II: -- Phi2 $1d0 -- -**------ SprDma2(6) - - - VIC-II: 9 Phi1 $1d4 -- -*------- SprPtr(7) - - - VIC-II: -- Phi2 $1d8 -- -*------- SprDma0(7) - - - VIC-II: 10 Phi1 $1dc -- -*------- SprDma1(7) - - - VIC-II: -- Phi2 $1e0 -- -*------- SprDma2(7) - - - VIC-II: 11 Phi1 $1e4 -- --------- Refresh - - - VIC-II: -- Phi2 $1e8 -- --------- - - - - VIC-II: 12 Phi1 $1ec -- *-------- Refresh - - - VIC-II: -- Phi2 $1f0 -- *-------- - - - - VIC-II: 13 Phi1 $1f4 -- *-------- Refresh - - - VIC-II: -- Phi2 $000 -- *-------- - - - - VIC-II: 14 Phi1 $004 -- *-------- Refresh - - - VIC-II: -- Phi2 $008 -- *-------- - - UpdateVc - VIC-II: 15 Phi1 $00c -- *-------- Refresh - - - VIC-II: -- Phi2 $010 -- *-------- FetchC - - ChkSprCrunch VIC-II: 16 Phi1 $014 -- *-------- FetchG - - - VIC-II: -- Phi2 $018 0 *-------- FetchC - - UpdateMcBase VIC-II: 17 Phi1 $01c 0 *-------- FetchG - - - VIC-II: -- Phi2 $020 1 *-------- FetchC ChkL1 - - VIC-II: 18 Phi1 $024 1 *-------- FetchG - - - VIC-II: -- Phi2 $028 2 *-------- FetchC ChkL0 - - VIC-II: 19 Phi1 $02c 2 *-------- FetchG - - - VIC-II: -- Phi2 $030 3 *-------- FetchC - - - VIC-II: 20 Phi1 $034 3 *-------- FetchG - - - VIC-II: -- Phi2 $038 4 *-------- FetchC - - - VIC-II: 21 Phi1 $03c 4 *-------- FetchG - - - VIC-II: -- Phi2 $040 5 *-------- FetchC - - - VIC-II: 22 Phi1 $044 5 *-------- FetchG - - - VIC-II: -- Phi2 $048 6 *-------- FetchC - - - VIC-II: 23 Phi1 $04c 6 *-------- FetchG - - - VIC-II: -- Phi2 $050 7 *-------- FetchC - - - VIC-II: 24 Phi1 $054 7 *-------- FetchG - - - VIC-II: -- Phi2 $058 8 *-------- FetchC - - - VIC-II: 25 Phi1 $05c 8 *-------- FetchG - - - VIC-II: -- Phi2 $060 9 *-------- FetchC - - - VIC-II: 26 Phi1 $064 9 *-------- FetchG - - - VIC-II: -- Phi2 $068 10 *-------- FetchC - - - VIC-II: 27 Phi1 $06c 10 *-------- FetchG - - - VIC-II: -- Phi2 $070 11 *-------- FetchC - - - VIC-II: 28 Phi1 $074 11 *-------- FetchG - - - VIC-II: -- Phi2 $078 12 *-------- FetchC - - - VIC-II: 29 Phi1 $07c 12 *-------- FetchG - - - VIC-II: -- Phi2 $080 13 *-------- FetchC - - - VIC-II: 30 Phi1 $084 13 *-------- FetchG - - - VIC-II: -- Phi2 $088 14 *-------- FetchC - - - VIC-II: 31 Phi1 $08c 14 *-------- FetchG - - - VIC-II: -- Phi2 $090 15 *-------- FetchC - - - VIC-II: 32 Phi1 $094 15 *-------- FetchG - - - VIC-II: -- Phi2 $098 16 *-------- FetchC - - - VIC-II: 33 Phi1 $09c 16 *-------- FetchG - - - VIC-II: -- Phi2 $0a0 17 *-------- FetchC - - - VIC-II: 34 Phi1 $0a4 17 *-------- FetchG - - - VIC-II: -- Phi2 $0a8 18 *-------- FetchC - - - VIC-II: 35 Phi1 $0ac 18 *-------- FetchG - - - VIC-II: -- Phi2 $0b0 19 *-------- FetchC - - - VIC-II: 36 Phi1 $0b4 19 *-------- FetchG - - - VIC-II: -- Phi2 $0b8 20 *-------- FetchC - - - VIC-II: 37 Phi1 $0bc 20 *-------- FetchG - - - VIC-II: -- Phi2 $0c0 21 *-------- FetchC - - - VIC-II: 38 Phi1 $0c4 21 *-------- FetchG - - - VIC-II: -- Phi2 $0c8 22 *-------- FetchC - - - VIC-II: 39 Phi1 $0cc 22 *-------- FetchG - - - VIC-II: -- Phi2 $0d0 23 *-------- FetchC - - - VIC-II: 40 Phi1 $0d4 23 *-------- FetchG - - - VIC-II: -- Phi2 $0d8 24 *-------- FetchC - - - VIC-II: 41 Phi1 $0dc 24 *-------- FetchG - - - VIC-II: -- Phi2 $0e0 25 *-------- FetchC - - - VIC-II: 42 Phi1 $0e4 25 *-------- FetchG - - - VIC-II: -- Phi2 $0e8 26 *-------- FetchC - - - VIC-II: 43 Phi1 $0ec 26 *-------- FetchG - - - VIC-II: -- Phi2 $0f0 27 *-------- FetchC - - - VIC-II: 44 Phi1 $0f4 27 *-------- FetchG - - - VIC-II: -- Phi2 $0f8 28 *-------- FetchC - - - VIC-II: 45 Phi1 $0fc 28 *-------- FetchG - - - VIC-II: -- Phi2 $100 29 *-------- FetchC - - - VIC-II: 46 Phi1 $104 29 *-------- FetchG - - - VIC-II: -- Phi2 $108 30 *-------- FetchC - - - VIC-II: 47 Phi1 $10c 30 *-------- FetchG - - - VIC-II: -- Phi2 $110 31 *-------- FetchC - - - VIC-II: 48 Phi1 $114 31 *-------- FetchG - - - VIC-II: -- Phi2 $118 32 *-------- FetchC - - - VIC-II: 49 Phi1 $11c 32 *-------- FetchG - - - VIC-II: -- Phi2 $120 33 *-------- FetchC - - - VIC-II: 50 Phi1 $124 33 *-------- FetchG - - - VIC-II: -- Phi2 $128 34 *-------- FetchC - - - VIC-II: 51 Phi1 $12c 34 *-------- FetchG - - - VIC-II: -- Phi2 $130 35 *-------- FetchC - - - VIC-II: 52 Phi1 $134 35 *-------- FetchG - - - VIC-II: -- Phi2 $138 36 *-------- FetchC - - - VIC-II: 53 Phi1 $13c 36 *-------- FetchG - - - VIC-II: -- Phi2 $140 37 *-------- FetchC - - - VIC-II: 54 Phi1 $144 37 *-------- FetchG - - - VIC-II: -- Phi2 $148 38 *-------- FetchC - - - VIC-II: 55 Phi1 $14c 38 --------* FetchG - - ChkSprDma VIC-II: -- Phi2 $150 39 --------* - - - - VIC-II: 56 Phi1 $154 39 --------* Idle - - ChkSprDma VIC-II: -- Phi2 $158 -- --------* - ChkR0 - ChkSprExp VIC-II: 57 Phi1 $15c -- -------** Idle - - - VIC-II: -- Phi2 $160 -- -------** - ChkR1 - - VIC-II: 58 Phi1 $164 -- -------** SprPtr(0) - - ChkSprDisp VIC-II: -- Phi2 $168 -- -------** SprDma0(0) - UpdateRc - VIC-II: 59 Phi1 $16c -- ------*** SprDma1(0) - - - VIC-II: -- Phi2 $170 -- ------*** SprDma2(0) - - - VIC-II: 60 Phi1 $174 -- ------**- SprPtr(1) - - - VIC-II: -- Phi2 $178 -- ------**- SprDma0(1) - - - VIC-II: 61 Phi1 $17c -- -----***- SprDma1(1) - - - VIC-II: -- Phi2 $180 -- -----***- SprDma2(1) - - - VIC-II: 62 Phi1 $184 -- -----**-- SprPtr(2) - - - VIC-II: -- Phi2 $188 -- -----**-- SprDma0(2) - - - VIC-II: 63 Phi1 $18c -- ----***-- SprDma1(2) - - - VIC-II: -- Phi2 $190 -- ----***-- SprDma2(2) - - - MacVideo: machine refresh period=19.9503 ms MacVideo: set canvas [0] pixel aspect ratio to 0.936508 MacVideo: reconfiguring canvas [0] MacVideo: setup textures: #1 768 x 544 (was: #0 768 x 544) opening dynamic library /opt/local/lib/libmp3lame.dylib failed! ERROR setting up dynamic lame lib! Sound: Available sound devices: coreaudio dummy fs dump wav voc iff aiff soundmovie Keyboard: Loading keymap/Users/tron/Applications/Vice2.4/x64sc.app/Contents/MacOS/../Resources/ROM/C64/osx_sym_us.vkm'.
    mac_joy: loaded HID device list with IOHIDManager. found 0 devices
    mac_joy: (auto) found 0 HID devices. HID A='' B=''
    mac_joy: (auto) done
    Main CPU: starting at ($FFFC).
    Main CPU: RESET.
    Sound: Opened device `coreaudio', speed 44100Hz, fragment size 11ms, buffer size 104ms
    reSID: MOS6581, filter on, sampling rate 44100Hz - fast
    Drive 8: RESET.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.
    Serial Interface: Auto-opening printer #4.
    Serial Interface: Error - Couldn't open device #4.

     
  • dqh

    dqh - 2019-12-28
    • status: open --> open-need-info
    • Port: MacOS X -->
     
  • dqh

    dqh - 2019-12-28

    If this is a valid issue, then it is still an issue in Vice 3.4 GTK3 on macOS & Linux. Haven't tested Windows. However, if I change OPEN 1,4 to OPEN 1,4,7 then it seems to work in both macOS and Linux. I don't know enough about this to know what the right behaviour is, but this is not a mac specific issue so i'm removing the macOS tag. Also seems to be fairly easy to make it segfault by messing with printer settings after the OPEN.

     
  • Greg King

    Greg King - 2019-12-28

    It works in Windows. (The "IEC Device" setting has no effect.)

     

Log in to post a comment.