Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore TLB write if TLB entry is unmapping itself #336

Merged
merged 1 commit into from Jul 24, 2017

Conversation

Projects
None yet
3 participants
@loganmc10
Copy link
Member

commented Jul 14, 2017

Fixes #221

This was adapted from:
https://github.com/project64/project64/blob/master/Source/Project64-core/N64System/Mips/TLBclass.cpp#L128-L146

It allows the games mentioned in #221 to boot. I haven't done extensive testing to see if this breaks other games.

@loganmc10 loganmc10 force-pushed the loganmc10:tlb branch from 1b28d2c to 32f6c44 Jul 14, 2017

@loganmc10

This comment has been minimized.

Copy link
Member Author

commented Jul 14, 2017

By the way, once this, along with the other PR's I have waiting are merged, we are at "compatibility parity" with Project64 as far as I can tell. I don't know of any game that doesn't boot with mupen64plus that works in PJ64. This of course excludes the 64DD games.

There might be games that could use a better CountPerOp or CountPerScanline setting, PJ64's RDB receives a little more love and attention compared to mupen64plus's INI, but those are easy things to play with.

@gizmo98

This comment has been minimized.

Copy link
Contributor

commented Jul 14, 2017

@loganmc10
Just a question. Shouldn't all ported Project 64 fixes show up under credits? I have seen someone on reddit complaining about license violation.

@loganmc10

This comment has been minimized.

Copy link
Member Author

commented Jul 14, 2017

Well I'm not a GPL license expert first off. I think the "credits" thing is possible, but it's not a license requirement, more of a nice gesture? I try to be transparent/open about where I'm getting this stuff from, so I mention it in the PR's, which is my way of giving credit.

As far as actual licenses is concerned: the code wasn't copied, I looked at the code and how it worked, and re-implemented it here, so I don't think any copyright was violated.

The person that seems to have the issue with licenses (and it is 1 person, and that person isn't even in the copyright notice of the code they are complaining about), seemed to take issue with a PR I made in mupen64plus-rsp-hle. Basically zilmar copied mupen64plus-rsp-hle into PJ64 for his Android version, and didn't retain any of the copyright notices. bsmiles32 brought it to his attention, and he added the copyright notices. Then, PJ64 made a few minor bug fixes, which were ported back (mupen64plus/mupen64plus-rsp-hle#40, mupen64plus/mupen64plus-rsp-hle#43)

Anyway I asked bsmiles32 about it and he didn't seem concerned about it, since the code that was copied was so minor, we're talking a basically moving a few brackets around and moving some lines of code around.

So no, I wouldn't be worried about any copyrights, since nothing here was actually copied.

@gizmo98

This comment has been minimized.

Copy link
Contributor

commented Jul 14, 2017

@loganmc10
Seems legit. I didn't unterstand the complaint.

@loganmc10

This comment has been minimized.

Copy link
Member Author

commented Jul 14, 2017

Personally when it comes to emulators I think copyright is a bit of a silly argument. We are all trying to emulate the same system, so the code is going to look very similar, it's also going to act very similar.

For instance (https://copyleft.org/guide/comprehensive-gpl-guidech5.html):

As an introductory matter, it is important to note that literal copying of a significant portion of source code is not always sufficient to establish that a second work is a derivative work of an original program. Conversely, a second work can be a derivative work of an original program even though absolutely no copying of the literal source code of the original program has been made. This is the case because copyright protection does not always extend to all portions of a program’s code, while, at the same time, it can extend beyond the literal code of a program to its non-literal aspects, such as its architecture, structure, sequence, organization, operational modules, and computer-user interface.

So really it could be argued that whoever "got there first" (UltraHLE, 1964, whatever older N64 emulators existed) and implemented a certain opcode or function owns the copyright to that function, and anyone who implements it after is creating a "derivative work". If you look at cen64's code it's going to look pretty similar to PJ64 or mupen64plus, but nobody is too concerned about copyright, since all of us (or most of us) are just trying to have a little fun with a hobby.

@loganmc10

This comment has been minimized.

Copy link
Member Author

commented Jul 14, 2017

The important thing is that the code is protected by the GPL, so some company can't (or shouldn't) come along, steal the code, and try to sell a closed source emulator based on it. The copyright is important because that is the person that controls the decision around the licenses.

For instance, some guy claiming to be from LG just asked gonetz if he would re-license GLideN64 for them so they can use a piece of the code (amusingly it was actually code written by you lol) without releasing the source of their application. GLideN64 has it's own strange license situation so it's unclear whether gonetz would even really have that authority, but assuming he did, he could re-license it to something other than GPL if he wanted. That's the "power" of being a copyright holder.

@gizmo98

This comment has been minimized.

Copy link
Contributor

commented Jul 16, 2017

I always thought it is common practice to share code so all emulators benefit. Snes emulators benefit from each other. Libretro cores benefit more or less from upstream. Upstream benefits sometimes from libretro and so on.

And there is this guy who is complaining who was first as if there is a competition.

This LG guy is really funny. I also do not really now who is the right copyright holder of this piece of code. Reicast for example asked all contributors if relicensing of their contributed code is possible.

Contributions to the reicast project (excluding mine). Copyright belongs to the contributors, we use them via GPL.

reicast/reicast-emulator#455.

@loganmc10

This comment has been minimized.

Copy link
Member Author

commented Jul 24, 2017

I tested this with about 15 games (first 1-2 minutes of each game) and I didn't see any regression, given that this is already implemented successfully in another N64 emulator I think it's pretty safe.

@bsmiles32 bsmiles32 merged commit f40c141 into mupen64plus:master Jul 24, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@bsmiles32

This comment has been minimized.

Copy link
Member

commented Jul 24, 2017

Sorry for the delay, I'm away from home with limited connectivity. That's why I did only merged "safe" PR. I will tackle the remaining one later. Can you suggest an order for me to merge your work ? With all your work on the audio side things are getting very interesting ! Maybe you could also ask @richard42 write permission. Thanks for your dedication.

@loganmc10

This comment has been minimized.

Copy link
Member Author

commented Jul 24, 2017

The order shouldn't matter, they are all independent of each other. If a merge conflict is created after one is merged I can sort it out.

Maybe you could also ask @richard42 write permission.

I'd rather not be merging my own PR's, it's nice to know at least one other person looked at it. After the current batch of PR's is merged there isn't much I was planning on working on anyway, besides maybe trying to get Indiana Jones to work. I'm open to suggestions though.

Thanks for your dedication

Thanks, I enjoy it, it's pretty satisfying to solve these problems, it's almost more fun than actually playing the games lol

@loganmc10 loganmc10 deleted the loganmc10:tlb branch Aug 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.