| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Help me!
So I'm coding some EasyFlash stuff so most often the kernel is swapped in ($01 = #$37).
Take a look at the following chis (VICE cpu history): https://i.postimg.cc/sg9xL7xV/temp-Image-Gb-W5z-N.avif
I'm putting a CR to $ffd2 and all goes well until it hits $ed41 where the CPU fetches a JAM-instruction. How's that even possible?! The ROM can't be altered. Comparing to ROM-listings it should do a JSR $EE97 there.
There is a SEI just infront if that matters.
(Only tested in HEAD VICE and some older version like 3.6 and 3.8). Could it be an emulation bug?
((Nevermind the .arbX label, it's just my loaded labels from the assembler. In the ROM it's just BIT $94)).
It happens VERY seldom. |
|
... 15 posts hidden. Click here to view all posts.... |
| |
Martin Piper
Registered: Nov 2007 Posts: 716 |
Quote: Quoting JackAsserI need to submit a patch for a proper fflush() on each $ffd2 though. Currently on my mac it's line buffered which is a bit annoying. Line-buffered output is a good thing.
Maybe you just want a way to issue a flush from a guest-side KERNAL call? =)
Not when single step debugging and the output has been triggered, and you're watching the debug log file in an external editor. In those situations the external editor visible log file won't reflect the most recent events until they are flushed, which can be several C64 logging calls behind. |
| |
Krill
Registered: Apr 2002 Posts: 2968 |
Quoting Martin PiperNot when single step debugging [...] ... earlier ...
Quoting JackAsserSingle step in the debugger is too low level So then, a way to enable/disable buffering via KERNAL call? |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: What even are virtual device traps?
A way for VICE to intercept standard kernel I/O-calls and execute them immediatly instead of doing the full emulation of the $dd00-dance. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: A way for VICE to intercept standard kernel I/O-calls and execute them immediatly instead of doing the full emulation of the $dd00-dance.
So basically, by attaching a raw printer that emits to a file and the do an open 1,4,7 you’ll get an easy debug print interface via $ffd2. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Quoting Martin PiperNot when single step debugging [...] ... earlier ...
Quoting JackAsserSingle step in the debugger is too low level So then, a way to enable/disable buffering via KERNAL call?
Imo it shouldn’t be line buffered at all - ever. When you send a character to a printer connected to a c64, that character is printed directly. And so should it behave when emulated to a file also.
Maybe a toggle switch in the VICE-settings. |
| |
Krill
Registered: Apr 2002 Posts: 2968 |
Quoting JackAsserImo it shouldn’t be line buffered at all - ever. When you send a character to a printer connected to a c64, that character is printed directly. And so should it behave when emulated to a file also. Ok, fair point. =) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11346 |
Quote:Anyways, VICE works fine. I need to submit a patch for a proper fflush() on each $ffd2 though. Currently on my mac it's line buffered which is a bit annoying.
I believe those extra fflush calls are what screws up your warpmode in windows :=) |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Quote:Anyways, VICE works fine. I need to submit a patch for a proper fflush() on each $ffd2 though. Currently on my mac it's line buffered which is a bit annoying.
I believe those extra fflush calls are what screws up your warpmode in windows :=)
Highely likely. I wouldn’t use fflush explicitly though now that I think of it.
I’d do a setvbuf to turn off buffering on the stream, and use fcntl() with O_DSYNC | O_RSYNC on the underlying FD. The OS block-level cache should be able to ensure the same speed even if the stream itself is unbuffered.
Will try on my already patched VICE-install. :) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11346 |
feel free to examine other fflush calls in the log code :) |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Yeah. Also, would be fun to do a gprof in warpmode to see the bottlenecks. :) |
Previous - 1 | 2 | 3 - Next |