Commit Graph

3078 Commits

Author SHA1 Message Date
Volker Ruppert
47f9e4bc12 Builtin slirp: Continued updating from libslirp code.
Processed chksum.cc and dnssearch.cc.
Removed obsolete / unused stuff from compat.h and slirp_config.h.
2024-04-28 21:05:41 +02:00
Volker Ruppert
afba2c932e Builtin slirp: Now util.cc replaces compat.cc completely. 2024-04-28 14:22:51 +02:00
Volker Ruppert
58f44900de Builtin slirp: Removed QTAILQ* stuff and some other cleanups. 2024-04-28 10:43:00 +02:00
Volker Ruppert
c6b7961799 Some more work on builtin slirp - no functional changes yet.
Added all of the SlirpCb and SlirpConfig structures from libslirp.
2024-04-26 22:40:12 +02:00
Volker Ruppert
c5fd56558f Builtin slirp: compilation fixes for VS2019 and Cygwin.
- VS2019 needs C++20 standard to be set.
- Some Cygwin related additions in util.cc.
- slirp_ssize_t definition and usage fixed.
- changed include position of compat.h in slirp.h.
2024-04-25 21:10:48 +02:00
Volker Ruppert
8c81464156 Updated builtin slirp TFTP support from libslirp code.
Added most of ip6.h, util.c and util.h files (except glib stuff).
Related changes in several files.
2024-04-24 22:55:03 +02:00
Volker Ruppert
7e3edfe7d9 Continued updating builtin slirp from libslirp code.
- Updated arp_table.cc (except debug code).
- Updated bootp.cc (Bochs extensions still present).
- Related changes in other files.
2024-04-21 20:35:27 +02:00
Volker Ruppert
aa529a42f6 Fixed slirp compilation issues related to inet_aton(). 2024-04-21 13:13:36 +02:00
Volker Ruppert
f1259413fb Continued work on builtin slirp networking support.
- Modified info / error log message handling.
- Renamed insque / remque functions using "slirp_" prefix.
- Removed useless SVN ID from most file headers and add license specifier instead.
2024-04-21 11:27:51 +02:00
Volker Ruppert
fa5c5ebe88 Started updating builtin slirp from libslirp code (callback support).
Added callbacks send_packet() and clock_get_ns().
2024-04-19 22:18:29 +02:00
Volker Ruppert
a290ce33e0 Builtin slirp now also returns "local" as the domain name.
Some other cleanups in bootp_reply().
2024-04-18 18:08:00 +02:00
Volker Ruppert
4c7e3d6f2f Fixed size of TFTP option reply. 2024-04-16 20:23:32 +02:00
Volker Ruppert
0f6287b592 Applied suggested fix for slirp TFTP support to fix issue #305. 2024-04-16 17:54:59 +02:00
Volker Ruppert
5376f129ee Some work on the slirp networking code.
- Added support for optional TFTP server name in builtin slirp and libslirp.
- Added default domain name for libslirp.
2024-04-14 11:04:01 +02:00
Volker Ruppert
55d7488be6 Some work for libslirp networking support on Windows.
Added inet_aton() function (missing on Windows) from builtin slirp code.
TODO: update builtin slirp code based on libslirp 4.70 code.
2024-04-14 01:01:20 +02:00
Volker Ruppert
155fc74d30 Some work on the libslirp networking support.
- Added capability to turn on IPv6 support with slirp.conf option (using default
  QEMU settings for now / non-Windows platforms only).
- Added some basic timer code required by IPv6 based on example code.
2024-04-13 10:18:38 +02:00
Volker Ruppert
0ff2905998 Added support for using external slirp library instead of builtin one.
- Added configure option --enable-using-libslirp to turn on the search for the
  library. In config.h BX_HAVE_LIBSLIRP is set to 1 if found. The network Makefile
  is set up accordingly. If not enabled or not found, the builtin slirp code is used.
