Commit Graph

2750 Commits

Author SHA1 Message Date
Volker Ruppert
dffaa9794b Added support for saving text mode snapshot in BMP format if file extension is
set accordingly.
TODO #1: Text mode features split screen and h/v pel panning missing for now.
TODO #2: Show error messages related to dialogs in message boxes.
2020-10-16 17:25:50 +00:00
Volker Ruppert
1d0efc734f Some work on the Voodoo Banshee emulation.
- New attempt to fix the host-to-screen bitblt issue with monochrome source.
  The specs are wrong at this point. The rules for calculating the real source
  pitch are still unknown. These hacks should fix most the glitches.
- Added source colorkeying support for host-to-screen blt with pattern.
2020-10-15 21:00:18 +00:00
Volker Ruppert
98e10e0bab Some changes in the Voodoo code.
- Banshee: Added colorkey support for host-to-screen blts without pattern.
- Clearing base address registers in reset is not okay. Maybe we have to
  unregister i/o and memory regions here. This affects other devices, too.
- Some other small changes and typo fixes.
2020-10-12 19:30:25 +00:00
Volker Ruppert
b70954d3ab Don't report BX_ERROR when writing an unsupprted to shutdown status register
in case a CMOS image is used.
2020-10-11 18:47:21 +00:00
Volker Ruppert
03404ff050 Some small changes in the PM register handling. No functional change. 2020-10-10 16:09:58 +00:00
Volker Ruppert
0b06e25d4c Voodoo2 cpu-to-screen blt: Added support for color orders other than ARGB. 2020-10-09 16:25:37 +00:00
Volker Ruppert
938c5bd26c Implmented byte / word wizzling in Voodoo2 and Banshee bitblt code. 2020-10-08 17:22:25 +00:00
Volker Ruppert
dd44d70670 Several changes in the Voodoo code.
- Voodoo2 bitblt: fixed handling of negative bltSize values.
- 3D core: limit error messages for TEXLOD_LOD_ZEROFRAC to 50.
- Banshee: fixed MSVC warning.
2020-10-07 16:06:49 +00:00
Volker Ruppert
7e7f6e03e8 Some work on the Voodoo2 cpu-to-screen bitblt code.
- Added support for "byte packed" monochrome source data.
- TODO #1: All modes except 16 bpp color source untested (based on specs).
- TODO #2: byte / word wizzling, other color orders, 24 bpp source dithering.
2020-10-06 16:54:21 +00:00
Volker Ruppert
9ed02917b2 Some work on the Voodoo2 cpu-to-screen bitblt code.
- Added support for undithered 24 bpp source data.
- Fixed "standard monochrome" mode in case of transparency.
- TODO: byte / word wizzling, other color orders, 24 bpp source dithering.
2020-10-06 15:40:35 +00:00
Volker Ruppert
32a9d7433c Implemented Voodoo2 cpu-to-screen bitblt for 16 bpp and "standard monochrome"
source data. Cleaned up the Voodoo2 bitblt sources a little bit.
2020-10-06 12:55:57 +00:00
Volker Ruppert
f9eedc4a2c Some work on the Voodoo2 bitblt functions.
- Implemented screen-to-screen blt function (untested).
- Fixed and improved "Rectangle fill" function.
- "SGRAM fill" function rewritten similar to the other functions.
- TODO: cpu-to-screen function (handle data written to bltData register).
2020-10-04 18:35:06 +00:00
Volker Ruppert
1a9e9be180 Some work on the Voodoo Banshee support.
- Implemented destination colorkey support for the remaining functions.
- Some other small changes in the Banshee code.
- TODO: Source colorkey support for host-to-screen blts.
2020-10-04 14:28:22 +00:00
Volker Ruppert
a6bc694082 Implemented Voodoo2 BitBlt command "Rectangle fill" with clipping and chroma
range support.
2020-10-03 18:10:18 +00:00
Volker Ruppert
8e0541fe5a Fixed some Voodoo2 regressions.
- Fixed SGRAM fill command (y start and size have one more bit - spec is wrong).
- CMDFIFO packet type #5: texture address is a 32 bit register number.
- Setting clut_dirty is required when writing to most of the fbiInit registers.
2020-10-02 22:44:37 +00:00
Volker Ruppert
90219fc8ca Some work on the Banshee 2D colorkey feature.
- Added colorkey support for screen-to-screen pattern blt, rectangle fill and
  pattern fill commands.
