First test plugin

git-svn-id: svn://svn.cc65.org/cc65/trunk@1221 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2002-04-07 13:42:45 +00:00
parent 9abe1e62e7
commit 6c3720686b
12 changed files with 308 additions and 13 deletions

View File

@@ -0,0 +1,2 @@
.depend
*.so

View File

@@ -0,0 +1,45 @@
#
# gcc Makefile for the sim65 chip plugins
#
# Library dir
SIM65 = ..
CFLAGS = -g -O2 -Wall -W -I$(SIM65) -fpic
CC = gcc
EBIND = emxbind
LDFLAGS =
CHIPS = ram.so
OBJS = $(CHIPS:.so=.o)
.PHONY: all
ifeq (.depend,$(wildcard .depend))
all: $(CHIPS)
include .depend
else
all: depend
@$(MAKE) -f make/gcc.mak all
endif
ram.so: ram.o
$(CC) $(CFLAGS) -shared -o $@ $^
@if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
clean:
rm -f *~ core *.lst
zap: clean
rm -f *.o $(EXECS) .depend
# ------------------------------------------------------------------------------
# Make the dependencies
.PHONY: depend dep
depend dep: $(CHIPS:.so=.c)
@echo "Creating dependency information"
$(CC) -I$(SIM65) -MM $^ > .depend

66
src/sim65/chips/ram.c Normal file
View File

@@ -0,0 +1,66 @@
/*****************************************************************************/
/* */
/* ram.c */
/* */
/* RAM plugin for the sim65 6502 simulator */
/* */
/* */
/* */
/* (C) 2002 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
/* warranty. In no event will the authors be held liable for any damages */
/* arising from the use of this software. */
/* */
/* Permission is granted to anyone to use this software for any purpose, */
/* including commercial applications, and to alter it and redistribute it */
/* freely, subject to the following restrictions: */
/* */
/* 1. The origin of this software must not be misrepresented; you must not */
/* claim that you wrote the original software. If you use this software */
/* in a product, an acknowledgment in the product documentation would be */
/* appreciated but is not required. */
/* 2. Altered source versions must be plainly marked as such, and must not */
/* be misrepresented as being the original software. */
/* 3. This notice may not be removed or altered from any source */
/* distribution. */
/* */
/*****************************************************************************/
/* sim65 */
#include "chipif.h"
/*****************************************************************************/
/* Data */
/*****************************************************************************/
/*****************************************************************************/
/* Code */
/*****************************************************************************/
const char* GetName (void)
{
return "RAM";
}
unsigned GetVersion (void)
{
return 1;
}