Skip to content
Browse files

Initial attempt - currently, broken on coroutine support

  • Loading branch information...
1 parent 4b7518f commit 95c8c4d4e9faa10f43d36099e8cc0fa5015fa1b9 @ziz committed Nov 5, 2011
Showing with 70 additions and 18 deletions.
  1. +10 −0 README.markdown
  2. +30 −13 makefile
  3. 0 osinline.h
  4. +1 −1 src/emu/diexec.h
  5. +4 −1 src/mame/drivers/stvinit.c
  6. +2 −2 src/mess/machine/strata.c
  7. +21 −0 src/mess/osd/osdmini/osdmini.mak
  8. +2 −1 src/osd/sdl/sdldir.c
View
10 README.markdown
@@ -0,0 +1,10 @@
+# Javascript Mess
+
+A project to port MESS / MAME to Javascript.
+
+<http://ascii.textfiles.com/archives/3375>
+
+<http://www.archiveteam.org/index.php?title=Javascript_Mess>
+
+
+
View
43 makefile
@@ -39,6 +39,7 @@ endif
# src/osd/$(OSD)/$(OSD).mak
#-------------------------------------------------
+OSD = osdmini
ifndef OSD
ifeq ($(OS),Windows_NT)
OSD = windows
@@ -186,11 +187,11 @@ endif
# uncomment the force the universal DRC to always use the C backend
# you may need to do this if your target architecture does not have
# a native backend
-# FORCE_DRC_C_BACKEND = 1
+FORCE_DRC_C_BACKEND = 1
# uncomment next line to build using unix-style libsdl on Mac OS X
# (vs. the native framework port). Normal users should not enable this.
-# MACOSX_USE_LIBSDL = 1
+MACOSX_USE_LIBSDL = 1
@@ -200,7 +201,7 @@ endif
#-------------------------------------------------
# uncomment next line if you are building for a 64-bit target
-# PTR64 = 1
+PTR64 = 0
# uncomment next line if you are building for a big-endian target
# BIGENDIAN = 1
@@ -228,7 +229,7 @@ BUILD_ZLIB = 1
# MAP = 1
# uncomment next line to generate verbose build information
-# VERBOSE = 1
+VERBOSE = 1
# specify optimization level or leave commented to use the default
# (default is OPTIMIZE = 3 normally, or OPTIMIZE = 0 with symbols)
@@ -297,9 +298,13 @@ BUILD_EXE = $(EXE)
endif
# compiler, linker and utilities
-AR = @ar
-CC = @gcc
-LD = @g++
+AR=/Users/devesine/Source/personal/jsmess/emscripten/tools/emmaken.py
+CXX=/Users/devesine/Source/personal/jsmess/emscripten/tools/emmakenxx.py
+LD=/Users/devesine/Source/personal/jsmess/emscripten/tools/emmakenxx.py
+CC=/Users/devesine/Source/personal/jsmess/emscripten/tools/emmaken.py
+#AR = @ar
+#CC = @gcc
+#LD = @g++
MD = -mkdir$(EXE)
RM = @rm -f
OBJDUMP = @objdump
@@ -431,7 +436,7 @@ CFLAGS = $(CCOMFLAGS) $(CPPONLYFLAGS)
# we compile C-only to C89 standard with GNU extensions
# we compile C++ code to C++98 standard with GNU extensions
-CONLYFLAGS += -std=gnu89
+CONLYFLAGS += -std=gnu90
CPPONLYFLAGS += -x c++ -std=gnu++98
COBJFLAGS += -x objective-c++
@@ -473,13 +478,25 @@ endif
# add a basic set of warnings
CCOMFLAGS += \
-Wall \
- -Wcast-align \
- -Wundef \
- -Wformat-security \
+ -Wno-format-security \
-Wwrite-strings \
-Wno-sign-compare \
- -Wno-conversion
-
+ -Wno-conversion \
+ -Wno-tautological-compare \
+ -Wno-missing-declarations \
+ -Wno-parentheses-equality \
+ -Wno-deprecated \
+ -Wno-constant-logical-operand \
+ -Wno-unused-function \
+ -Wno-shift-count-overflow \
+ -Wno-array-bounds \
+ -Wno-self-assign \
+ -Wno-sizeof-pointer-memaccess
+
+CCOMFLAGS += -DSDLMAME_NOASM
+
+# -Wcast-align \
+# -Wundef \
# warnings only applicable to C compiles
CONLYFLAGS += \
-Wpointer-arith \
View
0 osinline.h
No changes.
View
2 src/emu/diexec.h
@@ -48,7 +48,7 @@
// set to 1 to execute on cothread instead of directly
-#define USE_COTHREADS 1
+#define USE_COTHREADS 0
//**************************************************************************
View
5 src/mame/drivers/stvinit.c
@@ -1,6 +1,6 @@
/* ST-V Inits and SpeedUp Hacks */
/* stvinit.c */
-
+#if 0
/*
to be honest i think some of these cause more problems than they're worth ...
*/
@@ -76,6 +76,7 @@ static const UINT8 stv_default_eeprom[128] = {
*/
+/*
void install_stvbios_speedups(running_machine &machine)
{
// flushes 0 & 1 on both CPUs are for the BIOS speedups
@@ -85,6 +86,7 @@ void install_stvbios_speedups(running_machine &machine)
sh2drc_add_pcflush(machine.device("slave"), 0x60154b2);
sh2drc_add_pcflush(machine.device("slave"), 0x6013aee);
}
+*/
DRIVER_INIT(shienryu)
{
@@ -621,3 +623,4 @@ DRIVER_INIT(nameclv3)
DRIVER_INIT_CALL(stv);
}
+#endif
View
4 src/mess/machine/strata.c
@@ -278,7 +278,7 @@ static int strataflash_r(device_t *device, offs_t offset, bus_width_t bus_width)
case 1: // chip ID
return 0x15; // 64 Mbit
default:
- if (((offset && BYTE_ADDRESS_MASK) >> 1) == 2)
+ if (((offset & BYTE_ADDRESS_MASK) >> 1) == 2)
{ // block lock config
return READ_BLOCKLOCK(strata, offset >> BLOCK_ADDRESS_SHIFT);
}
@@ -298,7 +298,7 @@ static int strataflash_r(device_t *device, offs_t offset, bus_width_t bus_width)
case 0x01: // chip ID
return 0x15; // 64 Mbit
default:
- if (((offset && BYTE_ADDRESS_MASK) >> 1) == 2)
+ if (((offset & BYTE_ADDRESS_MASK) >> 1) == 2)
{ // block lock config
return READ_BLOCKLOCK(strata, offset >> BLOCK_ADDRESS_SHIFT);
}
View
21 src/mess/osd/osdmini/osdmini.mak
@@ -0,0 +1,21 @@
+###########################################################################
+#
+# sdl.mak
+#
+# SDLMESS-specific makefile
+#
+###########################################################################
+
+MESS_SDLSRC = src/mess/osd/osdmini
+MESS_SDLOBJ = $(OBJ)/mess/osd/osdmini
+
+OBJDIRS += $(MESS_SDLOBJ)
+
+#OSDOBJS += \
+
+$(LIBOSD): $(OSDOBJS)
+
+$(LIBOCORE): $(OSDCOREOBJS)
+
+$(LIBOCORE_NOMAIN): $(OSDCOREOBJS:$(WINOBJ)/main.o=)
+
View
3 src/osd/sdl/sdldir.c
@@ -55,7 +55,8 @@ typedef struct stat64 sdl_stat;
#define sdl_stat_fn stat64
#endif
-#define HAS_DT_XXX defined(SDLMAME_LINUX) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN)
+// #define HAS_DT_XXX defined(SDLMAME_LINUX) || defined(SDLMAME_BSD) || defined(SDLMAME_DARWIN)
+#define HAS_DT_XXX 0
struct _osd_directory
{

0 comments on commit 95c8c4d

Please sign in to comment.
Something went wrong with that request. Please try again.