Commit Graph

607 Commits

Author SHA1 Message Date
RageXbox 8919bae311
nv2a: Remove assertion in append_skinning_code 2022-02-10 22:31:22 -07:00
Erik Abair f3c7a3afd1 nv2a: Add --enable-renderdoc build config 2022-02-10 14:41:43 -07:00
Erik Abair 8689e640bd nv2a: Add missing vertex attribute setters 2022-02-10 14:35:53 -07:00
Erik Abair 517e4b3414 nv2a: Implement SET_MATERIAL_ALPHA and diffuse color src
This adds support for the material alpha command and updates the fixed function
shader to respect the diffuse source parameter (which was already piped through
but not utilized).
2022-02-05 15:22:03 -07:00
Matt Borgerson 8d0d21bfd7 nvnet: Split out register defs 2022-02-01 23:34:53 -07:00
Matt Borgerson 2b05f7d50b nvnet: Start using tracing infrastructure for logging 2022-02-01 23:34:53 -07:00
Matt Borgerson d40a1c578d mcpx: Start using tracing infrastructure for logging 2022-02-01 23:34:53 -07:00
Matt Borgerson be23a674f3 nv2a: Start using tracing infrastructure for logging 2022-02-01 23:34:53 -07:00
Erik Abair a13f3f48a2 nv2a: Improve RenderDoc triggering 2022-01-31 20:46:41 -07:00
Erik Abair ef0a262efe nv2a: Fix swizzle_box for volumetric textures 2022-01-31 17:48:17 -07:00
Erik Abair 2d34f5108d nv2a: Support depth in volumetric palettized textures 2022-01-31 17:27:20 -07:00
Erik Abair caf84884c4 nv2a: Fix slots for vertex attribute setters 2022-01-24 18:22:16 -07:00
Erik Abair d17e019684 nv2a: Implement vertex attribute setters 2022-01-24 16:22:52 -07:00
Erik Abair 6b821d2062 nv2a: Implement pvideo color keying 2022-01-22 13:54:40 -07:00
Erik Abair b3f56db428 nv2a: Match HW behavior when dealing with infinite fog coord 2022-01-18 18:13:54 -07:00
Matt Borgerson 3fd15218c7 nv2a: Init puserdac palette on startup 2022-01-12 19:51:14 -07:00
Matt Borgerson 42c44dc241 nv2a: Fix register print debug macro 2022-01-12 19:51:14 -07:00
Matt Borgerson 7bd68b4bfc nv2a: Specify method ranges in words 2022-01-12 19:51:14 -07:00
Matt Borgerson 0b838a6e4c nv2a: Bring back non-inc/inc loops to avoid dead code 2022-01-12 19:51:14 -07:00
Matt Borgerson 27afd42164 nv2a: Add puserdac.palette to vmstate 2022-01-12 01:53:12 -07:00
Matt Borgerson 1b5b14f8ba nv2a: Support local method loops for more methods 2022-01-12 01:13:02 -07:00
Matt Borgerson 909affdefe nv2a: Merge inc and non-inc method defs 2022-01-12 01:13:02 -07:00
Matt Borgerson a8fadd5a66 nv2a: Un-macroify loop wrappers 2022-01-11 22:03:08 -07:00
Matt Borgerson a3f077779f nv2a: Fold unnecessary macros 2022-01-11 22:03:08 -07:00
Matt Borgerson fb019d7c1f nv2a: Fold redundant loop macros 2022-01-11 15:07:48 -07:00
Matt Borgerson 7d101d5193 nv2a: Log exact method addr and name+offset if available 2022-01-11 14:20:00 -07:00
Matt Borgerson 13be29690a nv2a: Fix logging for looped methods 2022-01-11 14:20:00 -07:00
Erik Abair 01c2f0fa74 nv2a: Fix handling of NV097_SET_VERTEX_DATA4S_M 2022-01-09 16:42:38 -07:00
Matt Borgerson 057e7fcfa1 nv2a: Add kelvin method names to LUT 2022-01-09 03:19:56 -07:00
Matt Borgerson e2fc067073 nv2a: Fix debug printf warnings 2022-01-09 03:19:56 -07:00
Matt Borgerson 80fda910b1 nv2a: Batch process report queries 2022-01-09 02:47:58 -07:00
Matt Borgerson d54ce00f02 nv2a: Simplify swizzled<>linear logic 2022-01-08 19:50:20 -07:00
Matt Borgerson 62d04a3636 nv2a: Permit limited swizzled<>linear surface migration 2022-01-08 19:20:37 -07:00
Matt Borgerson 1871699c2e nv2a: Mark surface buffers dirty on DMA update 2022-01-08 19:20:37 -07:00
wutno d0fd0cb3e4 smbus: Add dummy encoders for Focus and Xcalibur 2022-01-08 13:26:17 -07:00
Matt Borgerson eb87feae2c nv2a: Only sync blit source surface if dirty 2022-01-08 02:45:48 -07:00
Matt Borgerson 76b26b13fc nv2a: Make beta value be strictly uint32_t 2022-01-08 02:45:48 -07:00
Matt Borgerson d91e6d304f nv2a: Refactor blit operation logic 2022-01-08 02:45:48 -07:00
Erik Abair 6e2446e91b nv2a: Support XRGB_ZRGB blit surface format 2022-01-08 02:45:48 -07:00
Erik Abair a546f07df7 nv2a: Implement BLEND_AND image blit operation 2022-01-08 02:45:48 -07:00
Erik Abair 0d4e3d29b5 nv2a: Download destination surface for partial SRCCOPY blits 2022-01-08 02:45:48 -07:00
haxar aacae39aa0 xbox_pci: Map PCI device slots 0 & 1 to a corresponding IRQ nibble index 2022-01-07 16:19:30 -07:00
haxar 25b8fa8433 nv2a: Refactor VGA init 2022-01-07 16:19:30 -07:00
Dustin Holden edbe932d8c Add missing error flag on SMBus transactions 2022-01-06 01:32:42 -07:00
wutno 8f529d0d9c nv2a: Set frequency to 233MHz 2021-12-28 17:40:50 -07:00
Erik Abair 41ef1ca5e5
nv2a: Add option to suppress irq and dma_map debug messages 2021-12-28 17:39:36 -07:00
antangelo 57795d81cb
nv2a: Don't mark surface dirty on unchanged offset, pitch 2021-12-28 15:53:47 -07:00
Matt Borgerson 69ceec4446 nv2a: Support gamma correction 2021-11-23 17:49:44 -07:00
Ryzee119 ce6c51a591 xbox: Update LPC PCI revision for 1.0 Xbox 2021-11-19 20:07:41 -07:00
Erik Abair dcad9d62b3
nv2a: Discard unknown front face 2021-11-19 16:40:54 -07:00
Matt Borgerson 50a5368f47 Revert "nv2a/vsh: Use double precision in clip range remap"
This reverts commit 1a15d83c44.
2021-11-19 13:48:04 -07:00
Erik Abair 1a15d83c44
nv2a/vsh: Use double precision in clip range remap 2021-11-18 17:17:59 -07:00
Erik Abair 1c6e75885c
nv2a: Enable 16-bit floating point z-buffer mode 2021-11-18 16:46:50 -07:00
Erik Abair a3e507860e
nv2a: Respect pitch in YUV texture conversion, upload 2021-11-13 17:18:23 -07:00
Matt Borgerson 172e4768c6 xbox: Set default machine flag 2021-10-30 13:38:24 -07:00
Matt Borgerson 8602863f36 util: Add fast-hash.h to simplify xxHash usage 2021-10-25 16:30:38 -07:00
Matt Borgerson a4115cf8b3 util: Move xxHash submodule to util/ 2021-10-25 16:30:38 -07:00
Silent 5ae39a321a
util/oslib-win32: Use UTF-16 filesystem API
* Introduces qemu_fopen, qemu_access wrappers, and modifies qemu_open to
  support converting stored UTF-8 paths to UTF-16 to use Unicode
  filesystem API on Windows platform.
