mirror of
https://github.com/RyuKojiro/apple1.git
synced 2025-01-17 05:31:48 +00:00
Fixed newline character translation
git-svn-id: svn+ssh://svn.phoenixbox.net/svn/apple1/trunk@15 64f78de7-aa59-e511-a0e8-0002a5492df0
This commit is contained in:
parent
db84fee47d
commit
a83bd0fa8b
@ -26,7 +26,7 @@ char asciiCharFromA1Char(uint8_t c) {
|
|||||||
uint8_t a1CharFromAsciiChar(char c) {
|
uint8_t a1CharFromAsciiChar(char c) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case '\\': return 0xDC;
|
case '\\': return 0xDC;
|
||||||
case '\n': return 0x8D;
|
case '\r': return 0x8D;
|
||||||
}
|
}
|
||||||
return (char)c;
|
return (char)c;
|
||||||
}
|
}
|
||||||
@ -34,7 +34,7 @@ uint8_t a1CharFromAsciiChar(char c) {
|
|||||||
void videoWriteCharCallback(struct _v6502_memory *memory, uint16_t offset, uint8_t value, void *context) {
|
void videoWriteCharCallback(struct _v6502_memory *memory, uint16_t offset, uint8_t value, void *context) {
|
||||||
if (value) {
|
if (value) {
|
||||||
char c = asciiCharFromA1Char(value);
|
char c = asciiCharFromA1Char(value);
|
||||||
if (c == '\r') {
|
if (c == '\n') {
|
||||||
fprintf(stdout, "\n\r");
|
fprintf(stdout, "\n\r");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user