It is currently Wed May 14, 2025 9:53 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Wed Jan 13, 2010 12:22 pm 
Offline
User avatar

Joined: Tue Jan 12, 2010 8:46 pm
Posts: 15
Location: Tirol
I'm a beginner with JAVA programming.

I try to make a JAVA API to comunicate with a XS-1541 device to read whole diskettes into a D64 image file. Cause Java didn#t have own serial support for Win32 I use this RXTX library.

This RXTX works fine up to the moment data flow is very fast. It is a problem of RXTX or JAVA maybe, cause XS-1541 with Hyperterm work perfectly.



XS-1541 uses floppy code from OpenCBM to read fast. OpenCBM supports different protocolls:
+ S1 - slow
+ S2 faster
+ PAR for parallel floppyies


RXTX seems to loose chars if communication run permanently or big data blocks. S1 and S2 works fine, with PAR floppy send a whole track in 600ms (3 rotations, interleave 1:3).

In this RXTX lib I have tried all to get it run. Input buffers are 16K, so a whole track fit without troubles.

Any idea how to get a working serial communication under JAVA?

_________________
Final Expansion 3, the most powerful cartridge for your VIC-20


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 13, 2010 7:32 pm 
Offline

Joined: Sun Feb 10, 2008 5:55 am
Posts: 75
Hmm, I use RXTX under Java for COM and I don't remember havng any issues with speed. I'll check my init code.

Jim


Top
 Profile  
Reply with quote  
PostPosted: Thu Jan 14, 2010 10:00 am 
Offline
User avatar

Joined: Tue Jan 12, 2010 8:46 pm
Posts: 15
Location: Tirol
brain wrote:
I'll check my init code.

Thanks, that would be nice. :D

_________________
Final Expansion 3, the most powerful cartridge for your VIC-20


Top
 Profile  
Reply with quote  
PostPosted: Fri Jan 15, 2010 8:09 pm 
Offline
User avatar

Joined: Tue Jan 12, 2010 8:46 pm
Posts: 15
Location: Tirol
Problem solved. :D

by using a "BufferedInputStream" instead of a "InputStream" as described in many sample codes it is working fine now:

Code:
         inputStream = new BufferedInputStream(serialPort.getInputStream(), 16384);
            outputStream = serialPort.getOutputStream();

_________________
Final Expansion 3, the most powerful cartridge for your VIC-20


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group