* Migrates several native open, fopen, and access calls to their
  qemu_* counterparts to resolve Unicode path handling issues on
  Windows.
2021-10-24 12:09:12 -07:00
wutno 5a80cfa2d9 xbox: Allow manually setting SMC version 2021-10-14 12:16:53 -07:00
Matt Borgerson 5622af4981 nv2a: Discard unknown blend equation 2021-10-13 16:51:30 -07:00
Matt Borgerson 21718399f2 nv2a: Discard unknown blend factors 2021-10-12 01:52:42 -07:00
Matt Borgerson 47b1487a71 nv2a: Move bump mat into pgraph register file 2021-10-12 01:32:08 -07:00
Matt Borgerson 1a49f6066f nv2a: Discard bump env params for tex 0 2021-10-12 01:32:08 -07:00
Erik Abair db2a6aaf6d nv2a: Skip input decode if MAC and ILU are both NOP. 2021-10-12 00:17:50 -07:00
Matt Borgerson fe4929c146 nv2a: Sync on surface type change 2021-09-05 15:24:31 -07:00
Matt Borgerson c31cbf9f4e nv2a: Writeback dirty surfaces on scale change, VM load 2021-07-26 15:03:52 -07:00
Matt Borgerson 59d3bfe268 nv2a: Add swizzle to surface compat check 2021-07-20 10:37:07 -07:00
Matt Borgerson 5ec33df112 nv2a: Minor refactor 2021-07-20 10:37:07 -07:00
Matt Borgerson 5778854dbd nv2a: Scale point sprites by surface scaling factor 2021-07-20 10:37:07 -07:00
Matt Borgerson 52c670141a nv2a: Skip sync when moving from color<->zeta 2021-07-20 10:37:07 -07:00
Matt Borgerson 4a8cc6f623 nv2a: Use scaling factor helper function 2021-07-20 10:37:07 -07:00
Matt Borgerson 5562a484e1 nv2a: Support integer scaling of surface dimensions 2021-07-20 10:37:07 -07:00
Matt Borgerson 814d7e0a9a nv2a: Add flip option in glo_readpixels 2021-07-20 10:37:07 -07:00
Mike Davis 0b9a2e1a8f nv2a: Support NV062_SET_COLOR_FORMAT_LE_Y32 blitting 2021-07-18 22:58:16 -07:00
Mike Davis 0f9b862e37
nv2a: Support texture format SZ_DEPTH_Y16_FIXED 2021-07-12 12:15:49 -07:00
Mike Davis be3df6ab8e nv2a: Support texture format LC_IMAGE_YB8CR8YA8CB8 2021-07-10 23:29:01 -07:00
Mike Davis ed7cbef976
nv2a: Support texture format COLOR_LU_IMAGE_G8B8 2021-07-10 02:58:18 -07:00
Matt Borgerson 203c76f89c nv2a: Handle point sprites, scaling 2021-07-10 02:42:15 -07:00
Mike Davis f03015e20e
nv2a: Support texture format COLOR_SZ_B8G8R8A8 2021-07-03 13:10:31 -07:00
Matt Borgerson 473179b9f4 nv2a: Minimize clip origin for compatible surfaces 2021-07-02 17:42:25 -07:00
Matt Borgerson aaf8522431 nv2a: Add offset to FF inv. viewport matrix 2021-07-02 14:18:30 -07:00
Matt Borgerson 315ac1ceaa nv2a: Transform surface scissor y-coord by abs. surface height 2021-07-02 14:18:30 -07:00
Matt Borgerson 4716b7b980 nv2a: Transform clear y-coord by abs. surface height 2021-07-02 14:18:30 -07:00
Matt Borgerson e0f83c8be7 nv2a: Check zeta dirty after color update 2021-07-02 14:18:30 -07:00
Matt Borgerson 364588f426 nv2a: Better field render handling 2021-07-02 14:18:30 -07:00
Matt Borgerson f3f40b4c89 nv2a: Check surface expansion pitch and overlap 2021-07-02 14:18:30 -07:00
Matt Borgerson a07b8f1a2a nv2a: Factor surface entry population out 2021-07-02 14:18:30 -07:00
Matt Borgerson fef3a463b6 nv2a: Remove old up/down debug messages 2021-07-02 14:18:30 -07:00
Matt Borgerson e9ed81ac5a nv2a: Factor zeta format decode out to a table 2021-07-02 14:18:30 -07:00
Matt Borgerson be9360bb69 nv2a: Improve clipped surface handling 2021-07-02 14:18:30 -07:00
Matt Borgerson a7f3f8f212 nv2a: Don't orphan display buffer 2021-06-17 04:19:24 -07:00
Matt Borgerson fdd7875051 sdl: Print out SDL_GetError message when subsystem init fails 2021-06-15 22:12:34 -07:00
Matt Borgerson 4b74e85379 nvnet: Drop oversized frames 2021-06-11 22:12:00 -07:00
Matt Borgerson 6f477f02a6 nv2a: Enable exclusive clip 2021-06-02 18:08:06 -07:00
Matt Borgerson ebcc77c6c8 nv2a: Fix window clip coordinate transform 2021-06-02 15:42:13 -07:00
haxar e0f4ea28ca lpc47m157: Fix serial 2021-05-18 17:39:10 -07:00
Josef Šimánek df940c0b3f nv2a: Add NV062_SET_COLOR_FORMAT_LE_X8R8G8B8 definition 2021-05-18 13:34:18 -07:00
Matt Borgerson dbc73bbd82 nv2a: Derive rho, phi, theta from spot direction 2021-05-18 10:18:45 -07:00
Matt Borgerson 74f724715d nv2a: Fixup qstring to mstring 2021-05-18 10:18:45 -07:00
Wilhelm Kovatch e2e3572301 nv2a: implement FFP LIGHT_SPOT 2021-05-18 10:17:19 -07:00
Matt Borgerson 0caeda66b1 xbox-pci: Factor out ram_size global 2021-04-19 23:33:52 -07:00
Matt Borgerson 4a937586da xbox: Update kvmclock_create with new create_always param 2021-04-18 23:41:28 -07:00
Matt Borgerson e1e28ba62e xbox: Replace bios_name global with MachineState->firmware field 2021-04-18 23:41:28 -07:00
Matt Borgerson fe0aa0c191 xbox: Fixup headers 2021-04-18 23:41:28 -07:00
Matt Borgerson ee18e7bf35 nv2a: Add custom mutable string object (QString is now immutable) 2021-04-18 23:41:28 -07:00
Matt Borgerson dc8eab47f6 nv2a: Use new 'q' prefix for atomics 2021-04-18 23:41:28 -07:00
Matt Borgerson b97b053282 nv2a: Use bool type for state change callback running parameter 2021-04-18 23:41:28 -07:00
Matt Borgerson 11a680301a apu: Use new 'q' prefix for atomics 2021-04-18 23:41:28 -07:00
Matt Borgerson db5a8c7755 apu: Use bool type for state change callback running parameter 2021-04-18 23:41:28 -07:00
Matt Borgerson 6213a2c069 xbox-sio: Include qdev-properties-system.h 2021-04-18 23:41:28 -07:00
Matt Borgerson 66ab3ccb1f xbox-acpi: Set new apci_only param in acpi_pm1_cnt_init 2021-04-18 23:41:28 -07:00
Matt Borgerson 609aee0bbe build: Convert xemu Makefiles to meson 2021-04-18 23:41:28 -07:00
Mike 72b511c091 xbox: Fix for MCPX ROM overlay when not specified 2021-03-23 17:13:19 -07:00
Lucas Eriksson 8b29fa4dd7 video: Default to HDTV avpack 2021-03-18 14:30:47 -07:00
Matt Borgerson 0214f88f91 nv2a: Move vertex decompression to shader 2021-03-16 16:00:42 -07:00
Matt Borgerson e06d1c1343 ui: Bump to GL 4.0 2021-03-16 16:00:42 -07:00
Matt Borgerson 09e2357d02 nv2a: Cache inline elements in LRU 2021-03-16 16:00:42 -07:00
Matt Borgerson 559f105a88 nv2a: Bump up LRU bins 2021-03-16 16:00:42 -07:00
Mike ceee8d67b9 nv2a: Verify surface format X1R5G5B5_Z1R5G5B5 2021-03-13 16:14:31 -07:00
Matt Borgerson 1c6f85cdd9 nv2a: Round inline array attr offsets to natural boundary 2021-03-12 05:18:10 -07:00
Matt Borgerson 8d5961ab8f nv2a: Avoid shader lookups+binds 2021-03-12 04:45:53 -07:00
Matt Borgerson 2dbf966a50 nv2a: Include attribute data address in LRU key 2021-03-11 04:51:36 -07:00
Matt Borgerson fcb3246d4f nv2a: Connect draw arrays primitives originally within BEGIN/END 2021-03-11 03:07:52 -07:00
Matt Borgerson 2483bc59aa Revert "nv2a: Don't attempt to connect primitives in arrays"
This reverts commit 33f8d3c88c.
2021-03-11 03:07:52 -07:00
Matt Borgerson 5756a8892c nv2a: Squash repeated draw arrays 2021-03-11 02:06:35 -07:00
Matt Borgerson 33f8d3c88c nv2a: Don't attempt to connect primitives in arrays 2021-03-11 02:06:35 -07:00
Matt Borgerson 48ccf72e55 nv2a: Consider element range start in buffer uploads 2021-03-11 01:25:45 -07:00
Matt Borgerson 9ab3dcbd6c nv2a: Update VSH constants only if different 2021-03-11 01:10:36 -07:00
Matt Borgerson d62b3f4467 mcpx/apu: Leave voice active at EOL if persist set 2021-03-07 23:54:27 -07:00
Matt Borgerson 851407e07c nv2a/vsh: Output muxed op first to avoid temp clobber 2021-03-06 19:06:47 -07:00
Matt Borgerson 516f2917aa xbox: Add comment to clarify boot ROM details 2021-03-06 17:10:40 -07:00
Mike 5a353bf500 xbox: Support MCPX ROM overlay disable 2021-03-06 17:10:40 -07:00
Matt Borgerson 105f86d973 nv2a: Factor Kelvin methods into functions 2021-03-06 01:45:40 -07:00
Matt Borgerson 9d545d17e7 nv2a: Relax stall conditions on pusher 2021-03-04 20:45:58 -07:00
Camden Smallwood 10863d1c0d nv2a: Use GL_ELEMENT_ARRAY_BUFFER when calling glDrawElements 2021-03-04 17:53:08 -07:00
Matt Borgerson 7284a27d95 input: Update at device poll if not updated recently 2021-03-04 13:52:04 -07:00
Matt Borgerson fc73893f3c nv2a: Fix clip range scaling precision loss 2021-03-03 18:10:49 -07:00
wutno 76272d306b
xbox: Temporarily revert LPC PCI device revision change 2021-03-03 15:36:21 -07:00
wutno f36a0d629c
xbox: Update PCI device header revisions to match Xbox 1.0 retail 2021-03-03 13:43:42 -07:00
Matt Borgerson 6e564854fc xemu: Update copyright 2021-03-03 03:48:11 -07:00
Matt Borgerson 7dae26380e nv2a: Stall pusher for pending sync events 2021-03-03 03:41:20 -07:00
Matt Borgerson 48c1720da8 nv2a: Support PVIDEO overlays again 2021-03-01 18:40:30 -07:00
Matt Borgerson f2bfa672e6 nv2a: Specify GL_STREAM/STATIC_DRAW buffer usages 2021-02-27 15:17:17 -07:00
Matt Borgerson 0d9ff0872a nv2a: Swap glDrawRangeElements for glDrawElements 2021-02-27 15:17:17 -07:00
Matt Borgerson f89dc5c446 nv2a: Add surface download complete event 2021-02-18 21:17:30 -07:00
Matt Borgerson 7b84142c4e nv2a: Add fb sync complete event 2021-02-18 02:48:25 -07:00
Matt Borgerson 8326870f77 nv2a: Eliminate re-malloc of inline buffer 2021-02-12 18:55:06 -07:00
Matt Borgerson b536ac07d6 nv2a: Fix surface debug print field 2021-02-11 16:45:36 -07:00
Matt Borgerson 7926347c8b nv2a: Fix buffer size in surface flip 2021-02-11 16:33:47 -07:00
Matt Borgerson afed1a4835 nv2a: Clear entire PSH struct before hashing 2021-02-11 16:10:34 -07:00
Matt Borgerson a88b4cf9f5 nv2a: Minor cleanup 2021-02-11 16:10:34 -07:00
Matt Borgerson 3248c8ebbf nv2a: Fast path PGRAPH method processing 2021-02-11 15:23:47 -07:00
Matt Borgerson 8e29469ddb nv2a: Cache converted vertex data 2021-02-11 14:54:39 -07:00
Matt Borgerson 9b42f4aaa3 nv2a: Add binning to LRU 2021-02-11 14:30:52 -07:00
Matt Borgerson d2990d0e47 nv2a: Use XXH3_64bits as fast hash 2021-02-11 14:09:52 -07:00
Matt Borgerson fec0ad6f4c nv2a: Add xxHash submodule 2021-02-11 14:09:52 -07:00
Matt Borgerson 30fe6cb3c4 nv2a: Drop xxHash inline sources 2021-02-11 14:09:52 -07:00
Matt Borgerson 7a08e93085 nv2a: Add simple frame metrics 2021-02-11 13:50:18 -07:00
Matt Borgerson 64141f90e1 input: Use QTAILQ for available controllers list 2021-02-10 23:58:59 -07:00
Mike d9046372c7 eeprom: Set default time zone and language during generation 2021-01-27 17:14:27 -07:00
wutno 9ca79f75d8 nv2a: Change stepping to match retail 1.0 Xbox 2021-01-23 16:52:57 -07:00
wutno 270310e603
smc: Fix version string modulus 2021-01-04 01:58:41 -07:00
Matt Borgerson 66f2e9decd mcpx: Fixup compiler warnings in DSP code 2021-01-03 16:14:47 -07:00
Matt Borgerson 416e12c3b3 mcpx: Enable APU pipeline 2021-01-03 16:14:47 -07:00
Matt Borgerson 9004009bb3 nvnet: Always return value in nvnet_get_reg 2020-12-31 15:47:32 -07:00
Matt Borgerson 996f3d4dc3 nv2a: Grab lock before marking pending download 2020-12-30 03:52:46 -07:00
Matt Borgerson e431cbff82 nv2a: Fix compiler nits 2020-12-30 03:51:47 -07:00
Matt Borgerson af35a8b728 nv2a: Approximate CLAMP_OGL with CLAMP_TO_EDGE 2020-12-07 19:25:48 -07:00
Matt Borgerson 2933d8d171 nv2a: Set VGA color mode after reset 2020-12-02 23:03:51 -07:00
Matt Borgerson 0bec22318a nv2a: Add Gaussian convolution filter for AA 2020-12-02 16:49:58 -07:00
Matt Borgerson a34cab69dd nv2a: Support line and poly anti-aliasing 2020-12-01 22:36:09 -07:00
Matt Borgerson 59980ba1c7 nv2a: Refactor BUMPENVMAP[_LUM] 2020-11-14 16:30:59 -07:00
Matt Borgerson 183ed86aa6 nv2a: Fix color swizzle for SZ_G8B8 and SZ_R8B8 2020-11-14 16:30:59 -07:00
Wilhelm Kovatch ff3deacae6 nv2a: Fix BUMPENVMAP[_LUM] texture modes 2020-11-14 16:27:12 -07:00
Mike bdd8375ba2 xbox: Make flash ROM memory regions writeable
In lieu of proper writeback cache emulation, mark the flash ROM memory
region(s) as writeable. This is necessary to enable later Xbox kernel
revisions which write to a single address within this region during very
early startup code and expect the written value to persist when read
back in the next instruction. See comment in patch for more details.
2020-11-12 00:05:59 -07:00
Mike e0841b9dd4 vl: Generate factory Xbox EEPROM if not provided 2020-11-06 14:54:53 -07:00
Wilhelm Kovatch 5aa0cec31b nv2a: Support 3D texture decompression in software 2020-11-01 17:55:14 -07:00
Mike 7c8a7d1d16 smbus: Add generic storage device 2020-11-01 15:52:08 -07:00
Matt Borgerson 5cc4568dfe nv2a: Force surface flush for mipmapped textures 2020-10-28 22:03:56 -07:00
Matt Borgerson 0c2368f37d nv2a: Fix broken dot texture modes 2020-10-28 22:03:56 -07:00
Matt Borgerson 3c6596975d nv2a: Implement dot texture modes and dotmapping 2020-10-28 15:59:20 -07:00
Matt Borgerson 9060302670 nv2a: Add GL error guard for glCompressedTexImage3D
This only works with DXT1/S3TC if the implementation has the
NV_texture_compression_vtc extension, otherwise GL_INVALID_ENUM will be
raised. Bail out in this case, until a software fallback is implemented.
2020-10-28 04:40:11 -07:00
Wilhelm Kovatch b9df397493 nv2a: Fix compressed 3D textures 2020-10-26 21:43:12 -07:00
Wilhelm Kovatch 518c9f38cd nv2a: Add support for compressed 3D textures 2020-10-26 19:49:47 -07:00
Matt Borgerson 6f777e73e6 nv2a: Add B8, G8B8 surface format placeholders 2020-10-26 00:20:48 -07:00
Matt Borgerson 0433c5e6bc nv2a: Simulate PCRTC_RASTER register 2020-10-25 19:52:57 -07:00
Matt Borgerson 23096561a3 nv2a: Check for same zeta/color surface offset 2020-10-25 03:39:58 -07:00
Matt Borgerson 4cd7c98025 nv2a: Unbind surfaces when flushing 2020-10-23 14:33:45 -07:00
Dalai 6936945afa nv2a: Support texture format COLOR_LU_IMAGE_DEPTH_Y16_FLOAT 2020-10-23 13:38:57 -07:00
Matt Borgerson d6e52a02c4 nv2a: Lazily synchronize surface data to/from RAM 2020-10-22 21:29:53 -07:00
Matt Borgerson 6a2f6b3637 nv2a: Download surface before blit 2020-10-18 01:37:19 -07:00
Matt Borgerson 79989a0e3f nv2a: Always use texture cache 2020-10-18 01:16:32 -07:00
Matt Borgerson a3fc742bbe nv2a: Remove nv2a_ prefix on files in nv2a dir 2020-10-18 00:55:08 -07:00
Matt Borgerson c69e58ee0f nv2a: Make files individually compilable 2020-10-18 00:55:08 -07:00
Matt Borgerson fcd3764cce nv2a: Handle color material ambient/emissive 2020-09-06 20:42:21 -07:00
Matt Borgerson bb0fdef251 nv2a: Handle alignment padding between cubemap faces 2020-09-05 16:21:21 -07:00
Matt Borgerson 6152b3688b lpc47m157: Fix object_initialize_child parameters
See "qom: Less verbose object_initialize_child()" for more info.
2020-08-26 10:28:53 -07:00
Matt Borgerson 811feab102 lpc47m157: Fix parameter order for object_property_set_bool
See "qom: Put name parameter before value / visitor parameter" for more
info.
2020-08-26 10:28:53 -07:00
Matt Borgerson d67628c5bd xbox: Replace qdev_create with qdev_new
See "qdev: New qdev_new(), qdev_realize(), etc." for more info.
2020-08-26 10:28:53 -07:00
Matt Borgerson 49b1750bac xbox,chihiro: Fixup object property errp and parameter ordering
See the following commits for more info:
- qom: Drop parameter @errp of object_property_add() & friends
- qom: Put name parameter before value / visitor parameter
2020-08-26 10:28:49 -07:00
Matt Borgerson 4c0ea64b26 xbox: Convert pci_create/qdev_init_nofail to pci_new/pci_realize_and_unref
See "pci: New pci_new(), pci_realize_and_unref() etc." for more info.
2020-08-26 10:28:08 -07:00
Matt Borgerson da51f13eaf xbox: Fixup pcspk_init with new prototype
See the following commits for more info:
- audio: rework pcspk_init()
- isa: Convert uses of isa_create() with Coccinelle
- audio: create pcspk device early
2020-08-26 10:28:02 -07:00
Matt Borgerson e7b4920731 xbox: Cleanup flash devices initialized via pc_machine_initfn 2020-08-25 15:00:07 -07:00
Matt Borgerson dc0bfda251 xid, chihiro: Remove errp from unrealize function
See "qdev: Unrealize must not fail" for more info.
2020-08-25 15:00:02 -07:00
Voxel9 c90335801c nv2a: Fix FFP texgen assertions
Should compare against channel index instead of texture stage index
2020-06-29 07:49:51 -07:00
Voxel9 3bbea5269e nv2a: Remove TEXGEN_SPHERE_MAP assertion 2020-06-29 07:49:51 -07:00
Matt Borgerson 7f4b9d5480 nvnet: Fix ringbuffer index reset, multi-desc frames, IRQ status bits 2020-06-19 05:43:14 -07:00
Matt Borgerson 60d3dc8ae1 nv2a: Add VMStateDescription 2020-06-19 05:43:14 -07:00
Matt Borgerson c9cf9a9972 nv2a: Add state flushing to PGRAPH 2020-06-19 05:43:14 -07:00
Matt Borgerson 0673010e54 nvnet: Add VMStateDescription 2020-06-19 05:43:14 -07:00
Matt Borgerson af38316719 nvnet: Set DEVICE_CATEGORY_NETWORK bit on device class 2020-06-19 05:43:14 -07:00
Matt Borgerson 1e3e81b02c nvnet: Fix and check register addrs 2020-06-19 05:43:14 -07:00
Matt Borgerson 6e4f91fabd nvnet: Use parent_obj per QEMU conventions 2020-06-19 05:43:14 -07:00
Matt Borgerson 7ecabc52a9 xid: Add VMStateDescription stub 2020-06-19 05:43:14 -07:00
Matt Borgerson f68d358b0a mcpx-apu: Add VMStateDescription 2020-06-19 05:43:14 -07:00
Matt Borgerson 97b932f08b dsp: Split DSPState structure off into new file 2020-06-19 05:43:14 -07:00
Matt Borgerson 0932e05d60 mcpx-aci: Add VMStateDescription stub 2020-06-19 05:43:14 -07:00
Matt Borgerson 92e07437fd xbox-apci: Add VMStateDescription 2020-06-19 05:43:14 -07:00
Matt Borgerson b9b0f38bbb xbox-pci: Add SMBus/LPC/PCI VMStateDescription 2020-06-19 05:43:14 -07:00
Matt Borgerson f898b5e875 nv2a: Rename PCIDevice dev to parent_obj per QEMU convention 2020-06-19 05:43:14 -07:00
Matt Borgerson f2869790d9 nv2a: Check for PGRAPH FIFO access before context switch 2020-06-17 01:14:43 -07:00
Matt Borgerson ec4e798426 nv2a: Merge pfifo pusher/puller threads 2020-06-12 00:06:06 -07:00
Matt Borgerson c9df1d1047 nv2a: Replace some non-critical assertions with debug macros
In the event these features are utilized, execution may still continue,
albeit with the likely possibility graphical problems of varying degree.
This patch replaces hard assertions with debug print statements when
configured to do so.
2020-06-10 19:04:22 -07:00
Matt Borgerson 382d6e383d smc: Add eject, power button, and basic drive tray status 2020-06-03 04:51:09 -07:00
Matt Borgerson ab5add9a2f xbox: Add ACPI GPE0 block and support EXTSMI# 2020-06-03 04:51:09 -07:00
Matt Borgerson f93c7b4ea3 nv2a: Fix device reset 2020-05-31 14:26:15 -07:00
Matt Borgerson 7e67f18595 ui: Cleanup debug messages 2020-05-22 14:57:58 -07:00
Matt Borgerson 1c8c1babf9 xbox: Do not crash if BIOS fails to load 2020-05-04 07:23:30 -07:00
Matt Borgerson c2b74a08d3 ui: Move QEMU main loop to a thread 2020-05-04 07:22:56 -07:00
Matt Borgerson 0245d3bee9 nv2a: Update Makefile offscreen GL sources 2020-05-04 07:15:29 -07:00
Matt Borgerson 31c526d10a xid: Use xemu input interface 2020-05-04 07:15:25 -07:00
Matt Borgerson 2d364b5bd1 nv2a: Add SDL-based offscreen GL context interface 2020-05-04 07:13:16 -07:00
Matt Borgerson 2199dbc4e9 nv2a: Remove platform-specific GL context management 2020-05-04 07:10:26 -07:00
Matt Borgerson 2fe8618d24 xbox: Fix missing includes 2020-05-01 03:48:35 -07:00
Matt Borgerson 6e5b208e41 lpc47m157: Align with new QOMified interface
Ideally this would be further abstracted to use existing SuperIO
(TYPE_ISA_SUPERIO) or at least serial-isa, but those both require core
changes. Continue with embedding SerialState for now and update to
support new SerialState device model change.

