Speed up sim65 by 10%
This commit is contained in:
@@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* THE memory */
|
/* THE memory */
|
||||||
static unsigned char Mem[0x10000];
|
unsigned char Mem[0x10000];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -73,14 +73,6 @@ void MemWriteWord (unsigned Addr, unsigned Val)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
unsigned char MemReadByte (unsigned Addr)
|
|
||||||
/* Read a byte from a memory location */
|
|
||||||
{
|
|
||||||
return Mem[Addr];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
unsigned MemReadWord (unsigned Addr)
|
unsigned MemReadWord (unsigned Addr)
|
||||||
/* Read a word from a memory location */
|
/* Read a word from a memory location */
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,7 +36,9 @@
|
|||||||
#ifndef MEMORY_H
|
#ifndef MEMORY_H
|
||||||
#define MEMORY_H
|
#define MEMORY_H
|
||||||
|
|
||||||
|
#include "inline.h"
|
||||||
|
|
||||||
|
extern unsigned char Mem[0x10000];
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
@@ -50,8 +52,15 @@ void MemWriteByte (unsigned Addr, unsigned char Val);
|
|||||||
void MemWriteWord (unsigned Addr, unsigned Val);
|
void MemWriteWord (unsigned Addr, unsigned Val);
|
||||||
/* Write a word to a memory location */
|
/* Write a word to a memory location */
|
||||||
|
|
||||||
unsigned char MemReadByte (unsigned Addr);
|
#if defined(HAVE_INLINE)
|
||||||
|
INLINE unsigned char MemReadByte (unsigned Addr)
|
||||||
/* Read a byte from a memory location */
|
/* Read a byte from a memory location */
|
||||||
|
{
|
||||||
|
return Mem[Addr];
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
#define MemReadByte(Addr) Mem[Addr]
|
||||||
|
#endif
|
||||||
|
|
||||||
unsigned MemReadWord (unsigned Addr);
|
unsigned MemReadWord (unsigned Addr);
|
||||||
/* Read a word from a memory location */
|
/* Read a word from a memory location */
|
||||||
|
|||||||
Reference in New Issue
Block a user