Commit Graph

22 Commits

Author SHA1 Message Date
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
eb0e95f54d - check for bx_options.sb16.Opresent added in init() and the destructor
(SB16 was always enabled before)
- call finishmidifile() and finishvocfile() in the destructor only if the
  files are vaild
2002-08-23 18:12:02 +00:00
Volker Ruppert
c7c9cc2430 - DMA register and unregister functions for DMA channels added and macros for
DMA functions defined. Most of the changes are based on the "bochs sync"
   version of plex86. Here is the list of changes:

  * register/unregister functions for DMA channels added. The DMA controller
    can use the DMA read/write handlers of registered devices directly.
  * "hardwired" code in dma.cc removed
  * all DMA related code in devices.cc and iodev.h removed
  * DMA related code in pc_system.* removed except HRQ handling
  * macros for DMA functions defined in bochs.h
  * floppy and SB16 code modified to use the changes described above
2002-06-16 15:02:28 +00:00
Bryce Denney
dcc6df2f1e - fixed several instances where we had "delete array" but we needed
"delete [] array".  This led to memory leaks.  Thanks, valgrind.
2002-04-09 20:12:39 +00:00
Volker Ruppert
ad072e2bc6 - implementation of the edge triggered IRQ mode
- new functions raise_irq() and lower_irq()
- all trigger_irq() / untrigger_irq() calls are replaced by the new functions
- REMARK: timer IRQ handling is not correct but it works
- TODO: IOAPIC IRQ handling needs to be changed
2002-01-29 17:20:12 +00:00
Volker Ruppert
81bbbd27b2 - clear DSP.irqpending only if the value of mixer register 0x82 is 0
- use conversion type %d for logfile (Cygwin doesn't know %i)
2002-01-25 20:31:42 +00:00
Volker Ruppert
b061db9cd7 - mixer reset does not reset the IRQ/DMA settings
(Linux OSS driver resets the mixer after configuring IRQ/DMA)
- write timer ticks into logfile, not the localtime
2002-01-13 17:07:14 +00:00
Volker Ruppert
f9fdee7ed5 - 16-bit DMA mode fixed (VOC file output works) 2002-01-05 10:30:24 +00:00
Volker Ruppert
3492a93d8f - write wave and midi data in binary mode
- adlib registers enabled (OPL emulation still not complete)
- fixed a warning in function opl_data()
- write current time into sb16 logfile
2001-12-22 13:30:10 +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
1006cb2c6b - patch from Volker Ruppert <Volker.Ruppert@t-online.de>, who writes:
> I have inspected the header of output file and several sample MIDI files. I
  > have found two different bytes in the header. After I have changed this
  > bytes Winamp could play the output file, but it showed a track time of
  > 0:00. The Windows Media Player still doesn't like the file.
2001-09-15 13:33:16 +00:00
Todd T.Fries
a06b031dcf setprefix -> put 2001-06-27 19:16:01 +00:00
Bryce Denney
8ca273ce73 - converted ne2k and sb16 to new style parameters and control panel,
except for MAC address of the ne2k, which is next.
2001-06-21 18:34:50 +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
5e4265ba8a - applied patch.sb16-ftell. Instead of using fgetpos which returns
an fpos_t, use ftell which returns an int.  Without the patch,
  Bochs gets an fpos_t and assumes it is an integer type, but
  on some systems (like linux with newer glibc libraries) this
  assumption is wrong.  Malte Cornils <malte@cornils.net> first
  reported this bug, and he warned me that ftell may not be portable
  to some platforms which treat binary and ascii streams differently.
  I haven't found any alternative yet.
2001-06-09 01:30:20 +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
af4ccaae3e - added I/O APIC and local APICs
- for more details, see BRANCH-smp-bochs
2001-05-23 07:48:11 +00:00
Bryce Denney
db087c7f6a - try to avoid printing null pointers if midifil, wavefile, logfile
are not defined.  This happens if SB16 is configured but then does
  not appear in the .bochsrc.
2001-05-17 20:58:31 +00:00
Todd T.Fries
a3d6cc1941 have the memory show the sim_id in the prefix, instead of adding (0) to the
log
2001-05-15 15:21:19 +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
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
cvs
beff63eb32 - entered original Bochs snapshot bochs-2000_0325a.tar.gz from
ftp.bochs.com
2001-04-10 01:04:59 +00:00