Associated commits:
- 7781b88ee4
- c9808d6028
- 4f67d30b5e
2020-05-01 03:40:21 -07:00
Matt Borgerson 402fd6bf2a nvnet: Make NetCanReceive() return a boolean
Applying change b8c4b67e3e to nvnet.
2020-05-01 02:52:01 -07:00
Matt Borgerson 4e0ada2b14 xbox: Get rid of piix3_init_functions
Applying the following changes to the Xbox machine:
- df45d38f73
- 987aa99e3f
2020-05-01 02:51:57 -07:00
Matt Borgerson bf51b0a9c0 xbox: Set properties with device_class_set_props
Applying change 4f67d30b5e to Xbox
hardware.
2020-05-01 02:51:54 -07:00
Matt Borgerson 2b667343db hw/xbox: Update xbox machine to align with new pc/x86 machine 2020-02-18 22:14:32 -07:00
Matt Borgerson 8d50346ce6 hw/xbox: Update includes that have changed upstream 2020-02-17 23:49:33 -07:00
Luke Usher 0ced417e73 dsp: Use endianness handling functions when accessing memory 2020-01-03 02:28:14 +01:00
Stanislav Motylkov c230d77bc2 nv2a: Add some missing RAMDAC registers
Cromwell sets these registers on video initialization and
guest OS should be able to read them in order to obtain
current screen resolution set up by firmware.
2019-10-18 21:30:16 +01:00
Stanislav Motylkov c4fca3843f lpc: Fix typo in CONFIG_DEVICE_INTERRUPT constant 2019-10-04 23:36:10 +02:00
Jannik Vogel 2dc570561e nv2a: Fix VGA get_bpp for X1R5G5B5 2019-10-01 12:48:45 -07:00
Jannik Vogel f9b9a9bad8 nv2a: Add support for PGRAPH RDI select 0xCC 2019-09-16 12:15:25 -07:00
Jannik Vogel e42fb24752 nv2a: Add support for PGRAPH RDI select 0x17 2019-09-16 12:15:25 -07:00
Jannik Vogel 973f8db16a nv2a: Support PGRAPH RDI 2019-09-16 12:15:25 -07:00
Jannik Vogel 5ccd95ec4b nv2a: Use `pg` shortname in PGRAPH MMIO handler 2019-09-16 12:15:25 -07:00
Stanislav Motylkov 5e8af994c0 smc: Make attached avpack configurable
Also improved constant definitions based on https://xboxdevwiki.net/AV_Cables

