• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Site › Dolphin Patches (Archive) v
« Previous 1 2 3 4 5 ... 7 Next »

HawaiianPunch's Code Patches
View New Posts | View Today's Posts

Pages (7): « Previous 1 ... 3 4 5 6 7 Next »
Jump to page 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
HawaiianPunch's Code Patches
02-03-2012, 11:45 AM (This post was last modified: 02-03-2012, 11:45 AM by HawaiianPunch.)
#51
HawaiianPunch Offline
Posting Freak
*****
Posts: 878
Threads: 2
Joined: Apr 2011
I keep getting "BackPatch - no support for operand size 2" errors when I call LoadFile.ReadBytes(out_buf, LoadFile.GetSize()); LoadFile is an object of File::IOFile and out_buf is type u8*.
However, ReadBytes still returns true even though it displays this error. Why? And how can I fix it?
My current Read function implementation is here, albeit commented out so someone checking out the code doesn't get nasty errors.
http://code.google.com/r/hawaiianpunch1-fileloading/source/browse/Source/Core/DolphinWX/Src/FileLoader.cpp?spec=svnc1caf1b9d779f29bc361409f7e45909ccafac060&name=FileLoader&r=c1caf1b9d779f29bc361409f7e45909ccafac060#48
Main Laptop:
Dell XPS 17
i7 2720QM @ 2.2GHz
8GB DDR3 RAM
Nvidia GeForce GT 555M
Windows 7 64-bit
[Image: salsa.gif?noCache=1324617601]
Find
02-04-2012, 10:42 PM
#52
neobrain Offline
"Wow, I made my code 1000x faster! That means I can make it 2048x slower now!"
**********
Developers (Some Administrators and Super Moderators)
Posts: 3,208
Threads: 50
Joined: Jun 2009
Are you sure out_buf actually has been allocated with at least LoadFile.GetSize() bytes? If you're trying to write 512 bytes to a 256-byte buffer that's obviously going to cause errors.
My blog
Me on Twitter
My wishlist on Amazon.de
Find
02-05-2012, 10:49 AM
#53
HawaiianPunch Offline
Posting Freak
*****
Posts: 878
Threads: 2
Joined: Apr 2011
(02-04-2012, 10:42 PM)neobrain Wrote: Are you sure out_buf actually has been allocated with at least LoadFile.GetSize() bytes? If you're trying to write 512 bytes to a 256-byte buffer that's obviously going to cause errors.

Thanks, lowering the file size of some of the files that I'm trying to load took away that backpatch error. However, I'm still confused as to why the buffer was not large enough; the files I'm loading are identical to the ones in the ISO.

Also, now I'm getting a compile at 0 error, even with identical files.
Undecided
Main Laptop:
Dell XPS 17
i7 2720QM @ 2.2GHz
8GB DDR3 RAM
Nvidia GeForce GT 555M
Windows 7 64-bit
[Image: salsa.gif?noCache=1324617601]
Find
02-05-2012, 10:59 AM
#54
neobrain Offline
"Wow, I made my code 1000x faster! That means I can make it 2048x slower now!"
**********
Developers (Some Administrators and Super Moderators)
Posts: 3,208
Threads: 50
Joined: Jun 2009
Just poke around some more, I'm sure you'll figure it out some day Big Grin
My blog
Me on Twitter
My wishlist on Amazon.de
Find
02-05-2012, 01:02 PM
#55
HawaiianPunch Offline
Posting Freak
*****
Posts: 878
Threads: 2
Joined: Apr 2011
Is it possible that the offset that is called refers to a specific point in the files, not just the beginning of it?
In other words, should I seek to a certain part of the file I'm loading before loading it, or is the game expecting the entire file to be loaded into memory?
Main Laptop:
Dell XPS 17
i7 2720QM @ 2.2GHz
8GB DDR3 RAM
Nvidia GeForce GT 555M
Windows 7 64-bit
[Image: salsa.gif?noCache=1324617601]
Find
02-05-2012, 09:10 PM
#56
neobrain Offline
"Wow, I made my code 1000x faster! That means I can make it 2048x slower now!"
**********
Developers (Some Administrators and Super Moderators)
Posts: 3,208
Threads: 50
Joined: Jun 2009
idk, just look up all references to your read function and check what other file loaders are expected to do.. Tongue
My blog
Me on Twitter
My wishlist on Amazon.de
Find
02-06-2012, 01:50 PM (This post was last modified: 02-06-2012, 02:06 PM by HawaiianPunch.)
#57
HawaiianPunch Offline
Posting Freak
*****
Posts: 878
Threads: 2
Joined: Apr 2011
I've made more updates here: http://code.google.com/r/hawaiianpunch1-fileloading/source/detail?name=FileLoader&r=dabef497a3ee238f4d989f3647494f7d5277c6be
Games that used to have a Backpatch error still do, and ones that didn't crash Dolphin entirely now. I'm not sure what is going wrong, because the Read function is returning true then immediately crashing.
Any help would be appreciated.
Main Laptop:
Dell XPS 17
i7 2720QM @ 2.2GHz
8GB DDR3 RAM
Nvidia GeForce GT 555M
Windows 7 64-bit
[Image: salsa.gif?noCache=1324617601]
Find
02-06-2012, 01:56 PM
#58
LPFaint99 Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 531
Threads: 4
Joined: Mar 2009
you are almost always going to be attempting to seek past the end of the file. _Offset is from the beginning of the gcm, not the specific file
Find
02-06-2012, 02:09 PM
#59
HawaiianPunch Offline
Posting Freak
*****
Posts: 878
Threads: 2
Joined: Apr 2011
Woops, gave the wrong link. Here's a better one: http://code.google.com/r/hawaiianpunch1-fileloading/source/list?name=FileLoader
Yeah, so even though I put the offset as a parameter I didn't use it, I just put 0 into ReadBytes. What I need to know is if that full offset just refers to the beginning of the file, or somewhere specific in the file. I don't know if the game expects a certain portion of the file to be loaded, or all of it.
Main Laptop:
Dell XPS 17
i7 2720QM @ 2.2GHz
8GB DDR3 RAM
Nvidia GeForce GT 555M
Windows 7 64-bit
[Image: salsa.gif?noCache=1324617601]
Find
02-06-2012, 02:13 PM
#60
LPFaint99 Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 531
Threads: 4
Joined: Mar 2009
ah, apparently I missed that you changed it to 0.
check out the function GetFileName here http://code.google.com/p/dolphin-emu/source/browse/Source/Core/DiscIO/Src/FileSystemGCWii.cpp
Find
« Next Oldest | Next Newest »
Pages (7): « Previous 1 ... 3 4 5 6 7 Next »
Jump to page 


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode