Mednafen Members Members   Search Search   Help Help   Register Register   Login Login   Home Home
Home » Mednafen » Development » Contribution/patches for mednafen
Show: Today's Messages  :: Show Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Contribution/patches for mednafen [message #2330] Sun, 25 December 2011 10:42 Go to next message
sage  [PM]
How can I contribute to mednafen. I would like to add a few patches to the handy/lynx code.
Re: Contribution/patches for mednafen [message #2332 is a reply to message #2330 ] Mon, 26 December 2011 08:10 Go to previous messageGo to next message
Administrator  [PM]
What sort of patches did you have in mind?
Re: Contribution/patches for mednafen [message #2333 is a reply to message #2332 ] Mon, 26 December 2011 10:09 Go to previous messageGo to next message
sage  [PM]
First, two long known bugs which have been fixed recently
a) Everon patch (on offscreen detection for chained sprites was wrong)
b) end of bits in sprite data (can be seen in several vector demos)

Then I would like to add debug possibilities (like the one for NES).


http://lynxdev.atari.org
Re: Contribution/patches for mednafen [message #2334 is a reply to message #2330 ] Thu, 29 December 2011 08:41 Go to previous messageGo to next message
Administrator  [PM]
I've applied those two patches from the AtariAge forums into the main code tree.

I'll apply patches you post on the forum, assuming they're decently-written and don't horribly break anything. Be warned though, that the debugger abstraction layer is a bit convoluted and not very pretty.
Re: Contribution/patches for mednafen [message #2335 is a reply to message #2334 ] Thu, 29 December 2011 08:47 Go to previous messageGo to next message
sage  [PM]
>Be warned though, that the debugger abstraction layer is a bit convoluted and not very pretty.

is there some documnetation?


http://lynxdev.atari.org
Re: Contribution/patches for mednafen [message #2336 is a reply to message #2330 ] Thu, 29 December 2011 09:49 Go to previous messageGo to next message
Administrator  [PM]
Not as such, no.
Re: Contribution/patches for mednafen [message #2337 is a reply to message #2333 ] Fri, 30 December 2011 08:34 Go to previous messageGo to next message
sage  [PM]
... and it seems there is a problem with 64 bit in the lynx emulation.
Re: Contribution/patches for mednafen [message #2398 is a reply to message #2330 ] Thu, 26 January 2012 14:05 Go to previous messageGo to next message
sage  [PM]
I would like to add a free lynxboot rom replacment. what would be the rules to add this to mednafen. which license would be requiered?


http://lynxdev.atari.org
Re: Contribution/patches for mednafen [message #2403 is a reply to message #2330 ] Mon, 30 January 2012 04:43 Go to previous messageGo to next message
Administrator  [PM]
Which games don't work with it?

Any license that doesn't restrict bundled distribution or do anything else onerous should be fine; maybe MIT or BSD.

I would be a bit reluctant to include it, though, for "accuracy" reasons...

[Updated on: Mon, 30 January 2012 04:44]

Re: Contribution/patches for mednafen [message #2404 is a reply to message #2403 ] Mon, 30 January 2012 11:38 Go to previous messageGo to next message
sage  [PM]
Administrator wrote on Mon, 30 January 2012 05:43

Which games don't work with it?



Games? None.

Correction:
Homebrew demos and Games: "some" wont run
I should point out that these do not work in the emulation for "other" reasons.
a) They check EEPROM and crash if its not there.
b) they use AUDIN for switching banks
c) they are checking emulation flag and/or check other hardware features

These include: LyxnReloded, Digidemo, T-TRIS, SIMIS, Alpoine Games and some more...

Administrator wrote on Mon, 30 January 2012 05:43

Any license that doesn't restrict bundled distribution or do anything else onerous should be fine; maybe MIT or BSD.



ok
thus it would not be necessary to include the source code?

Administrator wrote on Mon, 30 January 2012 05:43

I would be a bit reluctant to include it, though, for "accuracy" reasons...


Well, its better than no bootrom, isnt it?
anyway anybody can replace it by the official one if wanted.

[Updated on: Mon, 30 January 2012 12:10]


http://lynxdev.atari.org
Re: Contribution/patches for mednafen [message #2417 is a reply to message #2330 ] Tue, 14 February 2012 13:22 Go to previous messageGo to next message
Lint  [PM]
Hi there,

Can I post a small alteration? On src/sms/cart.cpp, at line 232:

...
if(A < 0x4000)
{
if(A < 0x0400)
return(rom[A]);
else
return(rom[(A & 0x3FFF) + (((fcr[1] + BankAdd) & page_mask16) << 14) [);
...

"if(A < 0x4000)" is repeated, it should be this, instead:

...
if(A < 0x0400)
return(rom[A]);
else
return(rom[(A & 0x3FFF) + (((fcr[1] + BankAdd) & page_mask16) << 14) ]);
...

I know it's a small change, still, CartRead is something that shall happen pretty frequently (and jumping twice is bad).

How should I apply the changes in the source? Should I send it here (on a diff file, perhaps?) or is there an svn or git of some sort?
Re: Contribution/patches for mednafen [message #2422 is a reply to message #2417 ] Sat, 18 February 2012 07:32 Go to previous messageGo to next message
sage  [PM]
Lint wrote on Tue, 14 February 2012 14:22

Hi there,

Can I post a small alteration? On src/sms/cart.cpp, at line 232:

...
if(A < 0x4000)
{
if(A < 0x0400)
return(rom[A]);
else
return(rom[(A & 0x3FFF) + (((fcr[1] + BankAdd) & page_mask16) << 14) [);
...

"if(A < 0x4000)" is repeated, it should be this, instead:

...
if(A < 0x0400)
return(rom[A]);
else
return(rom[(A & 0x3FFF) + (((fcr[1] + BankAdd) & page_mask16) << 14) ]);
...

I know it's a small change, still, CartRead is something that shall happen pretty frequently (and jumping twice is bad).

How should I apply the changes in the source? Should I send it here (on a diff file, perhaps?) or is there an svn or git of some sort?



I dont get your point. one time teh check is 0x4000, one time 0x0400. what do you want to optimize?


http://lynxdev.atari.org
Re: Contribution/patches for mednafen [message #2424 is a reply to message #2422 ] Wed, 22 February 2012 09:32 Go to previous message
Lint  [PM]
I was going to correct that, as I was reviewing it yesterday I stumbled upon another copy of the source and re-applied my patches, and then I saw that one was 16384 and the other 1024.

Sorry about that.

In other news, I've switched SMS_CartRead from a function to a pointer to a function, thus every time you load a rom SMS_CartInit is called and sets SMS_CartRead to point to a valid routine: SMS_CartReadSEGA, SMS_CartReadCASTLE, SMS_CartReadCODIES and SMS_CartReadELSE, hence instead of having to compare the mapper each time the cpu tries to read content from memory, it will just jump straight out to where it should execute, depending on the mapper adopted by the cartridge. The same was applied to SMS_CartWrite and looks like it's running pretty much the same thing, but the cpu emulation overhead should have gone lower, my cpu can handle Master System way too easily, so that's something that would help more mednafen on portable platforms.

How can I send/propose this patch?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic:Build fix for 0.9.19 and gcc-4.7 prerelease
Next Topic:GUI writen in bash, Xmednafen of course only for linuxers je je
Goto Forum:
  

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

Current Time: Sat May 18 09:32:03 CDT 2024
.:: Contact :: Home ::.

Powered by FUDforum.
Copyright © FUDforum Bulletin Board Software