Commit Graph

881 Commits

Author SHA1 Message Date
Christophe Bothamy
a6f0158745 - add possibility to have both sync method active at the same time 2003-08-26 20:24:36 +00:00
Volker Ruppert
ca60988fd9 - wx: NetConfigDialog replaced by a new version using ParamDialog
- parameter for the ethernet module must be of type bx_param_enum_c, since we
  have a list of valid modules
2003-08-25 16:46:18 +00:00
Christophe Bothamy
6c66a9a9a9 - write cmd 0x70 (seek) should not set drq. (fix by Mathis) 2003-08-24 22:44:44 +00:00
Volker Ruppert
4e10730479 - missing return value added in function start_cdrom() 2003-08-21 18:27:01 +00:00
Jeroen Janssen
5a023a8ad5 applied slowdown timer crosscompile fix 2003-08-20 06:26:27 +00:00
Christophe Bothamy
832ef1209f - apply .bochsrc, cdrom, serial and ethernet patches for NetBSD
(patches by fredb, uebayasi and david laight)
2003-08-19 00:37:03 +00:00
Christophe Bothamy
e555765d75 - add a "clock: sync=[none|slowdown|realtime], time0=[timeValue|local|utc]"
- pit: and time0: options are still supported but deprecated
- warn when parsing deprecated directives
- fix wrong number of ata_device_translation_names
- still to do:
  - setting time0 to utc is not yet supported
  - the man page, user guide and .bochsrc still need to be updated
    with the new options
2003-08-19 00:10:39 +00:00
Stanislav Shwartsman
60ca3ac674 ;; is not so necessary ;) 2003-08-15 13:18:53 +00:00
Alexander Krisak
396d948d1b Applied Andrew's Zabolotny patch which gives posibility for program to popup debugger by writing 'D' character to 0x8900 port 2003-08-10 17:19:49 +00:00
Alexander Krisak
d03e9381a0 Fixed broken build, reported by Jeroen Janssen 2003-08-05 09:19:36 +00:00
Alexander Krisak
45df735c30 Apply Vitaly's Vorobyov debugger patch 2003-08-04 16:03:09 +00:00
Stanislav Shwartsman
2c3753e6c2 dos2unix fix 2003-08-04 13:27:39 +00:00
Stanislav Shwartsman
4ba856a52b Committed syntax error fixes from Vitaly Vorobyov.
Syntax error fixes:
  [x] fixed error with array bounds in virt_timer.cc
  [x] fixed error with returning value from void functions
  [x] fixed const class member initialization (according C++ standard)
  [x] for-loop local variable declaration moved out of loop
      (for VC 6.0 compliance)

Removed already committed patch from Dirk Thierbach
Replaced the patch from Vitaly Vorobyov by set of splitted patches.
Now any of his patches could be committed separatelly from others !
2003-08-03 17:04:02 +00:00
Christophe Bothamy
974d3538a1 - change disk image mode name "growable" to the more accurate "growing" 2003-08-01 01:20:00 +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
37f3ea02b0 - new accesss mask must be checked in the i/o read/write register function.
This is necessary for devices with different i/o port masks.
- BX_MAX_IO_DEVICES increased to 30
- io_len mask fixed and unnecessary io_len checks removed in
  * biosdev.cc
  * cmos.cc
  * dma.cc
2003-07-31 15:29:34 +00:00
Volker Ruppert
bcdcf42bdd - io_len mask in i/o register functions implemented (1 = 8bit, 2 = 16bit, 4 = 32bit).
Unallowed cases are now handled in devices.cc and cause a BX_ERROR.
- io_len mask fixed and unnecessary io_len checks removed in
  * devices.cc
  * extfpuirq.cc
  * gameport.cc
  * ne2k.cc
  * pit.cc
  * pit_wrap.cc (i/o register function calls replaced by DEV_* macro calls)
