Commit Graph

48 Commits

Author SHA1 Message Date
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
Volker Ruppert
3c769207e2 - fixed some warnings at BX_INFO, BX_PANIC, BX_ERROR and BX_DEBUG 2002-10-06 20:19:03 +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
Volker Ruppert
f3b7378307 - added multiple cdrom support for win32 (NT/2000 version untested). The ASPI
version uses the cdrom drives in the system's order. Drive letters are not
  used by ASPI.
- wrong BX_INFO message for ASPI disabled. The version number is never checked.
2002-10-03 11:59:37 +00:00
Mike Lerwill
e0275c644f Silence compiler warnings on VC6.0 2002-09-26 09:00:52 +00:00
Christophe Bothamy
5b0df32692 - fixed read_toc if start_track is 0 (whole cd).
It missed the first track. Now it returns one track plus leadout.
2002-09-24 23:45:43 +00:00
Bryce Denney
cd10908664 - use the GNU defines when compiling in cygwin without WIN32, for example
compiling --with-term
2002-09-23 06:57:57 +00:00
Bryce Denney
27e5bd1bd6 - check in minor change in CreateFile() which fixes cdrom access in win2k.
Suggested by Gino Chen Hsiang-Jan in bug [ #470701 ] Win32 CD-ROM
  Need help testing on other windows versions.
2002-09-23 01:23:25 +00:00
Christophe Bothamy
4c41a3f0f8 - fixed error under linux 2.0.36, when reading toc on an iso file.
Since we only return one track, the content stays the same for starttrack in (0,1)
2002-09-13 14:21:53 +00:00
Bryce Denney
2594c18521 - revert previous revision to take out reset() method. The cdrom_interface
object is an interface to the host OS, not really a hardware device, so it
  probably doesn't need a reset().
2002-08-28 16:45:18 +00:00
Bryce Denney
7fdc7303c2 - add "void reset(unsigned type)" method to every I/O device.
Some devices already had one.  Some I had to add an empty one.
  I did a little cleaning of init() methods to make them more uniform
  but generally I left them alone.
- I also put these exact diffs into a patch "patch.iodev-add-reset"
  in case I want to revert these changes for some reason, for example
  if they break an old patch.  It should be deleted after a while.
2002-08-27 19:54:46 +00:00
Volker Ruppert
e3f378505d - the win32 version now uses the READ TOC function for files. This is a hack
and works okay with one rom track only. We still have to implement reading
  the real TOC on win32.
- in function GetCDCapacity(): type of variable 'buf[8]' must be 'unsigned char'
- in function capacity(): win32 version returned the number of bytes, but it
  should return the number of blocks (ASPI blocksize is 2352)
- description of the function capacity() fixed (it always returns blocks)
2002-07-31 05:21:46 +00:00
Volker Ruppert
92f54faa01 - implementation of the function READ TOC for cdrom image files 2002-07-30 06:25:57 +00:00
Volker Ruppert
f4fdaa7e54 - function read_toc() works with the requested start track 0xaa (lead out) too
- commented include statement removed
2002-07-29 16:42:01 +00:00
Volker Ruppert
5a9dcef1e4 - include statement <linux/fs.h> seems to be unnecessary, cdrom support should
compile now on mips and m68k (untested)
- added cdrom support on GNU (untested)
- fixed a warning
2002-05-31 09:56:58 +00:00
Bryce Denney
6cc9369426 - netbsd patch for raw cdrom, from Christian <bloodjerk@gmx.net> 2002-04-18 18:17:45 +00:00
Bryce Denney
30aaf4088e - commit patch.wxwindows.gz in the main branch. Now you can try out
the wxwindows interface by just "configure --with-wx; make"

  Modified Files:
    Makefile.in bochs.h config.h.in configure configure.in
    load32bitOShack.cc logio.cc main.cc cpu/cpu.cc cpu/cpu.h
    debug/dbg_main.cc gui/Makefile.in gui/control.cc gui/gui.cc
    gui/siminterface.cc gui/siminterface.h gui/x.cc iodev/cdrom.cc
    iodev/keyboard.cc memory/misc_mem.cc
  Added Files:
    README-wxWindows wxbochs.rc gui/wx.cc gui/wxmain.cc
    gui/wxmain.h gui/bitmaps/cdromd.xpm
    gui/bitmaps/configbutton.xpm gui/bitmaps/copy.xpm
    gui/bitmaps/floppya.xpm gui/bitmaps/floppyb.xpm
    gui/bitmaps/mouse.xpm gui/bitmaps/paste.xpm
    gui/bitmaps/power.xpm gui/bitmaps/reset.xpm
    gui/bitmaps/snapshot.xpm
  Removed Files:
    patches/patch.wxwindows.gz
2002-04-18 00:22:20 +00:00
Bryce Denney
f56b1c7335 - move declaration of stat_buf to avoid some warning 2002-04-10 05:38:34 +00:00
Bryce Denney
ade5adf6b9 - bug fix: win32 could not read a cdrom image file. See bug
[ 531069 ] win32: can't read cdrom disk image (ISO)
  (This is the same as the change from 1.13.2.1 to 1.13.2.2
  in the BRANCH-cpanel branch.)
2002-03-20 01:24:15 +00:00
Volker Ruppert
8e3e768922 - 'eject cd' support for linux (patch from Petr Stehlik <pstehlik@sophics.cz>)
- ReadCDSector() (for win32 ASPI) returns 1 if target status is okay
- win32 ASPI version of insert_cdrom() checks media status using ReadCDSector()
2002-03-02 11:31:18 +00:00
Bryce Denney
db0a934ae3 - move include cdrom_beos.h to top of file where it belongs 2002-02-07 17:38:33 +00:00
Volker Ruppert
84b649831e - new cdrom button in the headerbar
- changing cdrom media in a Bochs session now possible
- don't eject cdrom when the guest OS has locked the drive
2002-02-01 16:46:27 +00:00
Bryce Denney
45b303a2c0 - another small beos change from Bernd Korz. 2001-12-10 18:37:39 +00:00
Bryce Denney
f82c3f9b86 - add a little bit of beos support 2001-12-08 13:07:07 +00:00
Bryce Denney
0d632755fe - in read_toc, make all platforms use the same code if using_file==1. 2001-11-11 14:41:53 +00:00
Bryce Denney
2283627565 - correct log message that said read_toc was returning 0. No. It returns 1. 2001-10-07 03:37:02 +00:00
Bryce Denney
5012a2ba85 - the windows implementation has been able to distinguish between raw
device and disk file for a while.  Even though its version of
  read_toc is minimal, in fact I would say broken, it lets people use
  an ISO disk file as a cdrom.
- in this revision, I wrote the "unix equivalent" of the win32 code, including
  the broken version of read_toc.  Now win32 and unix should act very similar
  when they encounter an ISO disk image.
- one important improvement is in read_toc, I have added "*length=1" for both
  win32 and unix, since otherwise the function returns random junk for the
  length of the TOC.  I also tried "*length=0" and that created the "lost
  interrupt" behavior that psyon has been trying to get rid of...I changed it
  back to *length=1 of course and left a note to him in that bug report.
2001-10-07 03:34:54 +00:00
Bryce Denney
7c82612bc9 - add strerror(errno) to open failed message
- minor tweaks
2001-10-06 17:32:58 +00:00
Bryce Denney
daf2a9fb55 - add RCS Id to header of every file. This makes it easier to know what's
going on when someone sends in a modified file.
2001-10-03 13:10:38 +00:00
Bryce Denney
eaf4a5f9b6 - remove the include of "type.h" that was added with Psyon's cdrom patch. 2001-08-14 05:01:49 +00:00
Todd T.Fries
f833500359 some reformat, various misc stuff with Init, introduce $ 2001-06-27 20:11:10 +00:00
Todd T.Fries
a06b031dcf setprefix -> put 2001-06-27 19:16:01 +00:00
Bryce Denney
c718b074db - Another patch from splite@purdue.edu.
The original code for determining the capacity of a disk only worked for
  ATAPI drives, leaving us poor SCSI users in the cold.  The code uses the
  standard Linux CD-ROM driver routines, so it should work on any supported
  drive.  It's basically just a copy of Keith Jones FreeBSD code.
2001-06-26 08:12:21 +00:00
Bryce Denney
547cb604b9 - exclude type.h for cygwin, though it is available in VC++. 2001-06-25 12:56:54 +00:00
Bryce Denney
fc63504252 - commit Psyon's CDROM patch that allows Win95/98/ME to read raw
CDs using ASPI interface.
2001-06-25 02:18:16 +00:00
Bryce Denney
eb08d39347 - just removed one \n 2001-06-23 03:23:41 +00:00
Todd T.Fries
12985edb26 setprefix now uses a variable length name as a string for an argument 2001-06-19 21:36:09 +00:00
Bryce Denney
4be3406517 - turned printfs into BX_INFOs
- some line wraps, introduced between Calvin's disk and mine, removed
2001-06-18 21:14:00 +00:00
Bryce Denney
67970b2992 - Calvin Smith's cdrom patch (win32 specific) that allows Bochs to read
from a cdrom image file
2001-06-18 21:11:46 +00:00
Todd T.Fries
2bbb1ef8eb strip '\n' from BX_{INFO,DEBUG,ERROR,PANIC}
don't need it, moved the output of it into the general io functions.
saves space, as well as removes the confusing output if a '\n' is left off
2001-05-30 18:56:02 +00:00
Bryce Denney
a9b282ece5 - BX_WARN doesn't exist any more! Change them all to BX_INFO. 2001-05-20 03:27:05 +00:00
Todd T.Fries
7ad6e82e00 merge in submission from freebsd ports 2001-05-16 17:39:07 +00:00
Todd T.Fries
bdb89cd364 merge in BRANCH-io-cleanup.
To see the commit logs for this use either cvsweb or
cvs update -r BRANCH-io-cleanup and then 'cvs log' the various files.

In general this provides a generic interface for logging.

logfunctions:: is a class that is inherited by some classes, and also
.   allocated as a standalone global called 'genlog'.  All logging uses
.   one of the ::info(), ::error(), ::ldebug(), ::panic() methods of this
.   class through 'BX_INFO(), BX_ERROR(), BX_DEBUG(), BX_PANIC()' macros
.   respectively.
.
.   An example usage:
.     BX_INFO(("Hello, World!\n"));

iofunctions:: is a class that is allocated once by default, and assigned
as the iofunction of each logfunctions instance.  It is this class that
maintains the file descriptor and other output related code, at this
point using vfprintf().  At some future point, someone may choose to
write a gui 'console' for bochs to which messages would be redirected
simply by assigning a different iofunction class to the various logfunctions
objects.

More cleanup is coming, but this works for now.  If you want to see alot
of debugging output, in main.cc, change onoff[LOGLEV_DEBUG]=0 to =1.

Comments, bugs, flames, to me: todd@fries.net
2001-05-15 14:49:57 +00:00
Bryce Denney
debed8cc55 - for OpenBSD, remove extern "C" { } around the includes. Apparantly
that is no longer needed.
2001-05-08 19:51:46 +00:00
Bryce Denney
a6fef54678 - update copyright dates to 2001 for all mandrake headers
- for bochs files with other header, replaced with current mandrake header
2001-04-10 02:20:02 +00:00
Bryce Denney
955b0a924f - applied patch from Don Becker.
CDROM drive letter for WIN32 is no longer hardcoded.
2001-04-10 02:17:10 +00:00
Bryce Denney
43894ea539 - Applied patch from Roland Mainz, 4/1/2001
Support Sun CDROM.
2001-04-10 02:15:31 +00:00
cvs
beff63eb32 - entered original Bochs snapshot bochs-2000_0325a.tar.gz from
ftp.bochs.com
2001-04-10 01:04:59 +00:00