Co-authored-by: Matt Borgerson <contact@mborgerson.com>
2019-09-09 12:46:20 -07:00
Stas'M dd1248a563 nv2a: Set PCI class id and subsystem id to match hardware
This patch sets the class id, subsystem id, and subsystem vendor id
in the PCI device header to match what the NV2A hardware advertises.

This resolves an issue with PCI device enumeration failing to detect and load
the driver for the NV2A device in some operating systems, namely ReactOS
version 0.2.5-xbox (custom build), which depend on these fields being
programmed correctly.
2019-08-28 13:55:21 -07:00
Matt Borgerson 4cf920d594 apu: Disable buffer sampling for now 2019-07-12 18:42:03 -07:00
Matt Borgerson 6c11490a35 apu: Add license for ADPCM decoder files 2019-07-12 18:42:03 -07:00
Matt Borgerson dd20a673ed apu: Fix unused var warnings used only in debug prints 2019-07-12 18:42:03 -07:00
Matt Borgerson ededef3b38 apu: Use MCPX_DPRINTF instead of printf 2019-07-12 18:42:03 -07:00
Matt Borgerson 3ae172c209 apu: Fix indentation for step_envelope 2019-07-12 18:42:03 -07:00
Matt Borgerson e90304a223 apu: Buffer playback cleanup and build fixes 2019-07-12 18:42:03 -07:00
Matt Borgerson 4073c3200e apu: Import JayFoxRox's basic buffer sampling code
This patch adds the code necessary to perform basic buffer sampling for
HW voices. Includes new register definitions, support for a few new
methods, envelope stepping, ADPCM decoding, and the individual voice
buffer sampling to be added to the VP output mixbufs. This code does not
add system audio playback nor streaming support.