- Moved samba server code and host forwarding code to eth_slirp.cc.
- Modified builtin slirp API to reduce differences.
- NOTE: IPv6 support present in libslirp is not yet enabled (needs more testing).
- TODO: Update builtin slirp code based on libslirp 4.7.0 code.
2024-04-07 19:57:25 +02:00
Biswapriyo Nath
e1d67d9ce0
Fix checking Android platform with __ANDROID__ macro (#299)
This change fixes compiler errors in Android as following.
    
../../../iodev/sound/soundoss.cc:43:10: fatal error: 'sys/soundcard.h'
file not found
       43 | #include <sys/soundcard.h>
          |          ^~~~~~~~~~~~~~~~~
../../../iodev/network/slirp/misc.cc:195:12: error: use of undeclared
identifier 'getdtablesize'; did you mean 'getpagesize'?
      195 |                 for (s = getdtablesize() - 1; s >= 3; s--)
          |                          ^~~~~~~~~~~~~
          |                          getpagesize
/data/data/com.termux/files/usr/include/unistd.h:356:5: note:
'getpagesize' declared here
      356 | int getpagesize(void) __INTRODUCED_IN(21);
          |     ^
    
The official documentation also suggests to use __ANDROID__ macro which
is defined by the compiler irrespective of included headers and build
system.
https://android.googlesource.com/platform/bionic/+/HEAD/docs/defines.md
2024-04-06 23:18:01 +02:00
Volker Ruppert
c1f93f0c94 Added PCM recording support using the PulseAudio simple API. 2024-04-01 21:29:55 +02:00
Volker Ruppert
2979ba4b3a Lowlevel sound support: Attempt to fix issue #270.
If resampler is not present, flush output before changing PCM parameters.
2024-04-01 10:31:51 +02:00
Volker Ruppert
6ac761894c Added lowlevel sound output support using the PulseAudio simple API.
TODO: PulseAudio also supports sound recording and it's portable (Windows).
2024-03-31 13:19:43 +02:00
Benjamin David Lunt
4e378cbcf2
check the nps bit before operating on the psm bit (#290)
The PSM bit is only valid if NPS = 0 and a few other minor additions and
syntax fixes
2024-03-18 07:04:31 +02:00
Benjamin David Lunt
d94445257e
add spaces and correct alignment to source (#289) 2024-03-18 06:58:49 +02:00
Volker Ruppert
a5a992c792 VGA_MEM_FIX: Removed legacy VGA code and VGA_MEM_FIX definition. 2024-03-17 15:58:27 +01:00
Benjamin David Lunt
2314cbcfe1
wheel mouse button (#282)
If not in wheel-mouse mode, don't report the wheel button event
2024-03-13 21:14:05 +02:00
Benjamin David Lunt
557976bee1
Initial start of the USB Debugger (#165)
This is the start of the Experimental USB Debugger (currently for the
Windows platform only).

Currently only supports the UHCI and xHCI controllers. The remaining
function of these two controllers and the two remaining controllers are
in the works and will be added to when time allows.

The User.dbk has been updated with (temporary) html files at
https://www.fysnet.net/bochs/user/index.html showing the process to
invoke and use the USB debugger (Section 5.8).

In its completion, this debugger will allow you to view and modify most
aspects of the specified USB controller. For example, currently you can
view and modify a TRB listed in the xHCI's Command or Event Ring. Other
aspects will be added.

I do not use and am not fluent in the use of `configure`,
`configure.ac`, and associated configuration files. I also don't use the
`gui/Makefile.in` file.

Someone that is more fluent in the way these files work, please add the
necessary items to successfully compile this PR.

---------

Co-authored-by: Shwartsman <stanislav.shwartsman@intel.com>
2024-03-10 13:05:41 +02:00
Volker Ruppert
1307853e13 VVFAT: Fixed short name genaration in case base name length is > 8. 2024-03-06 17:09:34 +01:00
Volker Ruppert
a92cbdd946 Banshee/Voodoo3: Lock buffer swapping while rendering screen.
This should fix issue #264.
2024-02-25 15:53:48 +01:00
Volker Ruppert
abdbc52f22 Finally enabled the VGA_MEM_FIX code.
The legacy code could be removed after release Bochs 2.8 if there are no issues.
2024-02-18 11:03:31 +01:00
Volker Ruppert
cc162522bb Fixed compilation with VGA_MEM_FIX not set. 2024-02-17 08:59:00 +01:00
Volker Ruppert
9e6d839caa VGA_MEM_FIX: Force a refresh of the text buffer on mode change and restore. 2024-02-17 08:53:25 +01:00
Volker Ruppert
75d76db967 Cirrus: Added support for 4-bpp VBE modes with original VGABIOS. 2024-02-16 14:23:56 +01:00
Benjamin David Lunt
e4d8ca494f
Update usb_ehci.cc (#271)
No reason to stop executing the Async list simply because the driver
didn't clear the IAA bit in the Status register.

Normally, a driver should clear it, but there is no instruction in the
specification to stop the Async list simply because this bit isn't
cleared.

Debug log is still present to inform the user.

Co-authored-by: Volker Ruppert <Volker.Ruppert@t-online.de>
2024-02-15 16:53:29 +01:00
Volker Ruppert
1ff88fdd05 VGA_MEM_FIX: Added text buffer in legacy format to simplify text update.
Using character / attribute pairs expected by the gui text update makes the
update code simpler and faster.
TODO: If possible add a buffer for active text font data.
2024-02-13 17:38:52 +01:00
Volker Ruppert
57d38ffb86 VGA_MEM_FIX: Added memory size mask to fix planar VGA modes. 2024-02-12 22:12:34 +01:00
Volker Ruppert
117f71a185 VGA_MEM_FIX: Some odd/even mode changes for correctness.
Offset must be shifted left by 2 instead of 1.
Even offset writes can go to plane 0 and 2, odd ones to plane 1 and 3.
2024-02-12 16:58:38 +01:00
Volker Ruppert
30c1e74627 VGA_MEM_FIX: Next attempt to fix odd/even mode related issues.
Now using the sequencer 'odd/even disable' switch to determine mode.
2024-02-11 17:11:48 +01:00
Volker Ruppert
549d052e34 VGA_MEM_FIX: Picked a better name for the sequencer odd/even disable switch. 2024-02-11 14:49:12 +01:00
Volker Ruppert
0e5800bf98 VGA_MEM_FIX: Fixed cursor address of the invisible cursor.
Now using the highest address of the default text mode buffer.
2024-02-11 13:40:02 +01:00
Volker Ruppert
39155bd3ae VGA_MEM_FIX: Temporary fix for special memory access mode in modeX.
In odd/even mode fall back to planar mode if "chain odd/even" bit is 0.
2024-02-11 09:37:06 +01:00
Volker Ruppert
945ee597f0 Added currently disabled set of fixes for the VGA memory management.
- Added disabled definition VGA_MEM_FIX in vgacore.h. The VGA core code works as
  usual unless you uncomment the define.
- Added correct implementation of the "chain four" and "odd/even" addressing mode.
  This should fix the Debian / GRUB boot issue (#257) with both Bochs VBE and Cirrus.
- Added some compatibility code to make the gui text update work as usual.
- Tested all VGA modes except 256-color word mode (no test case).
- Some more testing with old DOS games may be required before I enable it by default
  and finally remove the legacy code.
2024-02-10 17:30:24 +01:00
Volker Ruppert
fd68912dc7 Small cleanups in the VGA core code.
The text snapshot buffer is now allocated dynamicly.
2024-02-10 14:00:09 +01:00
Volker Ruppert
4ab88c3d8f Cirrus: The first MB of video memory is always accessible. 2024-02-10 10:36:39 +01:00
Volker Ruppert
5c715aa9a3 Fixed clipping parameters in Banshee/Voodoo3 (issue #236).
Added 'clip_mask' with width depending on model.
Fixed VGA display issue discovered with Voodoo3.
2024-02-09 15:03:32 +01:00
Volker Ruppert
e5ff346368 Some fixes and cleanups after latest changes.
- Fixed Cirrus text mode output.
- VBE now using it's own 'line_offset' value.
- Since font change is now handled in update(), removing gui method set_text_charbyte().
2024-02-09 14:34:01 +01:00
Volker Ruppert
e53cf3b962 VBE/VGA: More accurate implementation of GRUB save/restore support.
Added VGA chain4 mode read/write support from VBE frame buffer.
Handle charmap update in update() using modified 'vga_mem_udated' flag.
Added temporary code for chain four memory addressing.
TODO: VGA memory handling rewrite including odd/even mode support.
2024-02-08 23:05:48 +01:00
Stanislav Shwartsman
c3269722f4 fixed spelling in comment 2024-02-07 00:18:06 +02:00
Volker Ruppert
1221217a7d VBE: Preserve original line offset while in VBE mode. 2024-02-06 21:49:59 +01:00
Volker Ruppert
4e6b4165f5 Added workaround for the save/restore function of the GRUB bootloader.
The VGA core needs an extensive rewrite to support it correctly with
both Bochs VBE and Cirrus.
2024-02-06 20:36:15 +01:00
Benjamin David Lunt
3525a89b7a
Update usb_xhci.cc (#262) : The EDTLA should be updated for OUT going packets too.
The EDTLA should be updated for OUT going packets too.
2024-02-05 07:08:31 +02:00