.v64 and .n64 compatibility
.v64 and .n64 compatibility
Mupen64plus has a pretty cool commit coming through right now. Have you seen it?
https://github.com/mupen64plus/mupen64plus-core/pull/80
https://github.com/mupen64plus/mupen64plus-core/pull/80
- MarathonMan
- Site Admin
- Posts: 692
- Joined: Fri Oct 04, 2013 4:49 pm
Re: .v64 and .n64 compatibility
CEN64 takes a different approach and maps the ROM file straight into the process's virtual address space; NO reading or writing of the ROM data is required (until it gets used by the game, of course).
I'm very against byteswapping; it shouldn't have ever happened in the first place!
I'm very against byteswapping; it shouldn't have ever happened in the first place!

- Breadwinka
- Posts: 54
- Joined: Fri Oct 04, 2013 11:35 pm
Re: .v64 and .n64 compatibility
agreed they should have stuck with one. Luckily its not necessary for cen64 since the frontends will swap for you.
Re: .v64 and .n64 compatibility
...until you get a storm of pull requests to implement it.MarathonMan wrote:I'm very against byteswapping; it shouldn't have ever happened in the first place!

Re: .v64 and .n64 compatibility
...at which point one could do like byuu did and offer some kind of "sanitizer" tool to "fix" a folder full of roms in one go. Or just point people to ucon64.
Re: .v64 and .n64 compatibility
Byteswapping is easily handled by a frontend. The core code really doesn't need to know that a file was originally byteswapped. All the core needs to care about is that the file is in the correct order when it is loaded.
Re: .v64 and .n64 compatibility
But this would lead to the same exact code for every frontend no?
- MarathonMan
- Site Admin
- Posts: 692
- Joined: Fri Oct 04, 2013 4:49 pm
Re: .v64 and .n64 compatibility
Or write a tool to byteswap all of the users ROMs. 
(and refuse to load the others until that is done)

(and refuse to load the others until that is done)
Re: .v64 and .n64 compatibility
We're talking about maybe 20 lines of code. Its not like having to duplicate a library or anything. It could take all of 5 minutes to write and test.Narann wrote:But this would lead to the same exact code for every frontend no?
Re: .v64 and .n64 compatibility
If so, why no handle this in the core? I'm just curious.beannaich wrote:We're talking about maybe 20 lines of code. Its not like having to duplicate a library or anything. It could take all of 5 minutes to write and test.
- MarathonMan
- Site Admin
- Posts: 692
- Joined: Fri Oct 04, 2013 4:49 pm
Re: .v64 and .n64 compatibility
Partially because I'm against byteswapping, partially because CEN64 takes this approach:Narann wrote:If so, why no handle this in the core? I'm just curious.
Mapping the ROM into a read-only part of the address space:MarathonMan wrote:CEN64 takes a different approach and maps the ROM file straight into the process's virtual address space; NO reading or writing of the ROM data is required (until it gets used by the game, of course).
- Allows for the use of things like MEM_LARGE_PAGES on Windows, to permit the OS to use huge TLB pages.
- Forces the emulator to crash on stray/out of bounds accesses or writes to the ROM mapping.
- Allows the OS to more intelligently manage memory in the event that memory runs low (since the mapping is likely backed by the OS's disk cache as it is not copied into heap memory as done in traditional emulators (at which point, the OS doesn't really know that it's just a large block file located on the disk anymore).

Re: .v64 and .n64 compatibility
I dislike byteswapping as well which is why I included a simple converter in CEN64-Qt rather than have it seemlessly launch byteswapped ROMs (which isn't hard to do). I prefer the consistency of having my entire collection in Z64 format.
Coding a tool to sanitize an entire directory of ROMs would be easy to do as well.
Coding a tool to sanitize an entire directory of ROMs would be easy to do as well.
Re: .v64 and .n64 compatibility
This make sense. How does CEN64 handle big-endian processors? I guess they don't have to byswap other roms are they?
- MarathonMan
- Site Admin
- Posts: 692
- Joined: Fri Oct 04, 2013 4:49 pm
Re: .v64 and .n64 compatibility
Correct. Everything on the bus in CEN64 is accessed on word-aligned boundaries; little-endian processors will byteswap while big-endian processors will not.Narann wrote:This make sense. How does CEN64 handle big-endian processors? I guess they don't have to byswap other roms are they?
Who is online
Users browsing this forum: No registered users and 1 guest