Some portions are disabled as they will need to be fixed up for
compilation in this new tree.

This code originates from Jannik Vogel's 2017 audio branch. Copied into
the current, recently LGPL-licensed version of this file with
permission.

https://github.com/JayFoxRox/xqemu-espes/commits/audio
2019-07-12 18:42:03 -07:00
Lucas d1e77ec0c4 xid: Swap SDL binding for black and white buttons 2019-07-05 15:14:08 -07:00
Matt Borgerson 8d17b4d772 smbus: Fixup potential buffer oob on ADM1032 2019-07-04 12:11:28 -07:00
Matt Borgerson bc049f43e1 smbus: Fixup smbus_read/write_block calls 2019-07-04 00:04:00 -07:00
Matt Borgerson 68bfbf65a3 smbus: Cleanup SMC device and track cmd 2019-07-04 00:04:00 -07:00
Matt Borgerson 1f2ae93e5c smbus: Cleanup CX25871 device and track cmd 2019-07-04 00:04:00 -07:00
Matt Borgerson edf04b1364 smbus: Cleanup ADM1032 device and track cmd 2019-07-04 00:04:00 -07:00
Matt Borgerson ab5027a5ea smbus: Fixup headers 2019-07-04 00:04:00 -07:00
Matt Borgerson 818f31a04f chihiro: Fixup headers 2019-07-04 00:04:00 -07:00
Matt Borgerson fc559b1aed lpc: Update qemu_chr_new call arguments 2019-07-04 00:04:00 -07:00
Matt Borgerson 28dd7de81d xbox_pci: Replace deprecated init func with realize 2019-07-04 00:04:00 -07:00
Matt Borgerson 00c2a0c5b2 xbox: Fixup headers 2019-07-04 00:04:00 -07:00
Matt Borgerson 67359423a6 xbox: Rename pit to pit_enabled per pcms change 2019-07-03 23:42:53 -07:00
Luke Usher e90b18616a nvnet: Guest MAC address should not be initialized by hardware
This is set by the running application, so the default value remains
unused.
2019-03-26 03:16:26 -07:00
Jannik Vogel 1026f0e42f vsh: Minor improvements to individually weighted skinning 2019-02-24 17:05:50 -07:00
Jannik Vogel c331854c55 vsh: Support generated weights in skinning 2019-02-24 17:05:50 -07:00
Jannik Vogel f3b7fefde4 vsh: Fix skinning mode order 2019-02-24 17:05:50 -07:00
Jannik Vogel 0f39a2cc76 nv2a: Slot 0 of SET_VERTEX_DATA specifies a vertex 2019-02-22 17:02:44 -07:00
Jannik Vogel c5962e0920 apu: Add mixbin beep tone for debugging 2019-02-18 11:49:31 -07:00
Jannik Vogel f2901a24d4 apu: Add VP framework 2019-02-18 11:49:31 -07:00
Jannik Vogel 46dccb0182 apu: Use GP_DSP_MIXBUF_BASE to refer to MIXBUF base 2019-02-18 11:49:31 -07:00
Darren 7fca76a2d9 xid-sdl: Enable left/right force feedback with SDL2 2019-02-18 11:44:47 -07:00
Jannik Vogel 851e478319 psh: Separate input component usage selection for RGB and ALPHA portion 2019-02-18 11:43:20 -07:00
Jannik Vogel f9ba5b9c8c psh: Final combiner G input is a scalar 2019-02-18 11:43:20 -07:00
Jannik Vogel 52f897aa17 psh: Use vec4 for all registers 2019-02-18 11:43:20 -07:00
Jannik Vogel d225ff7a98 psh: Use float for alpha, vec3 for rgb 2019-02-18 11:43:20 -07:00
Jannik Vogel f21c2d7ddb psh: Use output clamping from NV_register_combiners GL extension 2019-02-16 12:43:08 -07:00
Jannik Vogel c1494de8d3 psh: Use input mapping from NV_register_combiners GL extension 2019-02-16 12:42:49 -07:00
DaveX 65cd1cf9ae chihiro: Use hyphens in machine object prop names 2019-02-15 15:12:48 -07:00
Stefan Schmidt 960698a24e nv2a: Set content of disabled register combiner stages to zero 2019-02-06 23:32:22 -07:00
Jannik Vogel f3d7e72a5c nv2a: Fix A8Y8 texture formats 2019-02-06 23:28:43 -07:00
Matt Borgerson 7a59bf14d3 nv2a: Use linear addressing for LU_IMAGE_A4R4G4B4 2019-02-06 20:05:12 +01:00
Jannik Vogel e7bd7bf228 dsp: Support FIFO output in DMA 2019-01-28 12:01:58 -07:00
Jannik Vogel 2e660193a0 apu: Add support for DSP FIFOs 2019-01-28 12:01:58 -07:00
Jannik Vogel 423b6f57bc apu: Fix off-by-one in scatter gather page entry check 2019-01-28 12:01:58 -07:00
Lucas Eriksson 929954e713 smbus: Fix wordwrite bug 2019-01-27 13:24:50 +01:00
CakeLancelot ebb1052278 xid: Fix trigger range in xid-sdl 2019-01-27 12:39:34 +01:00
Matt Borgerson 47452495c0 nv2a: Fix NV097_SET_VERTEX_DATA2S scaling
Vertex attribute values provided via NV097_SET_VERTEX_DATA2S are
apparently two 16-bit signed integers, packed into 32 bits, which are
then to be directly mapped to floating point values in the range
[-32768.0, 32767.0].

