Mednafen Members Members   Search Search   Help Help   Register Register   Login Login   Home Home
Home » Mednafen » Development » Lynx Cart Bug Patch
Show: Today's Messages  :: Show Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
icon1.gif  Lynx Cart Bug Patch [message #1570] Wed, 02 December 2009 17:45 Go to next message
Wookie  [PM]
I've been working on putting together Lynx dev tutorials and I was testing out Karri's Lynx demo cart building process with the cc65 toolchain. The cart that was produced crashed Mednafen 0.8.C because it was assuming the game data was exactly the size of the memory bank. On my debian Lenny box, memcpy segfaults when trying to copy beyond a memory buffer end.

I fixed the bug by first calculating the min(gamesize, mBankMask0+1) and then used that for the memcpy. The patched version works and runs Karri's demo cart correctly.

I wasn't sure where to send the patch file so I'm attaching it to this post.

edit:

Apply the patch by uncompressing it somewhere, cd'ing into your mednafen root dir and then running the following:

patch -p1 -i <path to the patch>

It should only modify src/lynx/cart.cpp. Rebuild and then try out Karri's demo cart from the cc65 toolchain (also attached).

--Wookie

[Updated on: Wed, 02 December 2009 17:55]

Re: Lynx Cart Bug Patch [message #1605 is a reply to message #1570 ] Mon, 28 December 2009 22:59 Go to previous message
Administrator  [PM]
Thanks, I'll be applying the patch for the next release.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic:joystick ids in the config file
Next Topic:Adjusting internal vsync rate for the emulated systems: where in the sources should I look?
Goto Forum:
  

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

Current Time: Sat May 18 11:53:24 CDT 2024
.:: Contact :: Home ::.

Powered by FUDforum.
Copyright © FUDforum Bulletin Board Software