- TODO: implement this in all other devices
2003-07-31 12:04:48 +00:00
Volker Ruppert
c496962184 - the NE2000 driver for MS-DOS writes a 16 bit value to page 0 reg 5. Now the
low-byte is written to this register and the high-byte is ignored.
2003-07-30 10:45:13 +00:00
Volker Ruppert
6723fc80a5 - the shutdown port now works if the debugger is enabled, too 2003-07-29 18:17:33 +00:00
Volker Ruppert
99a7d850b3 - byte writes to the first register of an ATA channel are ignored now (BX_PANIC
replaced by BX_ERROR)
2003-07-29 16:08:54 +00:00
Volker Ruppert
451ab1a4e1 - read/write access to the ports 0x03f6 and 0x03f7 no longer causes a panic
if all ATA channels are disabled (fixes SF bug #741433)
2003-07-28 18:52:14 +00:00
Volker Ruppert
4a4e90d96e - missing #if BX_SUPPORT_VBE added in i/o write handler 2003-07-27 17:50:43 +00:00
Volker Ruppert
1155b63564 - undocumented feature (???): blinking feature exists in graphics modes, too.
The colors 0..7 appear in high intensity and the colors 8..15 blink using
  low / high intensity. Blinking is not present in Bochs yet. For now, the 3rd
  bit of the attribute will be inverted.
- attribute controller mode control register: only a change of the internal
  palette size bit should force a redraw
- skip screen update if video is disabled
2003-07-19 21:44:37 +00:00
Volker Ruppert
687b8281cc - these attribute controller registers now force a redraw: mode control, color
plane enable and color select
- a screen update is necessary after updating the charmap
- lots of missing parentheses added (found after disabling VGA_TRACE_FEATURE)
- BX_DEBUG and BX_INFO messages improved
2003-07-18 18:31:50 +00:00
Volker Ruppert
592d7a7207 - a palette entry change must force a redraw in VBE mode, too
- update function: the 'for' loop now initializes and increments the variables
  xti and yti
- VBE: banked writes are now ignored in LFB mode, LFB writes are ignored in
  banked mode (based on SF patch #742782)
2003-07-17 07:55:56 +00:00
Volker Ruppert
a016eff261 - VBE LFB flag added
- VBE set bank now ignored in LFB mode
2003-07-16 17:56:25 +00:00
Volker Ruppert
4e63eca16c - vbe_mem_write(): offset calculation fixed
- calculation of the VBE virtual height for >8bpp fixed
- visible screen size must be recalculated after changing the virtual width
- modify standard VGA register when enabling a VBE mode (some test applications
  expect this behaviour)
- BX_INFO messages in the VBE code fixed
2003-07-15 13:05:20 +00:00
Volker Ruppert
7bf059fcea - function put_scancode() removed. It is no longer necessary, since all display
libraries are now using DEV_kbd_gen_scancode() to send key events to the
  emulated keyboard.
- argument name of DEV_kbd_gen_scancode() renamed to 'key'
2003-07-13 19:51:21 +00:00
Volker Ruppert
e073214525 - new function getBXKeyName() returns the name of a BX_KEY symbol
(used by BX_DEBUG message in the keyboard code)
- despription of keymap.cc updated
2003-07-12 08:17:10 +00:00
Volker Ruppert
5c11b64bdf - support for 15 bpp modes added in the vga code and the sdl display library
- sdl: in function graphics_tile_update() vga_bpp handled in a case structure
2003-07-09 20:15:38 +00:00
Volker Ruppert
125e3479e6 - fixes for cross-compilation (building win32 binary on linux)
* configure.in: readline check is only necessary if the debugger is enabled
    (patch from Jeroen Janssen)
  * iodev/Makefile.in: dependencies updated after adding gameport device
2003-07-05 05:31:40 +00:00
Volker Ruppert
cc4708c348 - a dimension update after enabling a VBE mode is only necessary for modes >4bpp
- don't clear the VBE memory if the new flag VBE_DISPI_NOCLEARMEM is set
- vbe_bpp_multiplier for the 4bpp mode set to 1 (usually unused, but this value is save)
2003-07-01 16:07:59 +00:00
Volker Ruppert
3845a23b55 - support for 16, 24 and 32 bit VBE modes implemented in the vga code and the
X11 display library (vga changes based on a patch from Chistopher Nelson)
- VBE_DISPI_ID2 0xB0C2 defined
2003-06-30 18:53:12 +00:00
Volker Ruppert
dd63cc8ebc - removed obsolete comment 2003-06-29 17:24:52 +00:00
Volker Ruppert
359dce2185 - implementation of the standard PC gameport for the Linux platform
- removed gameport stubs from the SB16 code
- TODO: bochsrc option for the joystick device, implement joystick access for
  other platforms
2003-06-21 12:55:19 +00:00
Volker Ruppert
52aaefacf5 - device plugin name fixed 2003-06-21 09:52:32 +00:00
Volker Ruppert
816cbee29b - BX_PANIC and BX_ERROR message improved 2003-06-20 16:28:00 +00:00
Volker Ruppert
906b7f8d1c - update(): skip screen update if the vertical retrace is in progress
(using 72 Hz vertical frequency). The vertial retrace phase is often used for
  vga register or memory manipulations to reduce screen flickering.
- update(): check variable vga_mem_updated before everything else
2003-06-10 16:26:19 +00:00
Christophe Bothamy
f7bf4817dd - fix compile problem with gcc 2003-06-10 15:54:52 +00:00
Volker Ruppert
e75e7a929d - graphics update code rewritten based on patch.vga-mode2-speed-dohzono
(without localized variables)
- start address support for CGA modes added
- start address support for mode 13h completed
- clearing the text snapshot is not necessary after a start address change
  (set needs_update to 1 in graphics mode only)
2003-06-08 16:45:24 +00:00
Volker Ruppert
f56a46f7e4 - fixed a warning 2003-06-08 09:56:19 +00:00
Volker Ruppert
a4135fbee8 - a bunch of warnings fixed 2003-06-08 08:21:12 +00:00
Volker Ruppert
d1652093ac - applied some parts of the patch from Andrew Zabolotny <zap@cobra.ru>
* changed all %ll format descriptions to FMT_LL macro so that
    Microsoft Visual C works correctly (it uses %I64)
  * missing type conversions added
  * cdrom.cc: variable types for win32 fixed
  * removed some unused variables in eth_win32.cc and harddrv.cc
  * added missing includes in make_cmos_image.c and niclist.c
2003-06-07 19:16:55 +00:00
Volker Ruppert
c1f882b0ff - BX_DEBUG messages in functions gen_scancode() and kbd_enQ() improved 2003-06-07 18:41:07 +00:00
Volker Ruppert
4d25b39655 - changes for better MSVC support based on patch #735990
* support for different resource compilers added (rc / windres)
  * bochs must be linked with advapi.lib for registry access
  * optimization flag changed to /Ox
  * symbols BX_HAVE_MKSTEMP, BX_HAVE_SYS_MMAN_H and HAVE_ETHERTAP must be set to 0
  * BX_HAVE_REALTIME_USEC definition fixed for MSVC
  * vmware3.h: definition of COW_Header fixed for MSVC
2003-06-06 19:57:25 +00:00
Volker Ruppert
d1e2ddae5d - maximum resolution without VBE changed to 800x600
- maximum number of text lines changed to 100 (CGA "graphics" mode 160x100)
- size of text snapshot buffer changed to 32k (size of MDA/CGA text memory)
- removed obsolete macro CGA_TEXT_ADDR()
2003-06-05 18:18:14 +00:00
Volker Ruppert
579a2e6a42 - keyboard reset (0xff) resets the keyboard and 'enable keyboard' (0xf4 )does not 2003-06-02 20:36:30 +00:00
Volker Ruppert
20eff580b6 - link options for gui dll plugins fixed
- vmware3.cc: adding missing symbol BX_PLUGGABLE makes bx_harddrv.dll work again
2003-05-25 08:14:04 +00:00
Volker Ruppert
fb5d0a939d - hardware reset must be called after initializing everything else (bug found
with valgrind)
2003-05-24 10:50:19 +00:00
Gregory Alexander
a510ce56ee Add configurable option to never completely fill the buffer rings.
It's not clear what the correct behavior is in that case, (we
clearly don't currently handle it correctly) so
simply avoiding it is the easiest thing to do.  As such, this
option is ON by default.
2003-05-20 15:01:34 +00:00
Stanislav Shwartsman
928e20bd49 Changed some BX_INFO messages to BX_DEBUG 2003-05-15 18:32:27 +00:00
Volker Ruppert
3a788ddcf4 - char width switch feature (8 / 9 pixels) prepared for all display libraries
and implemented in SDL
  * sequencer controller register 0x01 bit 0 controls the width of the characters.
    This value is used to calculate the screen width.
  * attribute controller register 0x10 bit 2 controls the appearance of graphics
    characters (ASCII 0xC0 - 0cDF). A change of this value forces a charmap update
    to rebuild the font bitmaps.
  * the SDL display library uses the new feature described above
  * the other display libraries recalculate the screen width, since they are using
    a fixed font width of 8 for now.
- VGA: attribute controller register 0x10 bit 2 (enable_line_graphics) does not
  switch the palatte in CGA mode
2003-05-11 15:07:54 +00:00
Volker Ruppert
46d5548439 - modify the horizontal pel panning value of the tm_info structure if a char
width of 9 is enabled. For now, a panning value of 8 must be decremented.
2003-05-10 12:00:58 +00:00
Volker Ruppert
36959329c5 - more accurate emulation of the horizontal and vertical retrace
ATTENTION: the Elpin VGA BIOS uses a delay of 280 vertical retraces after
  displaying the copyright text
- changes to the horizontal or vertical pel panning registers force a redraw of
  the screen
- screen update problems in text mode fixed
- sort order of the CRT register write cases changed
2003-05-09 15:32:28 +00:00
Volker Ruppert
5ab9786871 - function text_update() prepared for new features. New structure
'bx_vga_tminfo_t' replaces variable 'cursor_state'.
2003-05-07 19:15:47 +00:00
Stanislav Shwartsman
8fa3111f3c *** empty log message *** 2003-05-07 07:39:20 +00:00
Christophe Bothamy
f5976555e5 - fix compilation problems under cygwin reported by Stanislav in the ml 2003-05-06 20:30:21 +00:00
Volker Ruppert
b6c957a3b2 - behaviour of CRTC reg 0x18 (line compare) fixed
- fixed calculation of the byte offset for standard VGA modes if line compare
  is active
- force a resize of the screen after a change of the display mode (text/graphics)
- mem_write(): skip the rotation of the cpu byte if 'data_rotate' is 0
2003-05-06 17:10:13 +00:00
Christophe Bothamy
f43d2fe3e9 - backport of the BRANCH_HARDDISK_MODES to the main branch.
You can now choose for each disk on the ata interfaces the
  disk mode, between :
    - flat : one file flat layout
    - concat : multiple files layout
    - external : developer's specific, through a C++ class
    - dll : developer's specific, through a DLL
    - sparse : stackable, commitable, rollbackable
    - vmware3 : vmware3 disk support
    - undoable : flat file with commitable redolog
    - growable : growing file
    - volatile : flat file with volatile redolog
    - z-undoable : gziped flat file with commitable redolog
    - z-volatile : gziped flat file with volatile redolog
  A new "bxcommit" utility can merge commitable redologs to
  flat images.
2003-05-03 16:37:18 +00:00
Volker Ruppert
b937905a97 - dotclock/2 switch implemented - stored in new variable 'x_dotclockdiv2'.
If set, the screen size will be horizontally doubled in CGA and standard
  VGA modes.
- doublescan feature for CGA mode 320x200x4 added
- removed trailing spaces in VBE update code
2003-05-03 16:09:39 +00:00
Volker Ruppert
8850cbf768 - removed BX_CPP_AttrRegparmN() from the i/o read handler. The read access
failed with this optimization. I guess the reason for the failure is the
  void* argument.
2003-05-03 07:41:27 +00:00
Volker Ruppert
79b811f23f - fixed warnings in these files:
cpu/fetchdecode.cc
  cpu/mmx.cc
  cpu/proc_ctrl.cc
  iodev/virt_timer.cc
  plugin.cc
2003-05-02 12:22:48 +00:00
Volker Ruppert
3411535a8b - 'split screen' feature for standard VGA 16-color modes implemented
* new variables 'line_compare' and 'vertical_display_end' depend on CRT
    register values
  * implemented 'split screen' in functions update() and mem_write()
- mem_write(): CGA section: unnecessary variable 'isEven' removed
2003-05-02 07:32:06 +00:00
Volker Ruppert
8b22768895 - applied some speed optimizations in mem_write() from patch.vga-mode2-speed-dohzono 2003-05-01 12:07:27 +00:00
Volker Ruppert
d02c729791 - removed variable 'scan_bits' and added new variable 'line_offset'. It specifies
the address offset between two lines on the screen in all VGA modes.
  It depends on the CRTC offset register value and the address mode (byte, word,
  dword)
- moved screen update code to the end of the write handler. If a register change
  should force a redraw of the screen, the variable 'needs_update' must be set
  to 1.
- changes to the attribute controller palette index register now force a redraw
  of the screen
- modeX: calculation of the tile numbers fixed
2003-04-28 18:15:31 +00:00
Christophe Bothamy
f8d2f7b701 - define execute_script function only when tap or tuntap is used
- add wait.h to fix compile problems
- output log info through ne2k device
2003-04-28 13:01:09 +00:00
Christophe Bothamy
b2e98b3372 - add comments where fixes are needed for other BSDs 2003-04-28 12:58:21 +00:00
Volker Ruppert
b1324da2e1 - function mem_read() rewritten
* check memory mapping before everything else
  * read mode 1 optimized using a part of patch.vga-mode2-speed-dohzono
- function mem_write(): check memory mapping before everything else
- writes to the CRT registers are handled only if the new value differs
- a CRT start address change forces a redraw of the screen
2003-04-27 09:13:47 +00:00
Volker Ruppert
e79aa992af - emulated CGA graphics mode 160x100x16 colors implemented using the text mode
with 100 rows and a char height of 4
- raster operations AND, OR and XOR in write mode 2 implemented (part of patch #707931)
- use the vga_tile_updated array in modeX like other modes do
- small optimizations in the graphics update code
2003-04-26 16:43:22 +00:00
Christophe Bothamy
18e2900f02 - merge and move execute_script functions to eth.cc 2003-04-26 14:48:45 +00:00
Christophe Bothamy
ffb9fcf69e - fix ne2k to work with grub. The remote-DMA check defaults to a safe
value instead of silently rejecting it. (patch from Keir Fraser)
2003-04-26 14:07:58 +00:00
Christophe Bothamy
52eda3dbec - enable tap for FreeBSD (patch by Ronald Klop and Gen Otsuji) 2003-04-26 13:31:23 +00:00
Christophe Bothamy
a6dd6deaf5 - apply patch from James E. Flemer:
I've got a game that uses OPL2 functions.  It's still not
working yet, but this patch brings it closer.  Using Jeffrey S.
Lee's "Programming the AdLib/Sound Blaster FM Music Chips (Ver
2.0)"[1] as a reference, I found an inversion of the OPL timer
masks in the sb16 code.  Without this patch, the emulator uses
the wrong bits for masking, and completely botches the flags
register (note the bitwise AND vs OR).
2003-04-25 23:32:55 +00:00
Christophe Bothamy
ce9893f540 - add coherency checks 2003-04-25 22:06:27 +00:00
Christophe Bothamy
33b017566a - start Bochs cmos map list 2003-04-25 21:48:11 +00:00
Volker Ruppert
daee2aac9b - improvements to mode 13h emulation (start address, scan bits, doublescan,
double width)
- cleanup in modeX emulation similar to mode 13h
- consider start address in function mem_write for VGA modes
- register 0x03c8 is readable, too
2003-04-25 18:51:55 +00:00
Christophe Bothamy
e319a63f9d - fix "no 0xe9 output message to console" after cd eject (patch by Hartmut Birr) 2003-04-25 00:32:58 +00:00
Christophe Bothamy
2636e1a98d - correct the debug message of the scancode set that was switched to (fix by osmaker) 2003-04-25 00:23:21 +00:00
Volker Ruppert
548dd3a13c - doublescan feature implemented (used by CGA 640x200x2, VGA 640x200 and modeX)
- clear tile array when switching to graphics mode, clear text snapshot when
  switching to text mode, do the same when changing the palette or disable video
- simplified the function determine_screen_dimensions()
- fixed the code for the CGA mode 640x200x2 in update() and mem_write()
2003-04-21 19:03:46 +00:00
Volker Ruppert
a6c6d50951 - CGA-compatible 640x200 2 color graphics mode (mode 6) implemented
- check of graphics_ctrl.shift_reg and BX_PANIC in vga mem_read() removed
2003-04-20 17:04:45 +00:00
Volker Ruppert
6b8da048a7 - fixed some uninitialized values found by valgrind 2003-04-07 17:08:38 +00:00
Volker Ruppert
d3b76c1ef9 - fixed 4 warnings 2003-04-05 08:26:49 +00:00
Gregory Alexander
8b1d1b2668 Fixed pit_wrap and virt_timer to update timer on reads. 2003-04-03 21:59:20 +00:00
Volker Ruppert
e5fc0292bc - fixed the usage of BX_CPP_AttrRegparmN() at the i/o write handler.
The floppy access should work again.
2003-03-09 14:03:32 +00:00
Christophe Bothamy
4c91b32b33 - fix non detection of hard drives by minix2.
The problem was submitted by Erik van Zijst on the ml.
2003-03-05 10:43:52 +00:00
Christophe Bothamy
e24ea95e73 - clean up the messed file I checked in yesterday 2003-03-03 17:39:16 +00:00
Christophe Bothamy
50efc3b8c7 - apply Conn Clark's patch.perf-regparm-cclark :
- it works only on x86 with gcc2.95+
  - uses the GCC function atribute "regparm(n)" to declare that certain
    functions use the register calling convention
  - performance improvement is about 6%
2003-03-02 23:59:12 +00:00
Volker Ruppert
14ca0d2550 - added stubs for the SB16 gameport 2003-02-24 18:35:48 +00:00
Christophe Bothamy
86f5aeb877 - fix compiling if BX_SCHEDULED_DIE_TIME is defined 2003-02-23 22:55:50 +00:00
Gregory Alexander
ef16df4f69 Fixed a few warnings. 2003-02-21 17:45:20 +00:00
Gregory Alexander
c96ae6360e Stupid overzealous copy-and-paste. 2003-02-21 17:37:55 +00:00
Gregory Alexander
1ea6ff74dd Return correct values from unregisterTimer. 2003-02-21 17:30:09 +00:00
Sigbjrrn Skjcret
7adae75957 Updated to latest changes... 2003-02-21 14:51:12 +00:00
Gregory Alexander
f195d3fa6d Oops, stupid debug thing. 2003-02-21 03:49:27 +00:00
Gregory Alexander
de1b90d978 pit_wrap.cc never uses the realtime stuff anymore. 2003-02-18 16:57:44 +00:00
Gregory Alexander
b77b477bfa The PIT is going to start using virtual timers instead
of having its own realtime mechanism.  The old PIT
realtime mechanism will be removed next.
2003-02-18 16:54:48 +00:00
Gregory Alexander
25fb7ad86e Linked virtual timer type to the realtime PIT option. 2003-02-18 16:52:40 +00:00
Gregory Alexander
4ea5f058f5 This is a hideously ugly hack that removes some of the
speed throddling.  However, it keep up with real time now.
2003-02-18 04:07:42 +00:00
Gregory Alexander
6946666f71 Added init for bx_virt_timer 2003-02-18 03:38:03 +00:00
Gregory Alexander
f844486d08 Fixed some basic runtime problems.
Stuff runs now, but I'm working on getting it to behave properly.
2003-02-18 03:36:01 +00:00
Gregory Alexander
2f451da125 Move configuration defines to .cc file instead of .h one. 2003-02-17 05:08:48 +00:00
Gregory Alexander
640ec800fb Fixed a few minor compile problems and updated initialization code. 2003-02-17 04:51:07 +00:00
Gregory Alexander
c0fa2db674 Add the virtual timers to the main compile. 2003-02-17 03:58:29 +00:00
Gregory Alexander
d9e1b2c8b7 Compiles now. I need to add some more stuff to test it. 2003-02-17 03:20:13 +00:00
Volker Ruppert
163c6be18d - fixed some warnings in the lowlevel networking code 2003-02-16 19:35:57 +00:00
Gregory Alexander
a0070f6c69 Lots of updates. Doesn't sync with real time yet. 2003-02-16 04:58:43 +00:00
Gregory Alexander
b0e7f6d0c6 Working on timer part. 2003-02-15 23:39:41 +00:00
Gregory Alexander
c0d7138924 Working on a general-purpose virtual timer interface. This should allow
more consistent time interfaces once it's finished.
2003-02-14 21:05:36 +00:00
Volker Ruppert
e492acd792 - VBE 4 bpp modes are using the default vga read/write/update code (for VESA
mode 0x102 = SVGA mode 0x6a)
- function redraw_area() now uses the old screen dimensions for redrawing
2003-02-09 08:25:22 +00:00
Christophe Bothamy
579f3c0539 - apply Ben Lunt's 160k, 180k, 320k floppy patch 2003-02-06 23:16:56 +00:00
Volker Ruppert
322b428cec - don't register i/o port address base+0x14 (comparison fixed) 2003-02-06 19:09:24 +00:00
Volker Ruppert
4e75ccea04 - moved declaration of variable 'i' to the top of the reset() function
(multiple usage of localized variables is okay for gcc, but not for MSVC)
2003-02-02 10:24:26 +00:00
Volker Ruppert
9f1464768c - simplified the port number search in the read and write handler
- fixed port adresses in BX_* messages
2003-02-01 12:21:43 +00:00
Volker Ruppert
ea2b756d43 - use the return value of ReadFile() to determine the presence of the cdrom media
- replaced tabs by spaces in this section
2003-01-30 20:44:32 +00:00
Volker Ruppert
ed976e4728 - dependencies updated after adding the pciusb device 2003-01-29 17:27:51 +00:00
Volker Ruppert
f25a3df39b - added minimal USB support (patch from Ben Lunt <fys@cybertrails.com>, updated
and improved by Christophe Bothamy and Volker Ruppert)

Comment from the author:

Attached is a "patch" file detailing what you need to do
to add USB support (UHCI only for now) to your existing
Bochs (2.0.xx) source code.

I use Win32 and VC++ but the source and modifications
should be platform and compiler independant.

Please let me know if this patch some how breaks the
build process of your compilation (Bochs 2.0.0 or above
only).

I would also like any feedback on how this code works
(or doesn't work) on your platform and within your
images. If you explain in as much detail as you can on
how it did or did not work, I will try to add to the source
to help it work on all platforms and images.
2003-01-28 16:58:10 +00:00
Volker Ruppert
35580e4539 - changed BX_USE_P2I_SMF to BX_USE_PCIVGA_SMF 2003-01-27 21:11:55 +00:00
Volker Ruppert
0e847ccd13 - new macro BX_PCI_DEV() for the PCI register function
- new symbol BX_USE_PCIVGA_SMF for the experimental PCI VGA device
- pcivga.cc: removed unnecessary include statement
- pcivga.cc: fixed two warnings
- pcivga.h: removed unnecessary symbol BX_IODEV_PCIVGA_H
2003-01-23 19:31:28 +00:00
Volker Ruppert
047699cc6a - VBE: update the variables for the old screen dimensions after redrawing 2003-01-21 17:39:47 +00:00
Christophe Bothamy
712af448b4 - add a default #else case when include system specific includes and defining BX_CD_FRAMESIZE.
This should fix the compile problems on Irix and Tru64.
  I'd like to backport those changes to 2.0.2, when I'll be confirmed it works ok.
2003-01-12 15:04:52 +00:00
Volker Ruppert
61f1fcd679 - fixed the behaviour of the vga emulation after changing a palette entry
* removed the unnecessary screen resize code (caused lots of resizes when
    booting the DLX linux demo)
  * force a redraw of the screen in text mode
2003-01-11 21:41:20 +00:00
Volker Ruppert
2c93eb7600 - port 0x03c7 returns the DAC state (read = 11b, write = 00b)
- pel data register returns 0x3f if the DAC is not in read mode
2003-01-11 11:18:04 +00:00
Christophe Bothamy
d18476b4ae - apply [ 661590 ] Fix read_toc() method in *BSD. Patch from Keith Matthew Jones 2003-01-10 22:59:44 +00:00
Christophe Bothamy
cfd2c2f923 - add experimental PCI VGA card (patch from Mike Nordell)
Modified Files:
 	bochs.h plugin.h iodev/Makefile.in iodev/devices.cc
 	iodev/iodev.h
 Added Files:
 	iodev/pcivga.cc iodev/pcivga.h
2003-01-10 22:43:54 +00:00
Volker Ruppert
366188e67a - more accurate emulation of port 0x61 bit #4. This bit toggles with every
refresh request (15 usec). This fixes SF bug #644042.
2003-01-09 20:43:32 +00:00
Volker Ruppert
8f88ab3b1b - plugin name for register function fixed 2003-01-09 17:14:20 +00:00
Christophe Bothamy
d22c0f0764 - remove read handler, on Volker advice 2003-01-07 08:17:15 +00:00
Volker Ruppert
954cdeb6e0 - FPU error register stub removed. It is now handled by a separate device 2003-01-06 18:18:21 +00:00
Christophe Bothamy
eb47a8bf01 - add msdos compatibility FPU exception support (irq 13). The IGNNE pin is no handled yet.
Modified Files:
 	bochs.h config.h.in plugin.h fpu/wmFPUemu_glue.cc
 	iodev/Makefile.in iodev/devices.cc iodev/iodev.h
 Added Files:
 	iodev/extfpuirq.cc iodev/extfpuirq.h
2003-01-06 02:20:47 +00:00
Volker Ruppert
3c604136a5 - removed unnecessary BX_INFOs 2003-01-05 21:40:07 +00:00
Volker Ruppert
946bd288f8 - fixed the conversion from bcd to binary values in function update_timeval() 2003-01-05 19:43:09 +00:00
Christophe Bothamy
f5ae12bfe8 - Update the mode sense command, cdrom capabillities.
This enables readinf some kind of cdroms.
  (patch from Hartmut Birr, bug submitted by Ben Lunt)
2003-01-05 03:22:03 +00:00
Christophe Bothamy
c6d3735a47 - fix compile warnings (patch from HJ) 2003-01-05 01:37:21 +00:00
Volker Ruppert
aefd5c6441 - implementation of the date and time change support
- implementation of the UIP bit using a new timer handler. The one_second_timer()
  function only sets the UIP bit and starts the UIP timer. The uip_timer()
  function handles the date / time update, the alarm check and finally clears
  the UIP bit.
- writing to control register A doesn't change the UIP bit
2003-01-04 00:02:07 +00:00
Volker Ruppert
9ca28db2ab - CMOS checksum must be generated after bx_init_plugins() (bug found with amidiag) 2003-01-03 11:43:24 +00:00
Volker Ruppert
5e09a0a3f8 - in modeX use the screen width in pixels stored in the CRT controller.
The pixels are horizontally doubled now.
2003-01-01 21:21:29 +00:00
Volker Ruppert
1cfe6c248a - function determine_screen_dimensions() prepared for SVGA mode 0x6A (800x600x4) 2002-12-31 16:58:02 +00:00
Christophe Bothamy
afc06f0296 - implement atapi command 0xA8 read (12) 2002-12-30 17:12:16 +00:00
Volker Ruppert
51c9c6c83a - bugfix for the textmode colors: the color value is not an index to the DAC
palette - it's an index to the attribute controller palette index.
  The new function get_actl_palette_idx() now returns the real DAC index.
  The guis sdl, wx and x11 are using the new function. TODO: Fix this bug in
  all other guis.
2002-12-28 11:49:17 +00:00
Volker Ruppert
a9007a6b63 - gcc 3.2 warnings fixed ("trigraph ??- ignored") 2002-12-27 10:20:53 +00:00
Volker Ruppert
2155da04ce - the current paste operation now stops on hardware reset 2002-12-26 22:19:44 +00:00
Volker Ruppert
8b4d0fd629 - added check for symbol FreeBSD (makes the soundlnx.* files work on FreeBSD) 2002-12-24 10:12:26 +00:00
Christophe Bothamy
4be6048bb4 - add comment about multi-bytes IO accesses 2002-12-24 08:20:13 +00:00
Bryce Denney
c5775cf076 - change "TCR write, reserved bits set" into an error instead of a panic.
This is happening in the debian image, but does not seem to affect
  operation of the NE2k at all.
2002-12-13 18:27:07 +00:00
Bryce Denney
d4ddc7a332 - changed my mind... With #ifdef macintosh there is the danger of messing
things up for MacOSX, and I don't want to risk that right now just before
  the release.  I changed it to #if BX_WITH_MACOS to be safe.
  (Bochs makefiles currently define -Dmacintosh on OSX.  Maybe they
  shouldn't but I'm not going to change it right now.)
2002-12-13 15:28:55 +00:00
Bryce Denney
a56b30d175 - #ifdef BX_WITH_MACOS is always true, even if BX_WITH_MACOS is defined to
be zero.  I changed it to #ifdef macintosh.
- removed extern "C" {} that only encompassed two #defines.  If there
  were any includes in there it would be important, but there weren't.
2002-12-13 14:42:11 +00:00
Bryce Denney
d296fa5bd5 - add debug message to notice when the set_cd_media_status method is called 2002-12-12 18:30:03 +00:00
Christophe Bothamy
16ebfdb9e1 - update for macos compile 2002-12-12 15:29:45 +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
d61b85202a - bugfixes in function redraw_area():
* missing VBE support added, use xmax / ymax variables instead of the
    values 640 / 480
  * use the constant Y_TILESIZE when checking the y position
  * variable vga_mem_updated was always set twice
2002-12-10 20:09:25 +00:00
Gregory Alexander
5130d479d6 change incorrect %lld terms to %llu. 2002-12-08 04:48:52 +00:00
Gregory Alexander
66e7558498 Cleaned up the realtime PIT code for win32.
This seeems to work on my laptop, but the processor
isn't fast enough to run anything substantial, so I'm
not certain how well it works.
2002-12-07 20:01:10 +00:00
Gregory Alexander
a9cf965597 Fixing up realtime PIT for use with win32.
Still need to do some cleanup that I was putting off.
2002-12-07 19:51:42 +00:00
Gregory Alexander
c4ad196af1 Still working on realtime PIT in win32.
This version is a bit of a hack that needs to be cleaned up before release.

There is also a glaring bug that lets things go WAY too fast when
we're trying to catch up to real time.  This is my highest priority
right now.
2002-12-07 19:17:01 +00:00
Volker Ruppert
cf44b0bd83 - added stub function update_timeval(). This function should convert the RTC
register values to a new timeval after date/time change. There is only a
  BX_ERROR for now.
- added separate cases for the alarm time registers and a BX_DEBUG message that
  reports the new alarm time.
2002-12-07 15:53:02 +00:00
Bryce Denney
f2b4a6b3d3 - remove tabs 2002-12-06 22:37:37 +00:00
Bryce Denney
da9de3c72d - use symbolic names for cmos register numbers instead of hex numbers.
This rev does not make any functional change.
2002-12-06 22:36:48 +00:00
Bryce Denney
7cb4093e4a - fill in CMOS register 0x37 with a copy of register 0x32. Some bioses use
0x32 for the century byte while others use 0x37.  Raul Hudea suggested this
  change, and Tony Heller reported that it allows WinXP to work!
2002-12-06 22:22:32 +00:00
Bryce Denney
050c47a182 - fix spelling of acquire 2002-12-06 18:48:08 +00:00
Bryce Denney
e9b135a5c6 - define macros to work around VC++ brain-dead-ness about converting between
unsigned 64-bit integer and 64-bit double precision floating point.  It
  knows how to convert Bit64s to double, but it refuses to convert Bit64u
  to double.  The macros: F2I converts from floating point to integer, and
  I2F converts the other way, using Bit64s as a transition step.
    F2I:  double -> Bit64s -> Bit64u
	I2F:  Bit64u -> Bit64s -> double
2002-12-05 17:43:00 +00:00
Volker Ruppert
a08c73548d - BX_ERROR added: changing time and date is not supported yet
- added register 0x32 (century) to the list of time and date registers
2002-12-04 21:09:36 +00:00
Gregory Alexander
5c99750c8b Updated the realtime PIT to work with win32. 2002-12-04 19:51:51 +00:00
Christophe Bothamy
e69203b361 - change BX_PANIC to BX_ERROR on "Stop disc command", then raise_interrupt 2002-12-03 21:04:04 +00:00
Christophe Bothamy
357da5438d - Volker said read of port 70h should return 0xff. WinXP does not seem to care. 2002-12-03 21:01:48 +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
Christophe Bothamy
e03430ec8d - added missing features that are required for winxp boot :
. read port 0x70 (cmos) : return index
  . atapi function 46 and 4a : return error
- put back the log prefix for cmos that disappeared when we did the plugins
2002-11-25 21:48:22 +00:00
Bryce Denney
3edf45a1d9 - regenerate makefile dependencies 2002-11-25 15:05:51 +00:00
Bryce Denney
a900dc40fe - fix mismatched parens in BX_INFO calls 2002-11-25 13:49:56 +00:00
Volker Ruppert
0c0a87feb5 - added BX_ERROR message for not existing devices. If you enable PCI, NE2K or
SB16 in your bochsrc and the device is not compiled into bochs you will get
  an error.
2002-11-21 17:10:13 +00:00
Bryce Denney
691c9d56c7 - change to nmake compatible lines (from Psyon) 2002-11-20 20:36:05 +00:00
Bryce Denney
c56bba0a44 - add BX_PLUGGABLE to all ne2k sub-files, so that they will import DLL
symbols

Modified Files:
  eth.cc eth_arpback.cc eth_fbsd.cc eth_linux.cc eth_null.cc
  eth_packetmaker.cc eth_tap.cc eth_tuntap.cc
2002-11-20 19:06:23 +00:00
Bryce Denney
c43b46c531 - check in some small compile patches from Martin Str|mberg <ams@ludd.luth.se>
to make Bochs compile on DJGPP.
  - put references to SIGSTOP and SIGTSTP in #ifdefs
  - add definition of BX_CD_FRAMESIZE and CD_FRAMESIZE
  - look for curses functions in -ldcurses

Modified Files:
  gui/term.cc iodev/cdrom.cc configure.in configure
2002-11-20 12:23:42 +00:00
Volker Ruppert
64b66e709e - converted ne2k device to a plugin
- moved ne2k presence check to devices.cc
- added special make rules for the ne2k and the lowlevel network support
- added macro for the debug feature of the ne2k
2002-11-19 18:56:39 +00:00
Bryce Denney
97f911d1fe - when VC++ sees local variables in a for statement, it doesn't think
that they go out of scope at the end, so it complains about duplicate
  definitions.
2002-11-19 05:51:52 +00:00
Bryce Denney
0a7cb3a43c - apply patch.ifdef-disabled-options. Comments from that patch are below:
For a whole lot of configure options, I put #if...#endif around code that
  is specific to the option, even in files which are normally only compiled
  when the option is on.  This allows me to create a MS Visual C++ 6.0
  workspace that supports many of these options.  The workspace will basically
  compile every file all the time, but the code for disabled options will
  be commented out by the #if...#endif.

  This may one day lead to simplification of the Makefiles and configure
  scripts, but for the moment I'm leaving Makefiles and configure scripts
  alone.

  Affected options:
    BX_SUPPORT_APIC (cpu/apic.cc)
    BX_SUPPORT_X86_64 (cpu/*64.cc)
    BX_DEBUGGER (debug/*)
    BX_DISASM (disasm/*)
    BX_WITH_nameofgui (gui/*)
    BX_SUPPORT_CDROM (iodev/cdrom.cc)
    BX_NE2K_SUPPORT (iodev/eth*.cc, iodev/ne2k.cc)
    BX_SUPPORT_APIC (iodev/ioapic.cc)
    BX_IODEBUG_SUPPORT (iodev/iodebug.cc)
    BX_PCI_SUPPORT (iodev/pci*.cc)
    BX_SUPPORT_SB16 (iodev/sb*.cc)

Modified Files:
  cpu/apic.cc cpu/arith64.cc cpu/ctrl_xfer64.cc
  cpu/data_xfer64.cc cpu/fetchdecode64.cc cpu/logical64.cc
  cpu/mult64.cc cpu/resolve64.cc cpu/shift64.cc cpu/stack64.cc
  debug/Makefile.in debug/crc.cc debug/dbg_main.cc debug/lexer.l
  debug/linux.cc debug/parser.c debug/parser.y
  disasm/dis_decode.cc disasm/dis_groups.cc gui/amigaos.cc
  gui/beos.cc gui/carbon.cc gui/macintosh.cc gui/rfb.cc
  gui/sdl.cc gui/term.cc gui/win32.cc gui/wx.cc gui/wxdialog.cc
  gui/wxmain.cc gui/x.cc iodev/cdrom.cc iodev/eth.cc
  iodev/eth_arpback.cc iodev/eth_fbsd.cc iodev/eth_linux.cc
  iodev/eth_null.cc iodev/eth_packetmaker.cc iodev/eth_tap.cc
  iodev/eth_tuntap.cc iodev/eth_win32.cc iodev/ioapic.cc
  iodev/iodebug.cc iodev/ne2k.cc iodev/pci.cc iodev/pci2isa.cc
  iodev/sb16.cc iodev/soundlnx.cc iodev/soundwin.cc
2002-11-19 05:47:45 +00:00
Bryce Denney
d9eaf5c7d8 - eip is no longer in bx_cpu. Now we must call get_EIP() accessor instead. 2002-11-18 17:27:40 +00:00
Volker Ruppert
35c2be5518 - changed ne2k presence options from "valid" to "present" 2002-11-18 17:16:07 +00:00
Volker Ruppert
cde5737dc5 - the names of the object files for the lowlevel network support are now stored
in NETLOW_OBJS. The value of NE2K_OBJS is now 'ne2k.o' if ne2k support is
  enabled. These changes are necessary before converting the ne2k to a plugin.
2002-11-17 12:49:46 +00:00
Bryce Denney
cb1d6121b2 - this should fix bug #635223: VGA tiles array access out of bounds.
For years we have been writing beyond the end of this array in the VGA code:
    bx_bool  vga_tile_updated[BX_NUM_X_TILES][BX_NUM_Y_TILES];
  and doing who-know-how-much damage to other memory structures in the process.
  I changed every reference to vga_tile_updated[][] into calls to two macros
  GET_TILE_UPDATED and SET_TILE_UPDATED, and defined the macros to check
  the bounds of the array before referencing it.  At first I used an
  assert, then a panic, then an error, and now I'm not printing any message
  at all because there were thousands and thousands of messages during
  a boot of win95 when it's updating the win95 logo screen.
- I couldn't resist cleaning up a few confusing-looking things like
  "if (condition) { // }".  There are no functional changes except for
  bounds checking on the vga_tile_updated array.
2002-11-16 15:43:13 +00:00
Volker Ruppert
26c9b55bc2 - the SB16 plugin dll needs the link option -lwinmm
- BX_PLUGGABLE must be defined in soundwin.cc
2002-11-16 10:29:57 +00:00
Bryce Denney
adb6e17ffa - after plugin conversion, the global variable "bx_sb16" doesn't exist
anymore.  Point to the new global symbol for the sb16.
2002-11-15 18:29:19 +00:00
Volker Ruppert
3d3deeb5fc - replaced memcpy() in pci_read() by a more portable code. This should fix the
problems with PCI on big-endian machines.
2002-11-14 20:02:58 +00:00
Bryce Denney
1bd9a44a9e - plugins are now called libbx_NAME.so for unix and bx_NAME.dll for win32.
- plugins are installed into ${plugdir} which is defined to be
  ${libdir}/bochs-${VERSION}/plugins.

Modified Files:
  Makefile.in plugin.cc configure.in configure gui/Makefile.in
  iodev/Makefile.in
2002-11-14 18:45:49 +00:00
Bryce Denney
edf1b23a05 - check for NULL before using pluginSB16Device. 2002-11-14 02:32:33 +00:00
Volker Ruppert
84b4cf6d4c - converted sb16 device to a plugin
- moved sb16 presence check to devices.cc
- added special make rules for the sb16 and the lowlevel sound support
2002-11-13 18:39:41 +00:00
Volker Ruppert
675f140e37 - the name of the object file for the lowlevel sound support is now stored in
SOUNDLOW_OBJS. The value of SB16_OBJS is now 'sb16.o' if SB16 support is
  enabled. These changes are necessary before converting the SB16 to a plugin.
2002-11-12 21:07:17 +00:00
Christophe Bothamy
e359cfc5d3 - fix [ 628663 ] double panic from cmos get_timeval. As Volker said :
The cmos function get_timeval is only used by the pc_system
  to print the last system time on exit. We should remove the
  STUBFUNC() macro and simply return 0.
2002-11-11 22:01:08 +00:00
Volker Ruppert
24eaffd453 - dma read/write functions of floppy and sb16 are now private members of the
device objects
- sb16: function opl_timerevent() and variables currentdma8 and currentdma16
  are now private members of the device object
2002-11-10 10:14:55 +00:00
Volker Ruppert
95699f5a46 - removed initialization of the PCI plugins from init() since it is done by
bx_init_plugins()
2002-11-10 08:12:12 +00:00
Volker Ruppert
01027b46c9 - converted devices pci and pci2isa to plugins
- moved PCI presence check to devices.cc
- moved initialization of the PCI register arrays from constructor to init()
- PCI macros updated
2002-11-09 20:51:40 +00:00
Christophe Bothamy
4f843a183e - add check if cdrom.ready before reading another block. (this should not happen, but...) 2002-11-08 22:14:55 +00:00
Christophe Bothamy
92f04bdd0b - fix "if ((addr < 0xB0000) | (addr > 0xB7FFF)) return;" bug, thanks to Kazuo Fox Dohzono 2002-11-07 22:02:13 +00:00
Volker Ruppert
f375a0743b - the value of the command register must be always 0x00 (BX_ERROR fixed) 2002-11-04 17:29:12 +00:00
Volker Ruppert
2deef745e6 - added new DEV_* macros for PCI functions in plugin.h
- memory code: direct PCI memtype function calls replaced by DEV_* macros
- PCI devices: direct i/o register function calls replaced by DEV_* macros
2002-11-03 17:17:11 +00:00
Bryce Denney
428b686df6 - commit patch [ 630863 ] Fix and integrate MacOSX cdrom
by Jeremy Parsons <brefin@mac.com>
  http://sourceforge.net/tracker/index.php?func=detail&aid=630863&group_id=12580&atid=312580
- modified: iodev/cdrom.cc configure.in configure
- removed: iodev/cdrom_osx.cc
2002-11-01 16:36:27 +00:00
Gregory Alexander
2b1feccd4e Typecasts help compile with VisualAge. 2002-10-30 23:58:03 +00:00
Gregory Alexander
33fb7c544f Moved things around and cleaned up the options a bit. 2002-10-30 23:54:29 +00:00
Gregory Alexander
5bc28d6dfa Add a minimum IPS value at compile time.
This is used for calculating the minimum speed for the realtime PIT and for flagging errors with user IPS values.
2002-10-30 18:30:29 +00:00
Peter Tattam
ac49ea2418 Patch to fix DOS based packet drivers that use an odd count for the NE2000
DMA.  Should print error message but allow to continue.  (bochs log will
show DMA underrun for the last byte transferred).
2002-10-30 11:11:26 +00:00