Mednafen Members Members   Search Search   Help Help   Register Register   Login Login   Home Home
Home » Mednafen » Development » Virtual Boy MPYHW patch
Show: Today's Messages  :: Show Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Virtual Boy MPYHW patch [message #7000] Sun, 07 January 2024 14:56
SupernaviX  [PM]
Hi! I've got a patch for a bug I found while making clang target the Virtual Boy.

The VB's CPU supports an "mpyhw reg1, reg2" instruction to multiply reg2 by the 16-bit value stored in reg1. The official VB development manual says that both reg2 and reg1 must be halfwords (i.e. hold 16-bit values) for correct results, but GuyPerfect has discovered that on real hardware, only reg1 is treated as a halfword, and reg2 can use the full 32 bits.

Mednafen is following the behavior described in the manual (treating reg2 as 16-bit), but the undocumented real behavior is more useful. So here's a patch to make Mednafen work like hardware, so we can take advantage of it.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic:MedGui Reborn v0.124 & MetroMed Beta 11 - A GUI/Frontend for Mednafen WIN OS
Next Topic:Pop'n Music controller support?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ ]

Current Time: Sat May 4 15:55:25 CDT 2024
.:: Contact :: Home ::.

Powered by FUDforum.
Copyright © FUDforum Bulletin Board Software