From dbbc1819e872fc066e1328311d23d2fc28a93792 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Sun, 7 Jul 2019 22:56:23 +0200 Subject: [PATCH] remove NACL --- core/build.h | 2 +- core/linux/common.cpp | 8 +- core/nacl/nacl.cpp | 293 ----------------------- core/nacl/nacl_lin.cpp | 18 -- core/rend/gles/gles.h | 2 +- core/types.h | 6 - shell/cmake/CMakeLists.txt | 1 - shell/nacl/Makefile | 52 ---- shell/nacl/background.js | 40 ---- shell/nacl/common.js | 474 ------------------------------------- shell/nacl/example.js | 19 -- shell/nacl/icon128.png | Bin 9897 -> 0 bytes shell/nacl/index.html | 27 --- shell/nacl_lin/Makefile | 124 ---------- 14 files changed, 5 insertions(+), 1061 deletions(-) delete mode 100644 core/nacl/nacl.cpp delete mode 100644 core/nacl/nacl_lin.cpp delete mode 100644 shell/nacl/Makefile delete mode 100644 shell/nacl/background.js delete mode 100644 shell/nacl/common.js delete mode 100644 shell/nacl/example.js delete mode 100644 shell/nacl/icon128.png delete mode 100644 shell/nacl/index.html delete mode 100644 shell/nacl_lin/Makefile diff --git a/core/build.h b/core/build.h index 2736a0cf9..3ba546c1d 100755 --- a/core/build.h +++ b/core/build.h @@ -211,7 +211,7 @@ #elif defined(TARGET_GCW0) #define HOST_OS OS_LINUX #define HOST_CPU CPU_MIPS -#elif defined(TARGET_NACL32) || defined(TARGET_EMSCRIPTEN) +#elif defined(TARGET_EMSCRIPTEN) #define HOST_OS OS_LINUX #define HOST_CPU CPU_GENERIC #elif defined(TARGET_IPHONE) diff --git a/core/linux/common.cpp b/core/linux/common.cpp index e98e0032e..11f523768 100644 --- a/core/linux/common.cpp +++ b/core/linux/common.cpp @@ -7,17 +7,15 @@ #define __USE_GNU 1 #include #endif -#if !defined(TARGET_NACL32) #include #include -#endif #include #include #include #include #include #include -#if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_IPHONE) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && !defined(TARGET_OSX) && !defined(TARGET_OSX_X64) +#if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_IPHONE) && !defined(TARGET_EMSCRIPTEN) && !defined(TARGET_OSX) && !defined(TARGET_OSX_X64) #include #include #endif @@ -177,7 +175,7 @@ void enable_runfast() } void linux_fix_personality() { - #if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_OS_MAC) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) + #if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_OS_MAC) && !defined(TARGET_EMSCRIPTEN) DEBUG_LOG(BOOT, "Personality: %08X", personality(0xFFFFFFFF)); personality(~READ_IMPLIES_EXEC & personality(0xFFFFFFFF)); DEBUG_LOG(BOOT, "Updated personality: %08X", personality(0xFFFFFFFF)); @@ -185,7 +183,7 @@ void linux_fix_personality() { } void linux_rpi2_init() { -#if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_NACL32) && !defined(TARGET_EMSCRIPTEN) && defined(TARGET_VIDEOCORE) +#if !defined(TARGET_BSD) && !defined(_ANDROID) && !defined(TARGET_EMSCRIPTEN) && defined(TARGET_VIDEOCORE) void* handle; void (*rpi_bcm_init)(void); diff --git a/core/nacl/nacl.cpp b/core/nacl/nacl.cpp deleted file mode 100644 index eb81de6d1..000000000 --- a/core/nacl/nacl.cpp +++ /dev/null @@ -1,293 +0,0 @@ -#include -#include -#include -#include -#include "ppapi/cpp/instance.h" -#include "ppapi/cpp/module.h" -#include "ppapi/cpp/var.h" - -#include -#include "nacl_io/ioctl.h" -#include "nacl_io/nacl_io.h" - -#include "ppapi/cpp/graphics_3d.h" -#include "ppapi/lib/gl/gles2/gl2ext_ppapi.h" -#include "ppapi/utility/completion_callback_factory.h" - -#include "types.h" -#include "maple_cfg.h" - -#include - -extern int screen_width,screen_height; -bool rend_single_frame(); -bool gles_init(); -extern "C" int reicast_main(int argc, char* argv[]); - -int msgboxf(const wchar* text,unsigned int type,...) -{ - va_list args; - - wchar temp[2048]; - va_start(args, type); - vsprintf(temp, text, args); - va_end(args); - - puts(temp); - return 0; -} - -int dc_init(int argc,wchar* argv[]); -void dc_run(); - -bool rend_framePending(); - -pthread_t emut; - -void* emuthread(void* ) { - printf("Emu thread starting up"); - char *Args[3]; - Args[0] = "dc"; - - set_user_config_dir("/http"); - set_user_data_dir("/http"); - - dc_init(1,Args); - dc_run(); - - return 0; -} - -namespace hello_world -{ - class HelloWorldInstance; - HelloWorldInstance* rei_instance; -class HelloWorldInstance : public pp::Instance { - public: - explicit HelloWorldInstance(PP_Instance instance) : pp::Instance(instance), callback_factory_(this) { - rei_instance = this; - printf("Reicast NACL loaded\n"); - nacl_io_init_ppapi(instance, pp::Module::Get()->get_browser_interface()); - - umount("/"); - mount("", "/", "memfs", 0, ""); - - mount("", /* source. Use relative URL */ - "/http", /* target */ - "httpfs", /* filesystemtype */ - 0, /* mountflags */ - ""); /* data */ - - - pthread_create(&emut, NULL, emuthread, 0); - } - virtual ~HelloWorldInstance() {} - - pp::CompletionCallbackFactory callback_factory_; - pp::Graphics3D context_; - int32_t width_; - int32_t height_; - - /// Called by the browser to handle the postMessage() call in Javascript. - /// Detects which method is being called from the message contents, and - /// calls the appropriate function. Posts the result back to the browser - /// asynchronously. - /// @param[in] var_message The message posted by the browser. The possible - /// messages are 'fortyTwo' and 'reverseText:Hello World'. Note that - /// the 'reverseText' form contains the string to reverse following a ':' - /// separator. - virtual void HandleMessage(const pp::Var& var_message); - - bool InitGL(int32_t new_width, int32_t new_height) { - if (!glInitializePPAPI(pp::Module::Get()->get_browser_interface())) { - fprintf(stderr, "Unable to initialize GL PPAPI!\n"); - return false; - } - - const int32_t attrib_list[] = { - PP_GRAPHICS3DATTRIB_ALPHA_SIZE, 8, - PP_GRAPHICS3DATTRIB_DEPTH_SIZE, 24, - PP_GRAPHICS3DATTRIB_WIDTH, new_width, - PP_GRAPHICS3DATTRIB_HEIGHT, new_height, - PP_GRAPHICS3DATTRIB_NONE - }; - - context_ = pp::Graphics3D(this, attrib_list); - if (!BindGraphics(context_)) { - fprintf(stderr, "Unable to bind 3d context!\n"); - context_ = pp::Graphics3D(); - glSetCurrentContextPPAPI(0); - return false; - } - - glSetCurrentContextPPAPI(context_.pp_resource()); - return true; - } - - virtual void DidChangeView(const pp::View& view) { - // Pepper specifies dimensions in DIPs (device-independent pixels). To - // generate a context that is at device-pixel resolution on HiDPI devices, - // scale the dimensions by view.GetDeviceScale(). - int32_t new_width = view.GetRect().width() * view.GetDeviceScale(); - int32_t new_height = view.GetRect().height() * view.GetDeviceScale(); - - if (context_.is_null()) { - if (!InitGL(new_width, new_height)) { - // failed. - return; - } - - verify(gles_init() == true); - RenderLoop(0); - } else { - // Resize the buffers to the new size of the module. - int32_t result = context_.ResizeBuffers(new_width, new_height); - if (result < 0) { - printf("Unable to resize buffers to %d x %d!\n"); - return; - } - } - - width_ = new_width; - height_ = new_height; - glViewport(0, 0, width_, height_); - printf("Resize: %d x %d\n", new_width, new_height); - } - - - void RenderLoop(int32_t) { - - screen_width = width_; - screen_height = height_; - - glClearColor(0.65f, 0.65f, 0.65f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - - if (rend_framePending()) { - while (!rend_single_frame()) ; - printf("Rendered frame\n"); - } - - printf("Swapping buffers\n"); - context_.SwapBuffers( - callback_factory_.NewCallback(&HelloWorldInstance::RenderLoop)); - } - -}; - -void HelloWorldInstance::HandleMessage(const pp::Var& var_message) { - if (!var_message.is_string()) { - return; - } - - // Post the return result back to the browser. Note that HandleMessage() is - // always called on the main thread, so it's OK to post the return message - // directly from here. The return post is asynhronous: PostMessage returns - // immediately. - - //PostMessage(return_var); -} - -/// The Module class. The browser calls the CreateInstance() method to create -/// an instance of your NaCl module on the web page. The browser creates a new -/// instance for each tag with -/// type="application/x-nacl". -class HelloWorldModule : public pp::Module { - public: - HelloWorldModule() : pp::Module() { - - } - virtual ~HelloWorldModule() {} - - /// Create and return a HelloWorldInstance object. - /// @param[in] instance a handle to a plug-in instance. - /// @return a newly created HelloWorldInstance. - /// @note The browser is responsible for calling @a delete when done. - virtual pp::Instance* CreateInstance(PP_Instance instance) { - return new HelloWorldInstance(instance); - } -}; -} // namespace hello_world - -int nacl_printf(const wchar* text,...) -{ - va_list args; - - wchar temp[2048]; - va_start(args, text); - int rv = vsprintf(temp, text, args); - va_end(args); - - if (hello_world::rei_instance) - hello_world::rei_instance->PostMessage(pp::Var(temp)); - return rv; -} - -namespace pp { -/// Factory function called by the browser when the module is first loaded. -/// The browser keeps a singleton of this module. It calls the -/// CreateInstance() method on the object you return to make instances. There -/// is one instance per tag on the page. This is the main binding -/// point for your NaCl module with the browser. -/// @return new HelloWorldModule. -/// @note The browser is responsible for deleting returned @a Module. -Module* CreateModule() { - return new hello_world::HelloWorldModule(); -} -} // namespace pp - - -u16 kcode[4]; -u32 vks[4]; -s8 joyx[4],joyy[4]; -u8 rt[4],lt[4]; - -int get_mic_data(u8* buffer) { return 0; } -int push_vmu_screen(u8* buffer) { return 0; } - -void os_SetWindowText(const char * text) { - puts(text); -} - -void os_DoEvents() { - -} - -void os_SetupInput() { -#if DC_PLATFORM == DC_PLATFORM_DREAMCAST - mcfg_CreateDevices(); -#endif -} - -void UpdateInputState(u32 port) { - -} - -void os_CreateWindow() { - -} - -void os_DebugBreak() { - exit(1); -} - -void* libPvr_GetRenderTarget() { - return 0; -} - -void* libPvr_GetRenderSurface() { - return 0; - -} - -bool gl_init(void*, void*) { - return true; -} - -void gl_term() { - -} - -void gl_swap() { - -} diff --git a/core/nacl/nacl_lin.cpp b/core/nacl/nacl_lin.cpp deleted file mode 100644 index a7e3e15ac..000000000 --- a/core/nacl/nacl_lin.cpp +++ /dev/null @@ -1,18 +0,0 @@ -#define PUTS_REAL puts - -#include -#include - -int nacl_printf(const wchar* text,...) -{ - va_list args; - - wchar temp[2048]; - va_start(args, text); - int rv = vsprintf(temp, text, args); - va_end(args); - - PUTS_REAL(temp); - return rv; -} - diff --git a/core/rend/gles/gles.h b/core/rend/gles/gles.h index dec2f287d..430734527 100755 --- a/core/rend/gles/gles.h +++ b/core/rend/gles/gles.h @@ -3,7 +3,7 @@ #include #include "rend/rend.h" -#if (defined(GLES) && !defined(TARGET_NACL32) && HOST_OS != OS_DARWIN && !defined(USE_SDL)) || defined(_ANDROID) +#if (defined(GLES) && HOST_OS != OS_DARWIN && !defined(USE_SDL)) || defined(_ANDROID) #define USE_EGL #include #include diff --git a/core/types.h b/core/types.h index 94156d2d4..e4a0e3c0b 100644 --- a/core/types.h +++ b/core/types.h @@ -329,12 +329,6 @@ struct maple_device_instance #include #include -#if defined(TARGET_NACL32) - int nacl_printf(const wchar* Text,...); - #define printf nacl_printf - #define puts(X) printf("%s\n", X) -#endif - #if HOST_OS == OS_DARWIN int darw_printf(const wchar* Text,...); #define printf darw_printf diff --git a/shell/cmake/CMakeLists.txt b/shell/cmake/CMakeLists.txt index c5d855c37..aef683440 100644 --- a/shell/cmake/CMakeLists.txt +++ b/shell/cmake/CMakeLists.txt @@ -67,7 +67,6 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL Linux) else() message(FATAL_ERROR "Unknown target") # TODO, TARGET_GCW0 - # TODO, TARGET_NACL32 # TODO, TARGET_IPHONE # TODO, TARGET_PANDORA endif() diff --git a/shell/nacl/Makefile b/shell/nacl/Makefile deleted file mode 100644 index fec9cf250..000000000 --- a/shell/nacl/Makefile +++ /dev/null @@ -1,52 +0,0 @@ - -VALID_TOOLCHAINS := pnacl newlib glibc -CONFIG ?= Debug - -include $(NACL_SDK_ROOT)/tools/common.mk - -LOCAL_PATH := $(call my-dir) -NOT_ARM := 1 -CPP_REC := 1 -#NO_REND := 1 -NO_NIXPROF := 1 - - -RZDCY_SRC_DIR = ../../core - -include $(RZDCY_SRC_DIR)/core.mk - -TARGET = reicast -DEPS = nacl_io -LIBS = ppapi_gles2 ppapi_cpp ppapi pthread nacl_io - -CFLAGS = -Wno-error -Wno-ignored-attributes -CFLAGS += -O3 -fno-strict-aliasing -ffast-math -CFLAGS += -I$(RZDCY_SRC_DIR) -I$(RZDCY_SRC_DIR)/deps -CFLAGS += -D RELEASE -D TARGET_NO_JIT -D TARGET_NACL32 -DGLES -CFLAGS += -D TARGET_NO_EXCEPTIONS -D TARGET_NO_WEBUI -D TARGET_NO_COREIO_HTTP - -SOURCES = $(RZDCY_FILES) ../../core/nacl/nacl.cpp - -# Project Build flags -WARNINGS ?=-Wno-long-long -Wno-switch-enum -CXXFLAGS += -std=gnu++0x $(WARNINGS) - - -# Build rules generated by macros from common.mk: - -$(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep)))) - -$(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS)))) - -# The PNaCl workflow uses both an unstripped and finalized/stripped binary. -# On NaCl, only produce a stripped binary for Release configs (not Debug). -ifneq (,$(or $(findstring pnacl,$(TOOLCHAIN)),$(findstring Release,$(CONFIG)))) -$(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS))) -$(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped)) -else -$(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS))) -endif - -SHELL = sh - -$(eval $(call NMF_RULE,$(TARGET),)) diff --git a/shell/nacl/background.js b/shell/nacl/background.js deleted file mode 100644 index 5c3b1b7c9..000000000 --- a/shell/nacl/background.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -function makeURL(toolchain, config) { - return 'index.html?tc=' + toolchain + '&config=' + config; -} - -function createWindow(url) { - console.log('loading ' + url); - chrome.app.window.create(url, { - width: 1024, - height: 800, - frame: 'none' - }); -} - -function onLaunched(launchData) { - // Send and XHR to get the URL to load from a configuration file. - // Normally you won't need to do this; just call: - // - // chrome.app.window.create('', {...}); - // - // In the SDK we want to be able to load different URLs (for different - // toolchain/config combinations) from the commandline, so we to read - // this information from the file "run_package_config". - var xhr = new XMLHttpRequest(); - xhr.open('GET', 'run_package_config', true); - xhr.onload = function() { - var toolchain_config = this.responseText.split(' '); - createWindow(makeURL.apply(null, toolchain_config)); - }; - xhr.onerror = function() { - // Can't find the config file, just load the default. - createWindow('index.html'); - }; - xhr.send(); -} - -chrome.app.runtime.onLaunched.addListener(onLaunched); diff --git a/shell/nacl/common.js b/shell/nacl/common.js deleted file mode 100644 index a70001551..000000000 --- a/shell/nacl/common.js +++ /dev/null @@ -1,474 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Set to true when the Document is loaded IFF "test=true" is in the query -// string. -var isTest = false; - -// Set to true when loading a "Release" NaCl module, false when loading a -// "Debug" NaCl module. -var isRelease = true; - -// Javascript module pattern: -// see http://en.wikipedia.org/wiki/Unobtrusive_JavaScript#Namespaces -// In essence, we define an anonymous function which is immediately called and -// returns a new object. The new object contains only the exported definitions; -// all other definitions in the anonymous function are inaccessible to external -// code. -var common = (function() { - - function isHostToolchain(tool) { - return tool == 'win' || tool == 'linux' || tool == 'mac'; - } - - /** - * Return the mime type for NaCl plugin. - * - * @param {string} tool The name of the toolchain, e.g. "glibc", "newlib" etc. - * @return {string} The mime-type for the kind of NaCl plugin matching - * the given toolchain. - */ - function mimeTypeForTool(tool) { - // For NaCl modules use application/x-nacl. - var mimetype = 'application/x-nacl'; - if (isHostToolchain(tool)) { - // For non-NaCl PPAPI plugins use the x-ppapi-debug/release - // mime type. - if (isRelease) - mimetype = 'application/x-ppapi-release'; - else - mimetype = 'application/x-ppapi-debug'; - } else if (tool == 'pnacl') { - mimetype = 'application/x-pnacl'; - } - return mimetype; - } - - /** - * Check if the browser supports NaCl plugins. - * - * @param {string} tool The name of the toolchain, e.g. "glibc", "newlib" etc. - * @return {bool} True if the browser supports the type of NaCl plugin - * produced by the given toolchain. - */ - function browserSupportsNaCl(tool) { - // Assume host toolchains always work with the given browser. - // The below mime-type checking might not work with - // --register-pepper-plugins. - if (isHostToolchain(tool)) { - return true; - } - var mimetype = mimeTypeForTool(tool); - return navigator.mimeTypes[mimetype] !== undefined; - } - - /** - * Inject a script into the DOM, and call a callback when it is loaded. - * - * @param {string} url The url of the script to load. - * @param {Function} onload The callback to call when the script is loaded. - * @param {Function} onerror The callback to call if the script fails to load. - */ - function injectScript(url, onload, onerror) { - var scriptEl = document.createElement('script'); - scriptEl.type = 'text/javascript'; - scriptEl.src = url; - scriptEl.onload = onload; - if (onerror) { - scriptEl.addEventListener('error', onerror, false); - } - document.head.appendChild(scriptEl); - } - - /** - * Run all tests for this example. - * - * @param {Object} moduleEl The module DOM element. - */ - function runTests(moduleEl) { - console.log('runTests()'); - common.tester = new Tester(); - - // All NaCl SDK examples are OK if the example exits cleanly; (i.e. the - // NaCl module returns 0 or calls exit(0)). - // - // Without this exception, the browser_tester thinks that the module - // has crashed. - common.tester.exitCleanlyIsOK(); - - common.tester.addAsyncTest('loaded', function(test) { - test.pass(); - }); - - if (typeof window.addTests !== 'undefined') { - window.addTests(); - } - - common.tester.waitFor(moduleEl); - common.tester.run(); - } - - /** - * Create the Native Client element as a child of the DOM element - * named "listener". - * - * @param {string} name The name of the example. - * @param {string} tool The name of the toolchain, e.g. "glibc", "newlib" etc. - * @param {string} path Directory name where .nmf file can be found. - * @param {number} width The width to create the plugin. - * @param {number} height The height to create the plugin. - * @param {Object} attrs Dictionary of attributes to set on the module. - */ - function createNaClModule(name, tool, path, width, height, attrs) { - var moduleEl = document.createElement('embed'); - moduleEl.setAttribute('name', 'nacl_module'); - moduleEl.setAttribute('id', 'nacl_module'); - moduleEl.setAttribute('width', width); - moduleEl.setAttribute('height', height); - moduleEl.setAttribute('path', path); - moduleEl.setAttribute('src', path + '/' + name + '.nmf'); - - // Add any optional arguments - if (attrs) { - for (var key in attrs) { - moduleEl.setAttribute(key, attrs[key]); - } - } - - var mimetype = mimeTypeForTool(tool); - moduleEl.setAttribute('type', mimetype); - - // The element is wrapped inside a
, which has both a 'load' - // and a 'message' event listener attached. This wrapping method is used - // instead of attaching the event listeners directly to the element - // to ensure that the listeners are active before the NaCl module 'load' - // event fires. - var listenerDiv = document.getElementById('listener'); - listenerDiv.appendChild(moduleEl); - - // Request the offsetTop property to force a relayout. As of Apr 10, 2014 - // this is needed if the module is being loaded on a Chrome App's - // background page (see crbug.com/350445). - moduleEl.offsetTop; - - // Host plugins don't send a moduleDidLoad message. We'll fake it here. - var isHost = isHostToolchain(tool); - if (isHost) { - window.setTimeout(function() { - moduleEl.readyState = 1; - moduleEl.dispatchEvent(new CustomEvent('loadstart')); - moduleEl.readyState = 4; - moduleEl.dispatchEvent(new CustomEvent('load')); - moduleEl.dispatchEvent(new CustomEvent('loadend')); - }, 100); // 100 ms - } - - // This is code that is only used to test the SDK. - if (isTest) { - var loadNaClTest = function() { - injectScript('nacltest.js', function() { - runTests(moduleEl); - }); - }; - - // Try to load test.js for the example. Whether or not it exists, load - // nacltest.js. - injectScript('test.js', loadNaClTest, loadNaClTest); - } - } - - /** - * Add the default "load" and "message" event listeners to the element with - * id "listener". - * - * The "load" event is sent when the module is successfully loaded. The - * "message" event is sent when the naclModule posts a message using - * PPB_Messaging.PostMessage() (in C) or pp::Instance().PostMessage() (in - * C++). - */ - function attachDefaultListeners() { - var listenerDiv = document.getElementById('listener'); - listenerDiv.addEventListener('load', moduleDidLoad, true); - listenerDiv.addEventListener('message', handleMessage, true); - listenerDiv.addEventListener('error', handleError, true); - listenerDiv.addEventListener('crash', handleCrash, true); - if (typeof window.attachListeners !== 'undefined') { - window.attachListeners(); - } - } - - /** - * Called when the NaCl module fails to load. - * - * This event listener is registered in createNaClModule above. - */ - function handleError(event) { - // We can't use common.naclModule yet because the module has not been - // loaded. - var moduleEl = document.getElementById('nacl_module'); - updateStatus('ERROR [' + moduleEl.lastError + ']'); - } - - /** - * Called when the Browser can not communicate with the Module - * - * This event listener is registered in attachDefaultListeners above. - */ - function handleCrash(event) { - if (common.naclModule.exitStatus == -1) { - updateStatus('CRASHED'); - } else { - updateStatus('EXITED [' + common.naclModule.exitStatus + ']'); - } - if (typeof window.handleCrash !== 'undefined') { - window.handleCrash(common.naclModule.lastError); - } - } - - /** - * Called when the NaCl module is loaded. - * - * This event listener is registered in attachDefaultListeners above. - */ - function moduleDidLoad() { - common.naclModule = document.getElementById('nacl_module'); - updateStatus('RUNNING'); - - if (typeof window.moduleDidLoad !== 'undefined') { - window.moduleDidLoad(); - } - } - - /** - * Hide the NaCl module's embed element. - * - * We don't want to hide by default; if we do, it is harder to determine that - * a plugin failed to load. Instead, call this function inside the example's - * "moduleDidLoad" function. - * - */ - function hideModule() { - // Setting common.naclModule.style.display = "None" doesn't work; the - // module will no longer be able to receive postMessages. - common.naclModule.style.height = '0'; - } - - /** - * Remove the NaCl module from the page. - */ - function removeModule() { - common.naclModule.parentNode.removeChild(common.naclModule); - common.naclModule = null; - } - - /** - * Return true when |s| starts with the string |prefix|. - * - * @param {string} s The string to search. - * @param {string} prefix The prefix to search for in |s|. - */ - function startsWith(s, prefix) { - // indexOf would search the entire string, lastIndexOf(p, 0) only checks at - // the first index. See: http://stackoverflow.com/a/4579228 - return s.lastIndexOf(prefix, 0) === 0; - } - - /** Maximum length of logMessageArray. */ - var kMaxLogMessageLength = 20; - - /** An array of messages to display in the element with id "log". */ - var logMessageArray = []; - - /** - * Add a message to an element with id "log". - * - * This function is used by the default "log:" message handler. - * - * @param {string} message The message to log. - */ - function logMessage(message) { - logMessageArray.push(message); - if (logMessageArray.length > kMaxLogMessageLength) - logMessageArray.shift(); - - document.getElementById('log').textContent = logMessageArray.join('\n'); - console.log(message); - } - - /** - */ - var defaultMessageTypes = { - 'alert': alert, - 'log': logMessage - }; - - /** - * Called when the NaCl module sends a message to JavaScript (via - * PPB_Messaging.PostMessage()) - * - * This event listener is registered in createNaClModule above. - * - * @param {Event} message_event A message event. message_event.data contains - * the data sent from the NaCl module. - */ - function handleMessage(message_event) { - if (typeof message_event.data === 'string') { - for (var type in defaultMessageTypes) { - if (defaultMessageTypes.hasOwnProperty(type)) { - if (startsWith(message_event.data, type + ':')) { - func = defaultMessageTypes[type]; - func(message_event.data.slice(type.length + 1)); - return; - } - } - } - } - - if (typeof window.handleMessage !== 'undefined') { - window.handleMessage(message_event); - return; - } - - logMessage('Unhandled message: ' + message_event.data); - } - - /** - * Called when the DOM content has loaded; i.e. the page's document is fully - * parsed. At this point, we can safely query any elements in the document via - * document.querySelector, document.getElementById, etc. - * - * @param {string} name The name of the example. - * @param {string} tool The name of the toolchain, e.g. "glibc", "newlib" etc. - * @param {string} path Directory name where .nmf file can be found. - * @param {number} width The width to create the plugin. - * @param {number} height The height to create the plugin. - * @param {Object} attrs Optional dictionary of additional attributes. - */ - function domContentLoaded(name, tool, path, width, height, attrs) { - // If the page loads before the Native Client module loads, then set the - // status message indicating that the module is still loading. Otherwise, - // do not change the status message. - updateStatus('Page loaded.'); - if (!browserSupportsNaCl(tool)) { - updateStatus( - 'Browser does not support NaCl (' + tool + '), or NaCl is disabled'); - } else if (common.naclModule == null) { - updateStatus('Creating embed: ' + tool); - - // We use a non-zero sized embed to give Chrome space to place the bad - // plug-in graphic, if there is a problem. - width = typeof width !== 'undefined' ? width : 200; - height = typeof height !== 'undefined' ? height : 200; - attachDefaultListeners(); - createNaClModule(name, tool, path, width, height, attrs); - } else { - // It's possible that the Native Client module onload event fired - // before the page's onload event. In this case, the status message - // will reflect 'SUCCESS', but won't be displayed. This call will - // display the current message. - updateStatus('Waiting.'); - } - } - - /** Saved text to display in the element with id 'statusField'. */ - var statusText = 'NO-STATUSES'; - - /** - * Set the global status message. If the element with id 'statusField' - * exists, then set its HTML to the status message as well. - * - * @param {string} opt_message The message to set. If null or undefined, then - * set element 'statusField' to the message from the last call to - * updateStatus. - */ - function updateStatus(opt_message) { - if (opt_message) { - statusText = opt_message; - } - var statusField = document.getElementById('statusField'); - if (statusField) { - statusField.innerHTML = statusText; - } - } - - // The symbols to export. - return { - /** A reference to the NaCl module, once it is loaded. */ - naclModule: null, - - attachDefaultListeners: attachDefaultListeners, - domContentLoaded: domContentLoaded, - createNaClModule: createNaClModule, - hideModule: hideModule, - removeModule: removeModule, - logMessage: logMessage, - updateStatus: updateStatus - }; - -}()); - -// Listen for the DOM content to be loaded. This event is fired when parsing of -// the page's document has finished. -document.addEventListener('DOMContentLoaded', function() { - var body = document.body; - - // The data-* attributes on the body can be referenced via body.dataset. - if (body.dataset) { - var loadFunction; - if (!body.dataset.customLoad) { - loadFunction = common.domContentLoaded; - } else if (typeof window.domContentLoaded !== 'undefined') { - loadFunction = window.domContentLoaded; - } - - // From https://developer.mozilla.org/en-US/docs/DOM/window.location - var searchVars = {}; - if (window.location.search.length > 1) { - var pairs = window.location.search.substr(1).split('&'); - for (var key_ix = 0; key_ix < pairs.length; key_ix++) { - var keyValue = pairs[key_ix].split('='); - searchVars[unescape(keyValue[0])] = - keyValue.length > 1 ? unescape(keyValue[1]) : ''; - } - } - - if (loadFunction) { - var toolchains = body.dataset.tools.split(' '); - var configs = body.dataset.configs.split(' '); - - var attrs = {}; - if (body.dataset.attrs) { - var attr_list = body.dataset.attrs.split(' '); - for (var key in attr_list) { - var attr = attr_list[key].split('='); - var key = attr[0]; - var value = attr[1]; - attrs[key] = value; - } - } - - var tc = toolchains.indexOf(searchVars.tc) !== -1 ? - searchVars.tc : toolchains[0]; - - // If the config value is included in the search vars, use that. - // Otherwise default to Release if it is valid, or the first value if - // Release is not valid. - if (configs.indexOf(searchVars.config) !== -1) - var config = searchVars.config; - else if (configs.indexOf('Release') !== -1) - var config = 'Release'; - else - var config = configs[0]; - - var pathFormat = body.dataset.path; - var path = pathFormat.replace('{tc}', tc).replace('{config}', config); - - isTest = searchVars.test === 'true'; - isRelease = path.toLowerCase().indexOf('release') != -1; - - loadFunction(body.dataset.name, tc, path, body.dataset.width, - body.dataset.height, attrs); - } - } -}); diff --git a/shell/nacl/example.js b/shell/nacl/example.js deleted file mode 100644 index ed76b9f4c..000000000 --- a/shell/nacl/example.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright (c) 2013 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -function $(id) { - return document.getElementById(id); -} - -// Add event listeners after the NaCl module has loaded. These listeners will -// forward messages to the NaCl module via postMessage() -function attachListeners() { - -} - -// Handle a message coming from the NaCl module. -function handleMessage(event) { - console.log(event.data); - $("status").textContent = event.data; -} diff --git a/shell/nacl/icon128.png b/shell/nacl/icon128.png deleted file mode 100644 index 4e966a7523851af14908b6831473912c24a623f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9897 zcmbta^;;C*+g@tvlunVBZjff_?vACTrKP)5rAxX57NonRB&0)n0cm0Bkb3!u-@oAf zVa{AL*IehEC+_<^G0|!&vY2S3XaE2JQ(jI=ieq{SBRsMl&PjiaK=;BdKjxE%q=%UZZ+x1KuT+-(U_z zJP@8FY6NmHj$|~G{70SH*WX;|K-eSaml zXbho!vG>^dh=8@&;6+`TUhY2wTN1c}G^C4TK`I87FDns6JJBH}ZcU@cicnA?zd{yGugHAnd)#maiW zhwRy((c*+e=~a;y%Ctei@jXVLHg zc{ihQ06zBY#lq?z=Fq~k(t4+Bg?b}Mg^PU}oYRb8nz>aTF;{69YPR3uS3U&oe z?u7NMzL!npZT5LVSB%mAI~n??tF|8AqU@mKQ{v2!NY zTH<@!v`oLqmD3Lo!)uFAtXhM+$dg&eK43PcGN4neETL0imw*aYCQO|A{(XuGj2pw^)UA3sgzm3xBr0_}+k7PL|LdHIPkGQS2m`1Mc*s>lN zJ~~t6qg06iQl;(%KhLW1)%ZLXG3pC!K8@E;hJP-QowFzfqRgI7{(0Wvrw@m^ePYnR zPw^OC>)(@$Ocp66R;Ecf^N)H8QSyYSK?DVLPu z^BUGK6NJACcM~wHh4Jk}lphs&zWpqjy{YJnVM?s(cCIU1Z&HZfOp z_u{d$TLaqxTrs~ksFQOBY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?O#^?+gdTt2a8Znquc)n-Q)EfM|&4vgmJ*Aa)_Bm*vT4`3!0DQ|HBYgi4gx z=*XMh=4s%`i_6^yM)+GZx-%v;M_QBT0QgbEVTYh4QW7`Gc@)(5bG_uTjbHyufx&7s@dp4;S2a0b- zs}`IWVxym$)v5#I9R`hJY4o}tZ-*1+NUm#`EG~LluIb#A(3lqdyox6$Ye0<+ckr+i zx{<5U>zwo+GQ3pOF{^81yS6ydXUbTm!OCWGS4lcDs zZ1|~jF^JE6*T;N}{ZwsyF%Xk557l?V*CTrX4qTN`Ru?qzb%e`PdkNXB$+97EYnzP^ zCTTvkNso^{-QM1wF4+9b>_w8ZcwsPZfXW>TD7n@syCY9!!CaaK#jx7%GKG}@MHPDk&H}>h@(l<&Pj3+i?c$^}IkF%^J zbnN#H=|)XhspRd`M|zIQVcl8PoUfw>q{cmMXv7Psp|YtjQV^)U^y*+0-sX2{b|}5u z3>csHxnS`u!glmCVzsC~j~^wc)}NbPZoA#K)Gm}^(fn{O{Nt?mOS3r6vHY*!1-r6Q zesC}YVdwVlGUSVqznDX zFvRL6d`*)yK}i5jfy>;1r0=RD*oZx1bS(s zkU`rIJ^8Ac1ML1HgXJ|MYaWros&~d}RVU3GCa#2Sw6H(LJ8#zAih(>ELW;Jibq0s)4)`1_i`?3iHJ1mOT=Ugo=42$M_E+?@es6kj{by>C zM_zp+Yd;2lV8?!Tslu>m4iQU`jR&28!C()L%Ji^!NUs2=rrn~Cmx14L ze%7}4C7iEW2nqfiMj?Edd9ubW&E-2K`2G*vdz2BB0ZFuU!RkN0rxaPGf4wO_-uHhl z(x3fCx>Q;AkLyIhzs)Q+!VcfOcGS!<^7LA~jT z2yPb*6K$r5#a&p#0ZNG*)LM#*h-jvj^r0Jx=Rf} - - - - - - reicast nacl - - - - - -

