aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use an asynchronous timer instead of polling nstime()use_timerH. Peter Anvin2018-10-268-72/+162
|
* clock.c: justera polltiden beroende på vald frekvensH. Peter Anvin2018-10-261-1/+9
| | | | | | | Ju högre simulerad frekvens, ju fler T-states innan vi gör en event poll. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* clock: only check wall time every 64 T-statesH. Peter Anvin2018-10-255-22/+50
| | | | | | | nstime() can be pretty expensive, so only check the timing every 64 T-states; this corresponds to 21 µs at 3 MHz. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* HELP.txt: update help textH. Peter Anvin2018-10-041-7/+11
| | | | Update help text to match the current executable...
* abc80sim 3.2abc80sim-3.2H. Peter Anvin2018-10-041-1/+1
|
* mkrel: script to create all release filesH. Peter Anvin2018-10-041-0/+42
|
* console: don't rely on autoconf to find AttachConsole()H. Peter Anvin2018-10-042-3/+2
| | | | | | AttachConsole() is totally Win32-specific anyway, so instead of using autoconf to find it, just look for __WIN32__. Apparently autoconf fails to find it on 32-bit MinGW.
* Merge tag 'abc80sim-3.1'H. Peter Anvin2018-10-030-0/+0
|\ | | | | | | abc80sim 3.1
| * abc80sim 3.1abc80sim-3.1H. Peter Anvin2018-10-021-1/+1
| |
* | clock: for ABC800, interpolate CTC based on virtual timeH. Peter Anvin2018-10-033-19/+28
| | | | | | | | | | | | | | If we are running in speed-accurate mode (limit_speed == true), then calculate interpolated CTC values based on virtual time (TSTATEs) since the last timer event on that channel. This makes it look to the virtual CPU as the counter is moving smoothly.
* | nstime.c: Win32 implementation of mynssleep()H. Peter Anvin2018-10-031-3/+35
| | | | | | | | A Win32 implementation of mynssleep() using a Win32 waitable timer
* | clock: correct the computation of the next clockH. Peter Anvin2018-10-031-5/+3
| |
* | Allow the simulated CPU to run all the way to the next eventH. Peter Anvin2018-10-031-14/+11
| | | | | | | | | | | | Allow the simulated CPU to keep free-running until it has caught up to the next timer event. This maximizes the time we can sleep as well as the amount of slack we can take up for slow I/O models.
* | abc80: have "faketype" and "realtype" mode, realtype for <= 12.5 MHzH. Peter Anvin2018-10-034-14/+28
| | | | | | | | | | | | | | The ABC80 timed-loop keyboard repeat gets too fast at very high speeds. The cutoff is somewhere in the 10-15 MHz range for most users on modern keyboards. Make it an option for the user to enable or disable.
* | Set sleep threshold to 2 ms or until the next eventH. Peter Anvin2018-10-033-18/+67
| | | | | | | | | | | | Increase the sleep threshold to 2 ms, but put in a check for when the next event is due. This seems to be a very good compromise between performance and accuracy.
* | clock: use absolute time for sleeping if availableH. Peter Anvin2018-10-034-8/+51
| |
* | clock: wake up every 1 ms, since SDL does anywayH. Peter Anvin2018-10-031-2/+6
| | | | | | | | | | | | It seems SDL (tries to) wakes up every 1 ms no matter what, so we might as well try to run at that granularity. If we sleep too long we'll catch up anyway.
* | Remove stray blank in the help textH. Peter Anvin2018-10-021-1/+1
| |
* | Add a blank line to the help textH. Peter Anvin2018-10-021-1/+1
| |
* | abc80sim 3.1H. Peter Anvin2018-10-022-28/+37
|/
* Correct parsing of path optionsH. Peter Anvin2018-10-021-3/+3
|
* Fix -C options, make console -e to match -FeH. Peter Anvin2018-10-021-3/+4
| | | | "c" makes more sense for the cassette anyway...
* Set the default frequency to 3 MHzH. Peter Anvin2018-10-021-2/+2
| | | | 3 MHz being the original ABC80/802 frequency.
* Redo the parsing of filename optionsH. Peter Anvin2018-10-021-77/+133
| | | | | Redo the parsing of filename options, and add two-letter short options for files (-Fx), directories (-Dx), or file lists (-Lx).
* clock: allow us to be up to 250 ms behind scheduleH. Peter Anvin2018-10-021-2/+2
| | | | | Allow us to lag by up to 250 ms before giving up and resetting the clock. Beyond this, the execution is likely to be unacceptably choppy.
* Add option to set the speed of the simulated CPUH. Peter Anvin2018-10-024-5/+66
| | | | | | Now when we are counting clocks, we can sleep if we get too far ahead of ourselves. For reference, on a Core i7-6600U at 2.6 GHz the simulated CPU runs at 150-200 MHz if I don't throttle it.
* z80: count cycles (T-states), block instructions take interruptsH. Peter Anvin2018-10-013-251/+192
| | | | | | | | | | | Count the number of cycles taken by our virtual processor. As part of that, clean up the handling of block instructions: they are really nothing other than a loop around the non-repeated versions of the same instructions, followed by an internal jump. The CPU even re-fetches the opcodes... This is very important to do correctly, because a block transfer can be terminated in the middle by an interrupt.
* Fix potentiolly uninitialized warningH. Peter Anvin2018-10-011-1/+1
|
* Rename abcprint.c to simprint.cH. Peter Anvin2018-10-012-1/+1
| | | | | This file is the interface between abcprint and the simulator, so make it named saner.
* Add PUT command, binary I/O now is binary even to text filesH. Peter Anvin2018-10-012-75/+133
| | | | | | | | Add a PUT command, rename READ BLOCK to GET. GET/PUT/PREAD/PWRITE are always binary, even to text files. This matches ABC behavior. To make this possible, do text file conversion in our own code rather than relying on the OS.
* Allow the default block size (253) to be overridden, e.g. for CP/M.H. Peter Anvin2018-10-012-23/+52
|
* Add an option to disable ABC800C-style colorH. Peter Anvin2018-09-293-4/+16
| | | | It isn't really authentic, after all...
* fileop: REWIND does need special handling after all...H. Peter Anvin2018-09-291-7/+10
| | | | | Since REWIND doesn't need any argment bytes, it needs to directly call do_seek() instead of setting up a transition to st_seek.
* fileop: simplify(!) the protocol by adding a REWIND commandH. Peter Anvin2018-09-292-16/+20
| | | | | | It uses one more opcode, but makes the protocol easier to explain. We have plenty of opcodes, and can always make more. No new code is needed, which is extra nice.
* abcprint.txt: correct the description of the PWRITE commandH. Peter Anvin2018-09-291-1/+1
|
* fileop: add a pair of commands to seek and read/seek and writeH. Peter Anvin2018-09-292-18/+88
| | | | | Add a set of commands to do a seek and a read/write in the same operation. This should speed up random access for blocked data.
* cas: add cassette support for ABC800H. Peter Anvin2018-09-295-41/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add cassette support via the ABC800 SIO. It turns out that unlike ABC80, ABC800 stops the cassette motor between each block (or just after the first one?), so we can't rely on the motor control to reset to the next file. However, it isn't really a huge problem as we really are just presenting a set of blocks. To get this to work, I had to improve the Z80 interrupt handling further: respect the one-instruction interrupt shadow after EI (so EI;RET doesn't fill up the stack) and improve the handling of EOI. I dropped the lead-out byte, as neither ABC80 nor 800 will read it, and the 800 state machine gets unhappy when the last byte in the physical block is not read. A few things that would highly desirable: 1. Actually implement the Z80 interrupt priority chain, and defer getting the vector until INTAK, so multiple pending interrupts and EOI can actually be handled correctly. 2. Unify the SIO/DART models; there are now three differently partial implementations for three out of four ports. Note that DART is just a SIO/0 without the synchronous modes enabled; the pinout and programming interface are the same. In fact, ABC800M/C used a SIO/0, even through bit4bit calls the interrupt vector DARTVEK.
* Hook abcprint up to the ABC800 PR: portH. Peter Anvin2018-09-286-21/+117
| | | | | | | | | Hook the abcprint up to the ABC800 PR: port. This is a quite vestigial DART (SIO) model; it would be good to unify this with the keyboard model and provide a more complete DART model. Note that ABC802 uses the RI# input on the PR: port to detect 40 or 80 character startup.
* z80dis: emit tracing disassembly to the trace fileH. Peter Anvin2018-09-281-1/+1
|
* abc80: ABC802 -> MODEL_ABC802H. Peter Anvin2018-09-281-1/+1
|
* Print a warning if --memfile is specified for !ABC802H. Peter Anvin2018-09-271-0/+4
| | | | | MEM: is a hardware feature only available on ABC802; not even other ABC800 variants.
* cas: allow specifying multiple files, as well as list of filesH. Peter Anvin2018-09-266-21/+166
| | | | | Support multiple --casfile options, as well as --caslist which is a text file containing names of other files.
* Correctly strip the path from a host filenameH. Peter Anvin2018-09-263-10/+21
|
* hostfile: move is_path_separator() to hostfile.hH. Peter Anvin2018-09-262-14/+14
|
* hostfile: don't add the directory to an absolute filenameH. Peter Anvin2018-09-261-1/+14
|
* Move errlist.txt -> err80.txt and delete errlist.xbmH. Peter Anvin2018-09-262-1080/+0
|
* Delete cached copy of install-shH. Peter Anvin2018-09-261-527/+0
| | | | This is created by autogen
* abc80sim 3.0abc80sim-3.0H. Peter Anvin2018-09-261-1/+1
|
* Fix portability fixesH. Peter Anvin2018-09-261-5/+5
| | | | | | On some systems, the socket function send() shows up in our scope. Not all systems know %z yet... sigh.
* HELP.txt: updateH. Peter Anvin2018-09-261-24/+27
|