Commit Graph

775 Commits

Author SHA1 Message Date
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