Author Topic: Odd bug with MD Myth hardware  (Read 5855 times)

0 Members and 1 Guest are viewing this topic.

Offline ChillyWilly

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1753
  • Just a coding machine.
Odd bug with MD Myth hardware
« on: April 01, 2010, 03:03:37 PM »
No, this is not an April Fools day joke, just something interesting I ran into while helping Conle add cheats to the MD menu. You cannot write individual bytes in the MD Myth PSRAM. They are always done as word writes, so if you wrote bytes 0 to 255 with that value, when you read back the PSRAM you see 1,1,3,3,5,5,7,7,9,9,11,11... and so on. You HAVE to write WORDS. You can write bytes as long as they aren't packed, so you have to keep that in mind if you ever work on the Myth for homebrew. The default for gcc is not to pack bytes, so it shouldn't be a problem for individual variables. Where it WOULD be a problem is if you were writing elements of an array that had byte size members (char arrays, for example). That explains why my attempts to use Myth PSRAM for long filename storage failed - strings won't go into PSRAM writing as bytes. I wondered about that, but thought is was an odd bug in the file system.

Offline Conle

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2203
Re: Odd bug with MD Myth hardware
« Reply #1 on: April 01, 2010, 03:43:03 PM »
This bug almost made me to go insane  O0O   ~sm-80.gif~.gif  ~sm-81.gif~.gif
But the good news are that the dx menu also has ips patching support now thanks to a genius implementation by the coding machine(uses the last byte of the previews written block to change its size to even in case it was odd)  >:D