reicast nacl

-

Status: NO-STATUS

- - -
- - - diff --git a/shell/nacl_lin/Makefile b/shell/nacl_lin/Makefile deleted file mode 100644 index bab2d63af..000000000 --- a/shell/nacl_lin/Makefile +++ /dev/null @@ -1,124 +0,0 @@ -# nacl-simulating linux build -# for debugging - -LOCAL_PATH := $(call my-dir) -FOR_LINUX :=1 -#NOT_ARM := 1 -#X64_REC := 1 -CPP_REC :=1 -#NO_REC := 1 -NO_REND := 1 -WEBUI :=1 -USE_ALSA := 1 -USE_OSS := 1 -#USE_PULSEAUDIO := 1 - -RZDCY_SRC_DIR = ../../core - -include $(RZDCY_SRC_DIR)/core.mk - -RZDCY_FILES += $(RZDCY_SRC_DIR)/nacl/nacl_lin.cpp - -CXX=${CC_PREFIX}g++ -CC=${CC_PREFIX}gcc -AS=${CC_PREFIX}as -STRIP=${CC_PREFIX}strip - -LD=${CC} - -MFLAGS := #-m32 -#-marm -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=softfp -funroll-loops -ASFLAGS := -#-march=armv7-a -mfpu=neon -mfloat-abi=softfp - -LDFLAGS := -g -Wl,-Map,$(notdir $@).map,--gc-sections -Wl,-O3 -Wl,--sort-common - -CFLAGS := -g -O3 -D RELEASE -c -D TARGET_LINUX_x64 -D TARGET_NACL32 -D USES_HOMEDIR -D TARGET_NO_JIT -D NO_REND -std=c++11 -CFLAGS += -frename-registers -fno-strict-aliasing #-fsingle-precision-constant -CFLAGS += -ffast-math -ftree-vectorize - - -#-fprefetch-loop-arrays -#-std=c++0x -CXXFLAGS += $(CFLAGS) $(MFLAGS) -fexceptions -fno-rtti -fpermissive -CXXFLAGS += -fno-operator-names - -ifdef PGO_MAKE - CFLAGS += -fprofile-generate -pg - LDFLAGS += -fprofile-generate -else - CFLAGS += -fomit-frame-pointer -endif - -ifdef PGO_USE - CFLAGS += -fprofile-use -endif - - -ifdef LTO_TEST - CFLAGS += -flto -fwhole-program - LDFLAGS +=-flto -fwhole-program -endif - -INCS := -I$(RZDCY_SRC_DIR) -I$(RZDCY_SRC_DIR)/deps -I$(RZDCY_SRC_DIR)/khronos - -LIBS := # use system libs -LIBS += -lm -lrt -ldl -LIBS += -lpthread #-lX11 - -ifdef USE_ALSA - CXXFLAGS += -D USE_ALSA - LIBS += -lasound -endif - -ifdef USE_OSS - CXXFLAGS += -D USE_OSS -endif - -ifdef USE_PULSEAUDIO - CXXFLAGS += -D USE_PULSEAUDIO - LIBS += -lpulse-simple -endif - -ifdef USE_GLES - CXXFLAGS += -DGLES - LIBS += -lEGL -lGLESv2 -else - LIBS += -ldl -lGL #for desktop gl -endif - - -OBJECTS=$(RZDCY_FILES:.cpp=.build_obj) -OBJECTS:=$(OBJECTS:.c=.build_obj) -OBJECTS:=$(OBJECTS:.S=.build_obj) -OBJECTS:=$(patsubst $(RZDCY_SRC_DIR)/%,obj/%,$(OBJECTS)) - - -EXECUTABLE_STRIPPED=nosym-reicast.elf -EXECUTABLE=reicast.elf - -PACKAGE_FILES=$(EXECUTABLE_STRIPPED) default.gcw0.desktop icon-32.png - -all: $(CPPFILES) $(EXECUTABLE) $(EXECUTABLE_STRIPPED) - -$(EXECUTABLE): $(OBJECTS) - $(CXX) $(MFLAGS) $(EXTRAFLAGS) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@ - -$(EXECUTABLE_STRIPPED): $(EXECUTABLE) - cp $< $@ && $(STRIP) $@ - -obj/%.build_obj : $(RZDCY_SRC_DIR)/%.cpp - mkdir -p $(dir $@) - $(CXX) $(EXTRAFLAGS) $(INCS) $(CFLAGS) $(CXXFLAGS) $< -o $@ - -obj/%.build_obj : $(RZDCY_SRC_DIR)/%.c - mkdir -p $(dir $@) - $(CC) $(EXTRAFLAGS) $(INCS) $(CFLAGS) $< -o $@ - -obj/%.build_obj : $(RZDCY_SRC_DIR)/%.S - mkdir -p $(dir $@) - $(AS) $(ASFLAGS) $(INCS) $< -o $@ - - -clean: - rm $(OBJECTS) $(EXECUTABLE) -f