Halo:CE uses this format to provide texture (u,v) coordinates for
render-to-texture techniques, including weapon scope, dynamic shadows,
and radar beacon--all of which are now working as expected with this
patch.
2019-01-22 16:12:11 -07:00
Matt Borgerson fc995f154c xid: Port fixes made to xid.c to xid-sdl.c
The recent fixes to xid.c (32bf810) didn't make it to xid-sdl.c. This
patch ports over those changes. In the future, the parts common to both
xid.c and xid-sdl.c should be factored out so this doesn't happen again.

Original work done by Jannik Vogel (aka JayFoxRox) on Jul 5th, 2018.
2019-01-15 14:44:54 -07:00
Jannik Vogel 01be8ef6b8 dsp: Improve DMA debug message 2018-12-29 12:07:38 +01:00
Jannik Vogel 4513ab50da dsp: Decode all DMA control bits 2018-12-29 12:07:38 +01:00
Jannik Vogel e3a93c48fb apu: Access system memory directly 2018-12-27 15:00:35 -07:00
Jannik Vogel 9cac29fe07 apu: Activate voice on VOICE_ON, regardless of list position 2018-12-26 15:44:15 -07:00
Jannik Vogel 7c43feded0 apu: Fix offset of scratch space PRD control word 2018-12-26 15:44:15 -07:00