Skip to content

AkiraShirase/mednafen-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

------------------
Compilation Notes:
------------------
	gcc or LLVM clang is required for compiling Mednafen.  Intel's C compiler may work, but is untested.
	Probably doesn't need to be said, but the compilers optionally specified via CC and CXX *must* be the same version.

	clang: 3.4.0 or newer is required.

	gcc: 4.7(4.7.4+), 4.8(4.8.4+), or 4.9(4.9.2+) or newer is required.

	Reportedly, passing:	--build=x86_64-apple-darwin`uname -r`
	to the configure script is necessary for building on Mac OS X to work properly.



---------------------------------------------
Some notes(and reminders) on the source code:
---------------------------------------------
	The following system headers are included by including "mednafen.h", and always will be, so don't include them manually.
		assert.h	(included in "types.h")
		inttypes.h	(included in "types.h")
		stdlib.h
		stdio.h
		string.h

	Avoid %= in save state load variable sanitizing code unless the variable is unsigned.

	memcpy()/memmove()/etc. with NULL pointers is undefined and bad even when length is 0.

	Careful to not do something like: void somefunc(int something[16]); [...] sizeof(something)

	Try to avoid writing new code that violates strict overflow(even though we compile with -fwrapv), especially be mindful
	of stuff like what's described at http://kqueue.org/blog/2013/09/17/cltq/

	Order of operations != Operator precedence.  Remember sequence point rules, and don't do stuff like:
		value = FuncWithSideEffects() | (FuncWithSideEffects() << 8);	// BAD BAD
	See: http://en.cppreference.com/w/cpp/language/eval_order

	Avoid writing new code that shifts left signed integers or negative values to avoid technically undefined behavior; use
	ugly typecasting, or multiply by powers of 2 instead(remotely modern compilers can optimize it to a shift internally).

	Vanishing temporaries: https://gcc.gnu.org/onlinedocs/gcc/Temporaries.html#Temporaries

	

About

Git mirror of Mednafen - untouched - for diff purposes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 87.9%
  • C 6.5%
  • Makefile 2.2%
  • POV-Ray SDL 1.8%
  • Shell 0.9%
  • M4 0.4%
  • Other 0.3%