dirkwhoffmann / vAmiga

vAmiga is a user-friendly Amiga 500, 1000, 2000 emulator for macOS
https://dirkwhoffmann.github.io/vAmiga
Other
293 stars 24 forks source link

serial data transmission and data item size #803

Closed mithrendal closed 5 months ago

mithrendal commented 6 months ago

Hi Dirk vAmigaCore 2.3 generated a message for each outgoing serial data item, i.e. it sent directly the internal transmitted data buffer which can contain 8 or 9 bits.

Version 2.4 was refactored in order to not let the vAmigaCore generate a message for each outgoing byte, which was considered to be spamming the message listener and thereby wasting some performance in case nobody listens for serial data transmission. As a result the transmit data buffer is now not outputted directly anymore. Instead its data is copied into a string of characters where the size of each char is 8 Bit. Obviously the 9th data bit (d8) defined in the HRM is lost this way.

to let the vAmigaCore also transmit the bit D8, I applied the following change in SerialPort.cpp / SerialPort.h

instead of the string outgoing;

I used a u16 string (which has enough bits to store the 9 bit transmit buffer) std::u16string outgoing;

see for your reference also here https://github.com/vAmigaWeb/vAmigaWeb/commit/26c097581c9d168a3ac6af2683805121d1ae0f6d

dirkwhoffmann commented 5 months ago

Fixed in v2.5b1