Files
parallel-n64/Graphics/RDP/gDP_funcs.cpp
T
Matt Pharoah 0d83ebb78c Rebase: fast-forward 163 commits onto current master
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Brings the 'rebase' branch (52fc98dde, 163 commits, 11 authors) onto
current master (08ec54708) as a single squashed change. Authorship of
the underlying commits — predominantly Matt Pharoah (105), aglab2 (44),
plus smaller contributions from Denis Kopyrin, mudlord, devwizard,
Mr-Wiseguy, zoltanvb, twinaphex, libretroadmin, LibretroAdmin, and
Eric Warmenhoven — is recorded in the upstream 'rebase' branch
(libretro/parallel-n64).

Resolves conflicts in 6 files:

 .gitlab-ci.yml
   Kept linux-aarch64 + webOS jobs from master alongside osx-arm64,
   macOS HAVE_THR_AL, and iOS-disabled stanza from rebase HEAD.

 libretro/libretro.c
   Kept rebase's retro_core_options_v2 setup_variables; forward-ported
   astick_snap_active / astick_snap_max_angle /
   astick_snap_min_displacement_percent globals and their
   update_variables reads from PR #794, aligned to the registration key
   parallel-n64-astick-snap-max-angle (fixes the latent typo in #794
   where the read key omitted '-max-' and the option had no effect).

 libretro/libretro_core_options.h
   Added entries for astick-snap-angle-active, astick-snap-max-angle,
   and astick-snap-min-displacement-percent so the snap options surface
   under the v2 options system.

 mupen64plus-core/src/pi/pi_controller.c
   Kept both extern blocks: g_rom_size (master, security fix) and
   AllowUnalignedDMA / AllowLargeRoms / SdCardEmulationEnabled (rebase).

 mupen64plus-core/src/plugin/emulate_game_controller_via_libretro.c
   Added M_PI guard, snap externs, and the snap-angle math from PR #794
   into scale_joystick (refactored helper on rebase) rather than
   inputGetKeys_reuse.

 mupen64plus-core/src/rsp/rsp_core.c
   In read_rsp_regs2/write_rsp_regs2, combined SP_REGS2_COUNT bounds
   check (master) with SP_PC_REG masking (rebase).

 mupen64plus-rsp-paraLLEl/rsp_disasm.hpp
   Kept <stdint.h> rather than <cstdint> for consistency with the other
   headers in the paraLLEl-RSP module.

Also fixes a pre-existing inconsistency in the rebase branch that
strict GCC rejects under -Wincompatible-pointer-types:

 mupen64plus-core/src/si/game_controller.h
   Changed the get_gcn_input struct field's analogMode parameter from
   uint8_t to int, matching init_game_controller's parameter type,
   game_controller_gcn_get_input's signature, and the egcvip_get_gcn_input
   implementation (all three already used int).
2026-05-16 18:10:59 +02:00

81 lines
2.3 KiB
C++

#include "gDP_funcs.h"
#include "../plugin.h"
/* Sets a scissoring box at the screen coordinates
*
* mode - Video mode:
* G_SC_NON_INTERLACE - Draw all scan lines
* G_SC_ODD_INTERLACE - Draw only odd-numbered scan lines
* G_SC_EVEN_INTERLACE - Draw only even-numbered scan lines
*
* ulx - Screen's left edge coordinates (0.0~1023.75)
* uly - Screen's top edge coordinates (0.0~1023.75)
* lrx - Screen's right edge coordinates (0.0~1023.75)
* lry - Screen's bottom edge coordinates (0.0~1023.75)
* */
void GDPSetScissor(uint32_t mode,
float ulx, float uly, float lrx, float lry )
{
switch (gfx_plugin)
{
case GFX_GLIDE64:
#ifdef HAVE_GLIDE64
glide64gDPSetScissor(mode, ulx, uly, lrx, lry);
#endif
break;
case GFX_GLN64:
#ifdef HAVE_GLN64
gln64gDPSetScissor(mode, ulx, uly, lrx, lry);
#endif
break;
case GFX_RICE:
#ifdef HAVE_RICE
/* TODO/FIXME */
#endif
break;
case GFX_ANGRYLION:
case GFX_PARALLEL:
/* Stub, no HLE */
break;
}
}
/*
* Loads a texture image in a continguous block from DRAM to
* on-chip texture memory (TMEM).
*
* The texture image is loaded into memory in a single transfer.
*
* tile - Tile descriptor index 93-bit precision, 0~7).
* ul_s - texture tile's upper-left s coordinate (10.2, 0.0~1023.75)
* ul_t - texture tile's upper-left t coordinate (10.2, 0.0~1023.75)
* lr_s - texture tile's lower-right s coordinate (10.2, 0.0~1023.75)
* dxt - amount of change in value of t per scan line (12-bit precision, 0~4095)
*/
void GDPLoadBlock(uint32_t tile, uint32_t ul_s, uint32_t ul_t,
uint32_t lr_s, uint32_t dxt )
{
switch (gfx_plugin)
{
case GFX_GLIDE64:
#ifdef HAVE_GLIDE64
glide64gDPLoadBlock(tile, ul_s, ul_t, lr_s, dxt);
#endif
break;
case GFX_GLN64:
#ifdef HAVE_GLN64
gln64gDPLoadBlock(tile, ul_s, ul_t, lr_s, dxt);
#endif
break;
case GFX_RICE:
#ifdef HAVE_RICE
/* TODO/FIXME */
#endif
break;
case GFX_ANGRYLION:
case GFX_PARALLEL:
/* Stub, no HLE */
break;
}
}