- Consider colorkeying enabled when branching to normal or pattern blt functions.
- Changed 2D TODO messages to BX_ERROR and some other minor changes.
2020-10-02 17:30:20 +00:00
Volker Ruppert
ec2dcd4719 Some small changes in the Voodoo code.
- Fixed switch to 3D mode (mixed mode doesn't exist).
- Added / improved error messages for unimplemented features.
2020-09-29 21:29:09 +00:00
Volker Ruppert
69db3a60a8 Some small changes in the Voodoo2 BitBlt code.
- Fixed SGRAM fill command.
- Improved BX_ERROR messages for unimplemented commands.
- Changed message for bltData register writes to BX_DEBUG for now.
- TODO: Implement Voodoo2 BitBlt commands.
2020-09-27 15:36:55 +00:00
Volker Ruppert
e8e9cd03a3 Some work on the CMDFIFO "byte disable" (Voodoo2) / "byte enable" (Banshee)
feature of packet type #5. Added some W2 cases for texture writes, modified
code for linear LFB writes and added BX_ERROR messages for the WN cases. Some
more test cases are needed for a complete implementation.
2020-09-27 08:15:48 +00:00
Volker Ruppert
8977c34db1 Implemented colorkey support for screen-to-screen blts with color source. 2020-09-26 15:59:41 +00:00
Volker Ruppert
870d4034a7 Some work on the Voodoo code.
- Real fix for the Voodoo2 DirectX issue after CLUT pens implementation.
- Banshee hardware cursor now uses the CLUT pens for the background.
- Banshee hardware cursor now uses the same 3D start address as update().
2020-09-25 17:37:46 +00:00
Volker Ruppert
06acf5e761 Some work on the Voodoo 3D code.
- Set clut_dirty flag when writing to fbiInit registers. This fixes a Voodoo2
  issue when using the DirectX driver.
- Report another unimplemented case in the texture code.
2020-09-25 12:06:14 +00:00
Volker Ruppert
f845457362 Implemented usage of the color lookup table (CLUT) for gamma correction during
video refresh in 16 bpp modes. The Banshee also uses this feature in 16 bpp
desktop mode in addition to 3D modes. The code for the pen calculation comes
from the original Voodoo patch for DOSBox. Since it was unused there, I had
disabled it when porting to Bochs.
2020-09-23 14:24:17 +00:00
Volker Ruppert
3aba63304a Added BX_INFO for unimplemented trilinear textures and small code cleanup. 2020-09-18 19:29:47 +00:00
Volker Ruppert
439152d2e4 Implementing 64 bit read access to VRAM fixes background pattern issues in XP. 2020-09-18 15:24:12 +00:00
Volker Ruppert
fa36ec0e87 Fixed i/o access map and changed some messages to BX_DEBUG. 2020-09-18 09:35:52 +00:00
Volker Ruppert
052db63202 Some work on the Voodoo Banshee emulation.
- Fixed serious issues in 16 bpp mode of XP guest (clipped y value).
- Added BX_ERROR messages for unsupported features.
- Added / updated comments.
- TODO #1: Background pattern issues in XP guest still remain in all modes.
- TODO #2: Some small issues in Win9x guests caused by monochrome host blts.
2020-09-17 20:26:52 +00:00
Volker Ruppert
9d2d3cd759 Some changes in the Voodoo code for better performance in 3D mode.
- Now using semaphores instead of events in the Voodoo 3D code.
- Handle swapbuffer command flag "swap in sync with vertical retrace".
2020-09-15 18:55:03 +00:00
Volker Ruppert
6f323dd9fd Some changes for the Banshee emulation.
- Polygon fill: Check if pixels are within clip window.
- Polygon fill: Added error message for unimplemented pattern ROPs.
- Some cleanups in the code for pattern ROPs with transparency.
2020-09-14 18:06:56 +00:00
Volker Ruppert
8b41cc3ff7 Fixed graphics snapshot in Banshee 3D mode. 2020-09-13 09:12:43 +00:00
Volker Ruppert
2429bb7891 Banshee: Fixed video memory offset calculation for tiled LFB space writes. 2020-09-12 12:24:46 +00:00
Volker Ruppert
dcebc1185c Setting up memory for TMU #1 fixes segfault Voodoo3 DirectX test. 2020-09-11 20:23:50 +00:00
Volker Ruppert
d7d3d27f57 Some work on the Voodoo Banshee emulation.
- Implemented 2D command "Polygon Fill".
- Changed some log messages to BX_DEBUG.
2020-09-11 07:08:47 +00:00
Volker Ruppert
42738bf8c9 Some work on the "polygon fill" code (drawing upper left vertex for now). 2020-09-09 08:12:07 +00:00
Volker Ruppert
3183103896 Some small Voodoo changes.
- Voodoo 1/2: fixed behaviour when resetting with Voodoo output on.
- Banshee / Voodoo3: locking render_mutex not necessary when writing i/o regs.
2020-09-06 16:52:18 +00:00
Volker Ruppert
bdb7954732 Some small changes for the vnet server support.
- bxhub: initialize DHCP "net" IP address.
- DHCP: increase lease time to 24 hours.
- DHCP: simplified broadcast IP address handling.
2020-09-05 08:39:25 +00:00
Volker Ruppert
b76e10a600 Added basic support for the debugger command 'info device "voodoo"'
(Banshee/Voodoo3 only).
2020-09-03 18:17:36 +00:00
Volker Ruppert
a16a4a0886 Some improvements for the vnet config file support.
- Added options "net" for the IP address space and "ftp" for the FTP server.
- Added some sanity checks for the IP address configuration.
- Added sample config file.
2020-09-03 14:23:06 +00:00
Volker Ruppert
8bbcc7c65e Save / restore: renamed register methods of device cores (fixes warnings in
FreeBSD gcc 9.3).
2020-09-03 06:45:39 +00:00
Volker Ruppert
748b6a1279 Fixed gcc 9.3 warnings in case C++17 support is enabled. 2020-09-02 08:35:44 +00:00
Volker Ruppert
600228148d Fixed some gcc 9.3 warnings. 2020-09-01 20:13:56 +00:00
Volker Ruppert
77f377a36f Fixed compilation in the MSVC plugins case. 2020-08-30 08:34:57 +00:00
Volker Ruppert
fbc8921b0a Some changes on the "vnet" networking module.
- Added new config file options "host", "dns" and "dhcpstart" (similar to slirp).
- modified bx_vnet_pktmover_c class to be compatible with other modules.
- On TFTP RRQ check file presence directly (fixes iPXE boot).
2020-08-29 17:45:42 +00:00
Volker Ruppert
a96065314c Started implementing config file support for the 'vnet' module similar to the
'slirp' one. File name can be specified with the "script" parameter. Currently
supported parameters: bootfile, hostname and pktlog.
2020-08-25 19:04:05 +00:00
Volker Ruppert
b558f19338 Prepared vnet server for setting up client hostname from config. 2020-08-24 11:22:37 +00:00
Volker Ruppert
0e72952798 Fixed hostname reporting in DHCP reply. 2020-08-23 10:54:16 +00:00
Volker Ruppert
ec9bae94c7 Some small changes for Banshee/Voodoo3 BitBlt.
- Added stub for host-to-screen stretch blt.
- Improved stub for "polygon fill" command.
2020-08-20 09:20:23 +00:00
Volker Ruppert
5e6d0b7545 Some small changes for Banshee/Voodoo3.
- Added support for host-to-screen pattern blts with color source.
- Added stub for "polygon fill".
2020-08-16 20:43:49 +00:00
Volker Ruppert
8d607c4886 Some small changes for Banshee/Voodoo3.
- Fixed start address for the gui screen update in 3D overlay mode.
- Small optimization for drawing transparent monochrome bitmaps.
- In the restore case start the fifo thread in after_restore_state().
- Report unimplemented colorkey feature (test case missing).
- TODO: issues in some Windows guests still not fixed.
2020-08-16 13:37:50 +00:00
Volker Ruppert
843e7ea557 Some fixes for Banshee / Voodoo3.
- Save/restore additions for 2D desktop mode.
- Fixed pitch in 3D overlay mode for hardware cursor.
- TODO list:
  - Minor issues in explorer navigation bar of Win98SE.
  - Ugly background pattern under software cursor and XP start menu.
  - Segfault after switching to 3D mode at XP Direct3D test (Voodoo3 only).
  - Serious display issues in 16 bpp modes of XP guest (Voodoo3 only).
2020-08-14 16:22:59 +00:00
Volker Ruppert
28de72b0ea Added support for setting up the network bootfile in the bxhub utility.
TODO: Implement configurable bootfile in the vnet module.
2020-08-09 17:24:08 +00:00
Volker Ruppert
52d52029dd Fixes in slirp and vnet networking module to make iPXE booting.
- Moved server ID and lease time options to the top of the DHCP reply.
- Increase TFTP buffer size as expected by iPXE.
- TODO: The vnet module still has boot file name hardcoded.
2020-08-08 19:23:35 +00:00
Volker Ruppert
5de465b5b1 Fixed some gcc 9.3 warnings. 2020-08-06 20:21:14 +00:00
Volker Ruppert
bf1d96e7e0 Using the correct variable type fixes Cirrus pattern copy issues introduced with
the segfault fix.
2020-08-03 18:25:10 +00:00
Volker Ruppert
b00873c909 Fixed parameter cleanup after adding "multiple NICs" support. 2020-07-23 21:35:27 +00:00
Volker Ruppert
650d8d919a Enable the new speaker volume control for the lowlevel sound support only. 2020-07-08 21:31:49 +00:00
Volker Ruppert
0d7f37f233 VBE: retrieve gui capabilities only on demand (fixes VBE mode list in RFB gui). 2020-06-28 17:44:55 +00:00
Volker Ruppert
cb57b632b0 Added PC speaker volume control for the lowlevel sound support. 2020-06-21 09:08:05 +00:00
Volker Ruppert
4b27cc1103 Removed member 'extension' from direntry_t structure and increased 'name' size
to 11. Accessing 'extension' data using 'name' index is illegal and at least
gcc version 7.5.0 has produced incorrect code for creating short file name.
2020-06-18 11:18:35 +00:00
Volker Ruppert
af09838514 Fixed another uninitialized variable. 2020-06-17 14:48:27 +00:00
Volker Ruppert
f6825e31de Modified svga_patterncopy() to avoid writing to video memory out of bounds.
This fixes segfault when moving window in guest Win 3.1x with CL-GD 5446 and
suitable drivers for it.
2020-06-16 18:46:37 +00:00
Volker Ruppert
5adcaf2291 Added missing variable initialisation. 2020-06-14 19:30:53 +00:00
Volker Ruppert
401ffecc54 Fixed comparsion (slirp.cc) and MSVC warning (netutil.cc). 2020-06-14 10:16:04 +00:00
Volker Ruppert
4bcc3ba13c Added stubs for IPv6 packets in the slirp and vnet server code and some cleanups. 2020-06-14 08:44:10 +00:00
Volker Ruppert
79156f6b2f Added support for setting up the vnet FTP service with a different IPv4 address.
The 'vnet' networking module now uses 192.168.10.3 and bxhub is setting up the
slirp compatible IP 10.0.2.4 for additional services. Added host name "vnet-ftp"
in the DNS code to translate it to the new IP address.
2020-06-12 06:31:09 +00:00
Volker Ruppert
a4bf5843f0 Some work on the vnet server code.
- FTP: handle the hidden flag on Windows the same way as on other platforms.
- TCP/IP: fixed some gcc 9 warnings (checked with Cygwin gcc 9.3).
- DHCP: changed the way to set up the default client IPv4 address.
2020-06-11 14:26:34 +00:00
Volker Ruppert
3db989b9a8 Fixed gcc 10.1.0 warning "clearing an object of non-trivial type". Now moving
the buffer objects and data members to different structures and use memset()
for data only.
2020-06-11 07:36:31 +00:00
Volker Ruppert
40726e4c7c Fixed gcc 10.1.0 warning (buffer possibly to small). 2020-06-10 07:19:06 +00:00
Volker Ruppert
c036bcb7ab Compilation fix for MSYS2 gcc 10.1.0 (narrowing conversion). 2020-06-09 07:30:01 +00:00
Volker Ruppert
f809d2b08b Improved vnet server DNS support.
- Reverse DNS support implemented.
- Return error status for unsupported format.
2020-06-08 19:55:32 +00:00
Volker Ruppert
b4ce6bca2e Fix for the non-Windows SMB support in Slirp. Updated format of temporary
smb.conf to make it work with latest smbd version.
2020-06-07 19:17:07 +00:00
Volker Ruppert
4313db542d Some more work on the vnet FTP support.
- Added support for the extended passive mode.
- Handle LIST option to show hidden files (non-WIN32 only).
2020-06-06 19:02:46 +00:00
Volker Ruppert
168e303f82 Some work on the vnet FTP support.
- Added STOU command (store file under a name unique to current directory).
- Improved user login message.
2020-06-05 16:10:12 +00:00
Volker Ruppert
08386c771e Some work on the vnet FTP support and documentation.
- Reset FTP session state in case of login failure.
- Improved FTP server status output.
- Added special error messages for 2 unimplemented commands.
- Updated vnet / socket / slirp networking module infos in source and docs.
2020-06-04 16:08:03 +00:00
Volker Ruppert
50ddc67671 Some work on the vnet FTP support: improved file and directory checks. 2020-06-03 13:14:39 +00:00
Volker Ruppert
81026fa96a Some work on the vnet server FTP code.
- Major rewrite of the FTP command handling.
- The LIST command now supports an argument (absolute or relative path).
- Added NLST command (similar to LIST, but file / directory names only).
- The MKD and RMD commands now support absolute paths.
2020-05-31 20:46:33 +00:00
Volker Ruppert
f378ca5418 Added some core functions to the vnet FTP service and some fixes.
- FTP: added support for renaming file, create and remove directory.
- FTP: added FTP server status report and fixed SYST reply.
- bxhub fix: send all pending packets one after the other.
- TCP fix: when connecting, return default MSS option value 1460.
- TCP fix: handle the case when FIN is set in final data packet.
2020-05-30 14:44:53 +00:00
Volker Ruppert
2b79641f3a Added support for deleting files in the vnet FTP support and some cleanups. 2020-05-29 09:02:14 +00:00
Volker Ruppert
436766a7db Rewrite of the vnet FTP service "send data" code. Instead of creating a buffer
for the whole file, now the buffer has maximum TCP window size and the file is
read on demand. The directory list is now written to a temporary file that can
be sent with the new code.
2020-05-28 07:31:32 +00:00
Volker Ruppert
30264616f4 Added initial support for uploading files to the vnet FTP server. This is
permitted for user "bochs" only, since "anonymous" has read-only access.
TODO: delete / rename file, create / remove directory.
2020-05-26 18:53:58 +00:00
Volker Ruppert
d339332e8c Fixes for data transfer abort and cleanup on FTP session quit.
- Skip special TELNET sequence required for transfer abort to make it work.
- On FTP quit, unregister data port and free data buffer if necessary.
- Some other small FTP code cleanups.
2020-05-24 17:28:56 +00:00
Volker Ruppert
5c436d061b Partial rewrite of the TCP/IP and FTP host-to-guest data transfer code. 2020-05-24 08:40:35 +00:00
Volker Ruppert
8e7040dddb Some fixes for the vnet server TCP/IP and FTP support.
- TCP and FTP: some connect/disconnect cleanups and fixes.
- FTP: correctly report active transfer mode (no effect on the emulation yet).
2020-05-23 15:49:33 +00:00
Volker Ruppert
d69c7d14dc Two fixes for the bxhub utility.
- Makefile: added missing dependency.
- netutil.cc: removed duplicate include.
2020-05-23 09:04:35 +00:00
Volker Ruppert
ba5a279d61 Some more work on the TCP/IP and FTP support.
- TCP: If a connection is active, forward reset to the service handler.
- FTP: Added support to retrieve the file size.
- FTP: Handle the "file not found" case in RETR and SIZE code.
- FTP: Fixed the logout process.
2020-05-22 19:40:59 +00:00
Volker Ruppert
d5a4d1df48 Some more work on the TCP/IP and FTP support.
- Added support for browsing directories and download from subdirectories.
- Fixes for empty directories and files.
2020-05-22 07:35:35 +00:00
Volker Ruppert
b2b3de60d4 Some more work on the TCP/IP and FTP support.
- TCP: added new method tcpipv4_send_buffer() that can send multiple packets
  up to window size without waiting for ACK.
- TCP: when receiving ACK, the data transfer continues if necessary.
- FTP: list contents of root directory (tested on Linux and Win 10 host).
- FTP: added support for file download from root directory (RETR).
- TODO #1: browse directory tree (CWD, CDUP).
- TODO #2: upload file (STOR).
- TODO #3: file and directory commands (SIZE, DELE, MKD, RMD).
2020-05-21 16:21:49 +00:00
Volker Ruppert
eabcb9e478 Some work on the vnet server code.
- Compilation fixes for MSVC
- TCP: parse option header (not handled yet)
- TCP: RST flag forces disconnect
- FTP: ABOR command stops data transfer
2020-05-21 11:07:38 +00:00
Volker Ruppert
9ff6fddd82 Some work on the TCP/IP and FTP support.
- Added packet counter and use it for the IP id field.
- Added support for closing TCP connection from the server side.
- Added FTP passive mode and LIST demo for testing it.
- Some other small changes.
2020-05-20 19:38:33 +00:00
Volker Ruppert
548f9456e8 Packet logging in text format now controlled by option "pktlog" in slirp config. 2020-05-19 17:55:15 +00:00
Volker Ruppert
89759dc371 Implemented dynamic packet handling in the vnet server (TCP can send multiple
packets up to window size without waiting for ACK).
Some other minor cleanups and improvements in the TCP and FTP code.
2020-05-19 12:10:52 +00:00
Volker Ruppert
614ecd7455 Some fixes for the vnet module found with TCP / FTP testing code.
Fixed maximum size of an ethernet packet (1460 bytes TCP user data + headers).
Don't activate timer for a new packet if another is still pending.
2020-05-18 19:25:27 +00:00
Volker Ruppert
9c3a99856e Added basic TCP handling and FTP server stub for testing.
- Partly re-implemented host_to_guest methods from legacy eth_vnet.cc.
- Added two dynamic packet buffers for vnet server replies.
- TFTP and FTP servers are only available if root directory is configured.
- Added TCP port handler methods similar to the UDP ones.
- Added basic TCP connection management and 3-way handshake.
- Added FTP server stub for testing TCP (only login/logout for now).
2020-05-12 20:51:26 +00:00
Volker Ruppert
1b0845b48a Slirp: Added support for logging packets in text format (disabled by default). 2020-05-07 15:49:54 +00:00
Volker Ruppert
f9da9f9249 Fixed possible buffer overflow (patch by Randy Sommerfeld). 2020-05-06 11:17:34 +00:00
Volker Ruppert
780517aeca Added TCP stub to vnet server - returning "Connection refused" for now. 2020-05-03 11:38:16 +00:00
Volker Ruppert
9b844fc341 Some changes in the 'vnet' networking module.
- Enable packet logging in text format if file name is specified with the
  "script" parameter.
- Don't start RX timer if vnet server returns 0.
- Added TCP header structure for future extensions.
2020-05-02 21:21:53 +00:00
Volker Ruppert
d30dcfdd3c Added log file support to the 'bxhub' utility. Log output can be sent to file
specified with command line option, otherwise stderr is used.
2020-04-13 19:35:56 +00:00
Volker Ruppert
455c28b3da Fixed compilation error on MSVC (bxhub.exe). 2020-04-12 15:47:11 +00:00
Volker Ruppert
451b60b8a2 Rewrite of the 'vnet' server code used by the vnet networking mode and the bxhub
utility to get rid of code duplication. New class vnet_server_c now contains all
of the network emulation including the DNS code from bxhub.cc.
2020-04-12 09:14:01 +00:00