Commit Graph

100 Commits

Author SHA1 Message Date
Stanislav Shwartsman
8b0df8e99b Merge SAVE_RESTORE branch to CVS 2006-05-27 15:54:49 +00:00
Volker Ruppert
9340f3b3f8 - partial sync with BRANCH_SAVE_RESTORE_3 (hardware save/restore not present yet)
* changed data format of text files for save/restore (looks like C/C++ structures,
    similar to the format used in old save/restore branches)
  * don't set the initial value of shadow bool parameters
  * don't set the initial value of bool parameters twice
  * cpu/init.cc: missing #undef added
  * ne2k.cc: variable tx_timer_active was never set to 1 (type now bx_bool)
  * floppy.cc: missing initialization of the 'eot' array in reset() added
  * pic.h: type of member 'byte_expected' changed to Bit8u
  * pit_wrap.h: unused members removed
2006-05-01 18:24:47 +00:00
Stanislav Shwartsman
c2455e7c1e Fixed warning 2006-04-05 17:23:51 +00:00
Volker Ruppert
26c67216ed - check TC on every DMA cycle (partial sector transfers now supported) 2006-03-25 12:14:13 +00:00
Stanislav Shwartsman
77653bcf3d More indent and C++ style changes (explicitly write virtual before virtual desctructors).
The PCI read/write handlers written in new C++ - more flexible and easy-to-understand
2006-03-07 21:11:20 +00:00
Volker Ruppert
6cd4ffff28 - floppy options rewritten to a parameter tree
- enum parameter type method set_by_name() fixed
2006-02-24 22:35:46 +00:00
Volker Ruppert
682895ca77 - fixed error handling for the read ID command (bad drive, media not present)
- the seek command is always executed (doesn't set the EC bit)
2005-12-25 12:03:14 +00:00
Volker Ruppert
520da21dcf - fixed device type checks (must be compared with FDRIVE_NONE now)
- fixed motor off condition for recalibrate and seek
2005-12-23 12:21:09 +00:00
Volker Ruppert
b59b3aed31 - fixed floppy media type check
- fixed result values after trying to access a not existing sector
2005-12-03 18:22:18 +00:00
Volker Ruppert
e51c248aaa - fixed size of debug message for the result of a floppy command 2005-11-25 22:29:20 +00:00
Volker Ruppert
31c23fc102 - floppy media type check added (prevents inserting of invalid media in drive,
e.g. 1.2MB 5.25" media in 1.44MB 3.5" drive)
2005-11-22 18:34:51 +00:00
Volker Ruppert
cbf474f7d3 - disk change line behaviour fixed (set at media removal and hardware reset,
cleared at the first step pulse)
2005-11-20 14:15:28 +00:00
Volker Ruppert
8fd02e184b - floppy controller type changed to 82077AA and added a few commands to make
Linux detect it correctly. This changes has no effect on r/w operations.
- data rate select register partially implemented
- register reset fixes and additions
2005-11-16 21:21:35 +00:00
Volker Ruppert
e0f02463f9 - the step delay for the recalibrate and seek commands is now calculated from the
number of steps to do, the step rate time and the date rate
- the option floppy_command_delay is obsolete now, since all floppy delays are
  based on the hardware specs. The usage of this option caused a warning now.
2005-11-12 10:38:51 +00:00
Volker Ruppert
902b8ec684 - better floppy write timing implementation (TC pulse is only available in DMA
r/w functions and must be stored in a variable)
2005-11-10 18:56:45 +00:00
Volker Ruppert
23776bab81 - more accurate timimg for floppy commands 'write normal data' and 'read ID' based
on a motor speed of 300 RPM
2005-11-09 19:13:32 +00:00
Volker Ruppert
7b8ed58815 - end-of-track (EOT) condition implemented
- set valid EOT value in BIOS floppy read/write functions
- added hack to make older Bochs BIOS version work with EOT feature
2005-10-27 07:38:20 +00:00
Volker Ruppert
0a57b7360c - the polling initiated interrupt occurs 250 usec after leaving reset state
- the main status register returns 0 when in reset state
- improved a panic message
2005-10-09 17:58:37 +00:00
Volker Ruppert
9e0089fb9e - floppy commands 0x04 and 0x4A do not reset the disk change line (SF patch
#1294930 by Ben Lunt)
- disk change line can be active only when the motor is on
2005-09-28 17:36:01 +00:00
Volker Ruppert
5f9d527dc0 - more accurate timing for formatting using a motor speed of 300 RPM
- indent mode fixed in modified section
2005-09-03 17:20:18 +00:00
Volker Ruppert
b88facfb66 - more accurate timing for reading data using a motor speed of 300 RPM. This is
important at boot time if the user wants to control the boot process.
  TODO:
  * implement timing for write and format commands
  * more accurate timing for seek, recalibrate and maybe others
  * raw floppy access slows down the emulation, use separate threads (???)
- irq line goes low with when reading the first result byte
- the drive status bits are only modified after reading the first result byte
- handling of floppy command 'sense interrupt status' simplified
- improved debug messages for i/o port reads and writes
2005-08-31 19:48:03 +00:00
Volker Ruppert
86c3c68dc4 - fixes for OS/2 in the floppy and rombios code (patch from Robin Kay)
* support for XDF images added
  * floppy controller should hang if media not present
  * rombios has to reset the floppy controller after read/write failure
2005-08-24 20:45:57 +00:00
Volker Ruppert
e98c100f74 - a bunch of warnings in MSVC fixed
- name of source file in wxworkspace.zip fixed
2005-06-04 17:44:59 +00:00
Volker Ruppert
3c475e831f - prepared non-DMA mode implementation
- improved lseek() panic message and immediatly return if lseek() fails
2005-03-11 21:12:54 +00:00
Volker Ruppert
83fba2248e - raw floppy access on Linux fixed: use defaults if FDGETPRM fails (USB drives
appear as SCSI devices)
2005-01-16 15:58:40 +00:00
Stanislav Shwartsman
02fc33a86b Fix CS.base register after #RESET
update changes
2004-11-16 19:19:13 +00:00
Stanislav Shwartsman
5873b26a82 Speed up compilation process.
bochs.h already not include iodev.h which reduces compilation dependences for almost all cpu and fpu files, now cpu files will not be recompiled if iodev includes was changed
2004-06-19 15:20:15 +00:00
Volker Ruppert
9d01ce4bfc - raw floppy access now supported in Win 9x (patch from Ben Lunt) 2004-05-31 14:47:12 +00:00
Volker Ruppert
d78f3da836 - win32 statusbar now shows active items with light green background
- harddisk/cdrom status light feature prepared
2004-02-08 18:38:26 +00:00
Volker Ruppert
107c109d04 - win32 statusbar now shows all inactive items grayed
- update floppy items in statusbar on status change only
- initialize statusbar and set all items inactive before the simulation starts
2004-02-08 10:25:50 +00:00
Volker Ruppert
f5c165e32a - statusbar items for floppy and keyboard added (win32 gui only). TODO: implement
statusbar in other display libraries and add items for harddisk/cdrom and network.
2004-02-07 14:34:35 +00:00
Volker Ruppert
f731c1774c - DEV_set_media_status() not necessary in gui floppy handlers when using the
win32 floppy dialog
- report geometry with BX_INFO after inserting new floppy media
2003-12-18 20:04:49 +00:00
Volker Ruppert
0569c80236 - initialize structure 'stat_buf' if using raw device access on win32 (grabbed
from bug report #857235)
2003-12-10 22:14:01 +00:00
Volker Ruppert
a0b896dc22 - determine media geometry on Linux and win32 host 2003-12-07 15:59:32 +00:00
Volker Ruppert
6113bf4d89 - evaluate_media(): code for character or block devices simplified (TODO: determine
media size)
2003-12-06 13:59:30 +00:00
Volker Ruppert
335507ac38 - evaluate_media(): floppy type handling for images rewritten. The function now
fails if the image size is too large for the selected type.
- evaluate_media(): enclose path names in single quotes in BX_INFOs
2003-11-23 21:54:59 +00:00
Volker Ruppert
e827d430f2 - don't try to insert the floppy media if the path name is "none"
- evaluate_media(): new variable 'raw_floppy' indicates raw floppy access on win32
- evaluate_media(): try to read the first sector determine the presence of the
  floppy media (raw access on win32)
2003-11-22 18:22:45 +00:00
Volker Ruppert
df2d388fa4 - io_len mask fixed and unnecessary io_len checks removed from the remaining
devices except pciusb
2003-07-31 19:51:42 +00:00
Volker Ruppert
816cbee29b - BX_PANIC and BX_ERROR message improved 2003-06-20 16:28:00 +00:00
Christophe Bothamy
579f3c0539 - apply Ben Lunt's 160k, 180k, 320k floppy patch 2003-02-06 23:16:56 +00:00
Bryce Denney
45ce7e1bc2 - clarify panic 2002-12-11 15:45:10 +00:00
Bryce Denney
e1e9a289a0 - apply patch from Alex Thiel from a December 8 email that fixes my
panic problem: "floppy:timer(): unknown case e6".
2002-12-11 15:41:24 +00:00
Volker Ruppert
d05e7cc10c - floppy cleanup patch from Alex Thiel. New functions enter_idle_phase() and
enter_result_phase(). This patch does not add new features and should not
  break anything.
2002-11-30 09:39:29 +00:00
Bryce Denney
cec9135e9f - Apply patch.replace-Boolean rev 1.3. Every "Boolean" is now changed to a
"bx_bool" which is always defined as Bit32u on all platforms.  In Carbon
  specific code, Boolean is still used because the Carbon header files
  define it to unsigned char.
- this fixes bug [ 623152 ] MacOSX: Triple Exception Booting win95.
  The bug was that some code in Bochs depends on Boolean to be a
  32 bit value.  (This should be fixed, but I don't know all the places
  where it needs to be fixed yet.)  Because Carbon defined Boolean as
  an unsigned char, Bochs just followed along and used the unsigned char
  definition to avoid compile problems.  This exposed the dependency
  on 32 bit Boolean on MacOS X only and led to major simulation problems,
  that could only be reproduced and debugged on that platform.
- On the mailing list we debated whether to make all Booleans into "bool" or
  our own type.  I chose bx_bool for several reasons.
  1. Unlike C++'s bool, we can guarantee that bx_bool is the same size on all
     platforms, which makes it much less likely to have more platform-specific
     simulation differences in the future.  (I spent hours on a borrowed
     MacOSX machine chasing bug 618388 before discovering that different sized
     Booleans were the problem, and I don't want to repeat that.)
  2. We still have at least one dependency on 32 bit Booleans which must be
     fixed some time, but I don't want to risk introducing new bugs into the
     simulation just before the 2.0 release.

Modified Files:
    bochs.h config.h.in gdbstub.cc logio.cc main.cc pc_system.cc
    pc_system.h plugin.cc plugin.h bios/rombios.c cpu/apic.cc
    cpu/arith16.cc cpu/arith32.cc cpu/arith64.cc cpu/arith8.cc
    cpu/cpu.cc cpu/cpu.h cpu/ctrl_xfer16.cc cpu/ctrl_xfer32.cc
    cpu/ctrl_xfer64.cc cpu/data_xfer16.cc cpu/data_xfer32.cc
    cpu/data_xfer64.cc cpu/debugstuff.cc cpu/exception.cc
    cpu/fetchdecode.cc cpu/flag_ctrl_pro.cc cpu/init.cc
    cpu/io_pro.cc cpu/lazy_flags.cc cpu/lazy_flags.h cpu/mult16.cc
    cpu/mult32.cc cpu/mult64.cc cpu/mult8.cc cpu/paging.cc
    cpu/proc_ctrl.cc cpu/segment_ctrl_pro.cc cpu/stack_pro.cc
    cpu/tasking.cc debug/dbg_main.cc debug/debug.h debug/sim2.cc
    disasm/dis_decode.cc disasm/disasm.h doc/docbook/Makefile
    docs-html/cosimulation.html fpu/wmFPUemu_glue.cc
    gui/amigaos.cc gui/beos.cc gui/carbon.cc gui/gui.cc gui/gui.h
    gui/keymap.cc gui/keymap.h gui/macintosh.cc gui/nogui.cc
    gui/rfb.cc gui/sdl.cc gui/siminterface.cc gui/siminterface.h
    gui/term.cc gui/win32.cc gui/wx.cc gui/wxmain.cc gui/wxmain.h
    gui/x.cc instrument/example0/instrument.cc
    instrument/example0/instrument.h
    instrument/example1/instrument.cc
    instrument/example1/instrument.h
    instrument/stubs/instrument.cc instrument/stubs/instrument.h
    iodev/cdrom.cc iodev/cdrom.h iodev/cdrom_osx.cc iodev/cmos.cc
    iodev/devices.cc iodev/dma.cc iodev/dma.h iodev/eth_arpback.cc
    iodev/eth_packetmaker.cc iodev/eth_packetmaker.h
    iodev/floppy.cc iodev/floppy.h iodev/guest2host.h
    iodev/harddrv.cc iodev/harddrv.h iodev/ioapic.cc
    iodev/ioapic.h iodev/iodebug.cc iodev/iodev.h
    iodev/keyboard.cc iodev/keyboard.h iodev/ne2k.h
    iodev/parallel.h iodev/pci.cc iodev/pci.h iodev/pic.h
    iodev/pit.cc iodev/pit.h iodev/pit_wrap.cc iodev/pit_wrap.h
    iodev/sb16.cc iodev/sb16.h iodev/serial.cc iodev/serial.h
    iodev/vga.cc iodev/vga.h memory/memory.h memory/misc_mem.cc
2002-10-25 11:44:41 +00:00
Bryce Denney
5e520261db Add plugin support to Bochs by merging all the changes from the
BRANCH_PLUGINS branch!

Authors:
  Bryce Denney
  Christophe Bothamy
  Kevin Lawton (we grabbed a lot of plugin code from plex86)
Testing help from:
  Volker Ruppert
  Don Becker (Psyon)
  Jeremy Parsons (Br'fin)

The change log is too long to paste in here.  To read the change log, do
  cvs log patches/patch.final-from-BRANCH_PLUGINS.gz

All the changes and a detailed description are contained in a patch
called patch.final-from-BRANCH_PLUGINS.gz.  To look at the complete
patch, do
  cvs upd -r1.1 patches/patch.final-from-BRANCH_PLUGINS.gz

Then you will have a local copy of the patch, which you can gunzip and
play with however you want.

Modified Files:
    .bochsrc Makefile.in aclocal.m4 bochs.h config.h.in configure
    configure.in gdbstub.cc logio.cc main.cc pc_system.cc
    pc_system.h state_file.h bios/Makefile.in bios/rombios.c
    cpu/Makefile.in cpu/access.cc cpu/apic.cc cpu/arith16.cc
    cpu/arith32.cc cpu/arith8.cc cpu/cpu.cc cpu/cpu.h
    cpu/ctrl_xfer32.cc cpu/exception.cc cpu/fetchdecode.cc
    cpu/fetchdecode64.cc cpu/flag_ctrl.cc cpu/flag_ctrl_pro.cc
    cpu/init.cc cpu/io.cc cpu/logical16.cc cpu/logical32.cc
    cpu/logical8.cc cpu/paging.cc cpu/proc_ctrl.cc
    cpu/protect_ctrl.cc cpu/segment_ctrl_pro.cc cpu/shift16.cc
    cpu/shift32.cc cpu/stack64.cc cpu/string.cc cpu/tasking.cc
    debug/Makefile.in debug/dbg_main.cc disasm/Makefile.in
    doc/docbook/user/user.dbk dynamic/Makefile.in fpu/Makefile.in
    gui/Makefile.in gui/amigaos.cc gui/beos.cc gui/carbon.cc
    gui/control.cc gui/control.h gui/gui.cc gui/gui.h
    gui/keymap.cc gui/keymap.h gui/macintosh.cc gui/nogui.cc
    gui/rfb.cc gui/sdl.cc gui/sdlkeys.h gui/siminterface.cc
    gui/siminterface.h gui/term.cc gui/win32.cc gui/wx.cc
    gui/wxdialog.cc gui/wxdialog.h gui/wxmain.cc gui/wxmain.h
    gui/x.cc gui/keymaps/sdl-pc-de.map gui/keymaps/sdl-pc-us.map
    gui/keymaps/x11-pc-de.map instrument/example0/instrument.h
    instrument/example1/instrument.h
    instrument/stubs/instrument.cc instrument/stubs/instrument.h
    iodev/Makefile.in iodev/biosdev.cc iodev/biosdev.h
    iodev/cdrom.cc iodev/cmos.cc iodev/cmos.h iodev/devices.cc
    iodev/dma.cc iodev/dma.h iodev/eth_fbsd.cc iodev/eth_linux.cc
    iodev/eth_null.cc iodev/eth_tap.cc iodev/floppy.cc
    iodev/floppy.h iodev/guest2host.cc iodev/guest2host.h
    iodev/harddrv.cc iodev/harddrv.h iodev/iodebug.cc
    iodev/iodebug.h iodev/iodev.h iodev/keyboard.cc
    iodev/keyboard.h iodev/ne2k.cc iodev/ne2k.h iodev/parallel.cc
    iodev/parallel.h iodev/pci.cc iodev/pci.h iodev/pci2isa.cc
    iodev/pci2isa.h iodev/pic.cc iodev/pic.h iodev/pit.cc
    iodev/pit.h iodev/pit_wrap.cc iodev/pit_wrap.h iodev/sb16.cc
    iodev/sb16.h iodev/scancodes.cc iodev/scancodes.h
    iodev/serial.cc iodev/serial.h iodev/slowdown_timer.cc
    iodev/slowdown_timer.h iodev/unmapped.cc iodev/unmapped.h
    iodev/vga.cc iodev/vga.h memory/Makefile.in memory/memory.cc
    memory/memory.h memory/misc_mem.cc misc/bximage.c
    misc/niclist.c
Added Files:
    README-plugins extplugin.h ltdl.c ltdl.h ltdlconf.h.in
    ltmain.sh plugin.cc plugin.h
2002-10-24 21:07:56 +00:00
Bryce Denney
b43ca82b5e - in debug message, mention WHICH reserved register was written 2002-10-21 16:57:35 +00:00
Volker Ruppert
df6512abd5 - check for the platform WIN32 instead of the gui
- FIXME: the symbols 'BX_WITH_MACOS' and 'macintosh' both appear in the floppy
  code. I don't know what's okay there.
2002-10-13 09:40:05 +00:00
Volker Ruppert
75ba36cb15 - fixed some warnings at BX_INFO, BX_PANIC, BX_ERROR and BX_DEBUG 2002-10-06 19:38:54 +00:00
Bryce Denney
c818baa0c9 - modified every I/O device so that it will not re-register its timers
if init() is called a second time.  This allows me to restart a
  simulation (wxwindows interface only) without restarting the whole
  application.
- modified: iodev/*.cc
2002-10-06 19:04:47 +00:00
Bryce Denney
f54551717e - include <windows.h> in bochs.h whenever WIN32 is defined. This is required
so that windows types can be used in fields, for example in cdrom.h:
    #ifdef WIN32
      HANDLE cdrom_interface::hFile;
    #endif
- since every file includes bochs.h, I removed includes of <windows.h>
  everywhere else
- modified: bochs.h cpu/extdb.cc gui/win32.cc gui/wx.cc iodev/cdrom.cc
  iodev/eth_win32.cc iodev/floppy.cc
2002-10-03 21:07:04 +00:00