Compare commits
1 Commits
master
...
32blit_por
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
844a209027 |
93
.travis.yml
93
.travis.yml
@ -1,4 +1,11 @@
|
|||||||
|
dist: trusty
|
||||||
language: c
|
language: c
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
- osx
|
||||||
|
#matrix:
|
||||||
|
# allow_failures:
|
||||||
|
# - os: osx
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
@ -7,76 +14,40 @@ addons:
|
|||||||
- curl
|
- curl
|
||||||
- xorg-dev
|
- xorg-dev
|
||||||
- libglu1-mesa-dev
|
- libglu1-mesa-dev
|
||||||
|
# sonarcloud:
|
||||||
|
# organisation: "godzil-github"
|
||||||
|
# token: ${SONARCLOUD_TOKEN}
|
||||||
|
|
||||||
|
compiler:
|
||||||
|
- clang
|
||||||
|
- gcc
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake -DUSE_ALLEGRO=OFF -DUSE_PROFILING=OFF -DCOVERALLS=OFF -DCMAKE_BUILD_TYPE=Release ..
|
- cmake -DUSE_ALLEGRO=OFF -DUSE_PROFILING=OFF -DCOVERALLS=OFF -DCMAKE_BUILD_TYPE=Release ..
|
||||||
- cmake --build .
|
- cmake --build .
|
||||||
|
- cd ..
|
||||||
|
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir sonar; cd sonar; cmake -DUSE_ALLEGRO=OFF -DUSE_PROFILING=OFF -DCOVERALLS=OFF -DCMAKE_BUILD_TYPE=Release ..; fi
|
||||||
|
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make clean ; fi
|
||||||
|
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then build-wrapper-linux-x86-64 --out-dir bw-output cmake --build . ; fi
|
||||||
|
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd .. ; fi
|
||||||
|
# - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sonar-scanner -Dsonar.login=$SONARCLOUD_TOKEN; fi
|
||||||
|
- mkdir coverage
|
||||||
|
- cd coverage
|
||||||
|
- cmake -DUSE_ALLEGRO=OFF -DUSE_PROFILING=OFF -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug ..
|
||||||
|
- cmake --build .
|
||||||
|
- cmake --build . --target coveralls
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- '$HOME/.sonar/cache'
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install glew; fi
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install glew; fi
|
||||||
|
|
||||||
jobs:
|
install: true
|
||||||
include:
|
|
||||||
- os: linux
|
|
||||||
dist: bionic
|
|
||||||
arch: amd64
|
|
||||||
compiler: gcc
|
|
||||||
|
|
||||||
- os: linux
|
after_success:
|
||||||
dist: bionic
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
arch: amd64
|
|
||||||
compiler: clang
|
|
||||||
|
|
||||||
- os: linux
|
|
||||||
dist: focal
|
|
||||||
arch: amd64
|
|
||||||
compiler: gcc
|
|
||||||
|
|
||||||
- os: linux
|
|
||||||
dist: focal
|
|
||||||
arch: amd64
|
|
||||||
compiler: clang
|
|
||||||
|
|
||||||
- os: osx
|
|
||||||
compiler: clang
|
|
||||||
osx_image: xcode12.2
|
|
||||||
|
|
||||||
- os: linux
|
|
||||||
dist: focal
|
|
||||||
arch: arm64
|
|
||||||
compiler: gcc
|
|
||||||
|
|
||||||
- os: osx
|
|
||||||
compiler: clang
|
|
||||||
osx_image: xcode10.3
|
|
||||||
|
|
||||||
- os: osx
|
|
||||||
compiler: clang
|
|
||||||
osx_image: xcode11.6
|
|
||||||
|
|
||||||
- os: osx
|
|
||||||
compiler: clang
|
|
||||||
osx_image: xcode12
|
|
||||||
|
|
||||||
- stage: "Coverage"
|
|
||||||
os: linux
|
|
||||||
dist: bionic
|
|
||||||
arch: amd64
|
|
||||||
compiler: gcc
|
|
||||||
script:
|
|
||||||
- mkdir coverage
|
|
||||||
- cd coverage
|
|
||||||
- cmake -DUSE_ALLEGRO=OFF -DUSE_PROFILING=OFF -DCOVERALLS=ON -DCMAKE_BUILD_TYPE=Debug ..
|
|
||||||
- cmake --build .
|
|
||||||
- cmake --build . --target coveralls
|
|
||||||
after_success:
|
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
|
||||||
|
|
||||||
allow_failures:
|
|
||||||
- os: linux
|
|
||||||
arch: arm64
|
|
||||||
|
|
||||||
- os: osx
|
|
||||||
|
|||||||
@ -4,27 +4,31 @@
|
|||||||
# Created by Manoel TRAPIER.
|
# Created by Manoel TRAPIER.
|
||||||
# Copyright (c) 2002-2019 986-Studio.
|
# Copyright (c) 2002-2019 986-Studio.
|
||||||
#
|
#
|
||||||
cmake_minimum_required (VERSION 2.8)
|
cmake_minimum_required (VERSION 3.1)
|
||||||
|
|
||||||
project (peTI-NESulator)
|
project (peTI-NESulator)
|
||||||
|
|
||||||
# External cmake modules
|
# External cmake modules
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external/cmake ${CMAKE_MODULE_PATH})
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external/cmake ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
# Include GLFW
|
if (USE_GLFW)
|
||||||
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
|
message("Coucou ${USE_GLFW}")
|
||||||
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
# Include GLFW
|
||||||
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
|
||||||
add_subdirectory("external/glfw")
|
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||||
find_package(OpenGL REQUIRED)
|
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||||
|
add_subdirectory("external/glfw")
|
||||||
|
find_package(OpenGL REQUIRED)
|
||||||
|
include_directories(${OPENGL_INCLUDE_DIR})
|
||||||
|
endif (USE_GLFW)
|
||||||
|
|
||||||
include_directories(${OPENGL_INCLUDE_DIR})
|
if (USE_PORTAUDIO)
|
||||||
|
# Include PortAudio
|
||||||
# Include PortAudio
|
set(PA_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||||
set(PA_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
set(PA_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||||
set(PA_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
set(PA_ENABLE_DEBUG_OUTPUT OFF CACHE BOOL "" FORCE)
|
||||||
set(PA_ENABLE_DEBUG_OUTPUT OFF CACHE BOOL "" FORCE)
|
add_subdirectory("external/portaudio")
|
||||||
add_subdirectory("external/portaudio")
|
endif (USE_PORTAUDIO)
|
||||||
|
|
||||||
if (COVERALLS)
|
if (COVERALLS)
|
||||||
enable_testing()
|
enable_testing()
|
||||||
|
|||||||
@ -15,25 +15,17 @@ set(DETECT_BUS_CONFLICT OFF CACHE BOOL "Activate the bus conflit detector? (Coul
|
|||||||
set(USE_EFENCE OFF CACHE BOOL "Use electricfence memory debugger?")
|
set(USE_EFENCE OFF CACHE BOOL "Use electricfence memory debugger?")
|
||||||
set(USE_PROFILING OFF CACHE BOOL "Use profiling tools? (Will slow down a lot.)")
|
set(USE_PROFILING OFF CACHE BOOL "Use profiling tools? (Will slow down a lot.)")
|
||||||
|
|
||||||
set(USE_ALLEGRO ON CACHE BOOL "Use Allegro backend")
|
|
||||||
|
|
||||||
option(COVERALLS "Generate coveralls data" OFF)
|
option(COVERALLS "Generate coveralls data" OFF)
|
||||||
|
|
||||||
option(WARN_AS_ERROR "Enable warning as error" OFF)
|
|
||||||
|
|
||||||
##########################
|
##########################
|
||||||
# Link & Compile flags
|
# Link & Compile flags
|
||||||
##########################
|
##########################
|
||||||
|
|
||||||
set(COMP_FLAGS "-march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Wno-write-strings ${PLATFORM_FLAGS}")
|
#set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Werror ${PLATFORM_FLAGS}")
|
||||||
if (WARN_AS_ERROR)
|
#set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-result -Werror ${PLATFORM_FLAGS}")
|
||||||
set(COMP_FLAGS "${COMP_FLAGS} -Werror")
|
set(CMAKE_C_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-result ${PLATFORM_FLAGS}")
|
||||||
endif()
|
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-result ${PLATFORM_FLAGS}")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS ${COMP_FLAGS})
|
|
||||||
set(CMAKE_CXX_FLAGS ${COMP_FLAGS})
|
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/external/coveralls-cmake/cmake)
|
|
||||||
|
|
||||||
add_executable(petines main.c paddle.c NESCarts.c)
|
add_executable(petines main.c paddle.c NESCarts.c)
|
||||||
|
|
||||||
@ -75,6 +67,20 @@ endif ()
|
|||||||
|
|
||||||
include_directories(include)
|
include_directories(include)
|
||||||
|
|
||||||
|
set(OS_TARGET "UNIX" CACHE STRING "Select target to build against")
|
||||||
|
set_property(CACHE OS_TARGET PROPERTY STRINGS TI68K WIN32 UNIX 32BLIT)
|
||||||
|
|
||||||
|
|
||||||
|
if ("${OS_TARGET}" STREQUAL "TI68K")
|
||||||
|
add_subdirectory(os/ti68k)
|
||||||
|
elseif ("${OS_TARGET}" STREQUAL "WIN32")
|
||||||
|
add_subdirectory(os/win32)
|
||||||
|
elseif ("${OS_TARGET}" STREQUAL "UNIX")
|
||||||
|
add_subdirectory(os/unix)
|
||||||
|
elseif ("${OS_TARGET}" STREQUAL "32BLIT")
|
||||||
|
add_subdirectory(os/32blit)
|
||||||
|
endif ()
|
||||||
|
|
||||||
add_subdirectory(apu)
|
add_subdirectory(apu)
|
||||||
add_subdirectory(corecpu)
|
add_subdirectory(corecpu)
|
||||||
add_subdirectory(mappersmanager)
|
add_subdirectory(mappersmanager)
|
||||||
@ -83,14 +89,9 @@ add_subdirectory(pluginsmanager)
|
|||||||
add_subdirectory(ppu)
|
add_subdirectory(ppu)
|
||||||
|
|
||||||
|
|
||||||
if (TARGET_TI68k)
|
if ( (NOT ${OS_TARGET} STREQUAL "TI68K") AND (NOT ${OS_TARGET} STREQUAL "32BLIT") )
|
||||||
add_subdirectory(os/ti68k)
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/external/coveralls-cmake/cmake)
|
||||||
elseif (WIN32)
|
endif ()
|
||||||
add_subdirectory(os/win32)
|
|
||||||
else (TARGET_TI68k)
|
|
||||||
add_subdirectory(os/unix)
|
|
||||||
endif (TARGET_TI68k)
|
|
||||||
|
|
||||||
#find_library(PTHREADLIB pthread)
|
#find_library(PTHREADLIB pthread)
|
||||||
|
|
||||||
if (COVERALLS)
|
if (COVERALLS)
|
||||||
|
|||||||
@ -5,4 +5,8 @@
|
|||||||
# Copyright (c) 2002-2019 986-Studio.
|
# Copyright (c) 2002-2019 986-Studio.
|
||||||
#
|
#
|
||||||
add_library(apu apu.c apu.c)
|
add_library(apu apu.c apu.c)
|
||||||
target_link_libraries(apu portaudio_static)
|
if (USE_PORTAUDIO)
|
||||||
|
target_link_libraries(apu portaudio_static)
|
||||||
|
else()
|
||||||
|
target_link_libraries(apu)
|
||||||
|
endif()
|
||||||
|
|||||||
@ -11,18 +11,13 @@
|
|||||||
#define OS_DEPENDENT_H
|
#define OS_DEPENDENT_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "text.h"
|
|
||||||
|
|
||||||
/* File related functions */
|
/* File related functions */
|
||||||
/* Graphics related functions */
|
/* Graphics related functions */
|
||||||
int graphics_init();
|
int graphics_init();
|
||||||
int graphics_drawpixel(long x, long y, long color);
|
int graphics_drawpixel(long x, long y, long color);
|
||||||
int graphics_blit(long x, long y, long w, long h);
|
int graphics_blit(long x, long y, long w, long h);
|
||||||
int graphics_drawline(uint32_t x, uint32_t y, uint32_t x1, uint32_t y1, uint32_t colour);
|
int graphics_drawline(long x, long y, long x1, long y1, long color);
|
||||||
int graphics_drawRect(uint32_t x0, uint32_t y0, uint32_t w, uint32_t h, uint32_t colour);
|
|
||||||
int graphics_drawFillrect(int x0, int y0, int w, int h, uint32_t colour);
|
|
||||||
int graphics_getScreenSize(int *w, int *h);
|
|
||||||
|
|
||||||
void vsync(void);
|
void vsync(void);
|
||||||
|
|
||||||
typedef struct Palette_t
|
typedef struct Palette_t
|
||||||
@ -52,15 +47,4 @@ int console_init(ConsoleLevel DefaultLevel);
|
|||||||
int console_printf(const ConsoleLevel level, const char *format, ...);
|
int console_printf(const ConsoleLevel level, const char *format, ...);
|
||||||
int console_printf_d(const char *format, ...);
|
int console_printf_d(const char *format, ...);
|
||||||
|
|
||||||
|
|
||||||
#define KEY_ENTER (257)
|
|
||||||
#define KEY_LEFT (263)
|
|
||||||
#define KEY_RIGHT (262)
|
|
||||||
#define KEY_UP (265)
|
|
||||||
#define KEY_DOWN (264)
|
|
||||||
//#define KEY_ENTER 13
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* OS_DEPENDENT_H */
|
#endif /* OS_DEPENDENT_H */
|
||||||
@ -26,7 +26,7 @@ int plugin_remove_keypressHandler(uint8_t key, PluginKeypress);
|
|||||||
#else /* __TINES_PLUGINS__ */
|
#else /* __TINES_PLUGINS__ */
|
||||||
|
|
||||||
/* Available functions outside of plugins */
|
/* Available functions outside of plugins */
|
||||||
int plugin_keypress();
|
int plugin_keypress(uint8_t key);
|
||||||
|
|
||||||
/* Real Prototype: TBD */
|
/* Real Prototype: TBD */
|
||||||
void plugin_list();
|
void plugin_list();
|
||||||
|
|||||||
@ -1,58 +0,0 @@
|
|||||||
/*
|
|
||||||
* FbLib graphic library
|
|
||||||
*
|
|
||||||
* Created by Manoël TRAPIER.
|
|
||||||
* Copyright (c) 2003-2019 986-Studio. All rights reserved.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _FBLIB_INCLUDE_TEXT_H
|
|
||||||
#define _FBLIB_INCLUDE_TEXT_H
|
|
||||||
|
|
||||||
typedef struct FBLibFont
|
|
||||||
{
|
|
||||||
char *name; /* Font name. */
|
|
||||||
int height; /* Height in pixels. */
|
|
||||||
int index_mask; /* ((1 << N) - 1). */
|
|
||||||
int *offset; /* (1 << N) offsets into index. */
|
|
||||||
int *index;
|
|
||||||
uint32_t *content;
|
|
||||||
//void *private;
|
|
||||||
} FBLibFont;
|
|
||||||
|
|
||||||
/* ? */
|
|
||||||
FBLibFont *load_psf(char *filename);
|
|
||||||
|
|
||||||
void graphics_text_line(int x, int y, int w, int charw, uint32_t color, int valign, void *font, char *text);
|
|
||||||
|
|
||||||
int graphics_text_ex(int x, int y, int w, int h,
|
|
||||||
void *font,
|
|
||||||
uint32_t bgcolor, uint32_t fgcolor,
|
|
||||||
char valign, char halign,
|
|
||||||
uint16_t options,
|
|
||||||
void *format, ...);
|
|
||||||
|
|
||||||
void graphics_get_text_size(int *width, int *height,
|
|
||||||
const FBLibFont *font,
|
|
||||||
const char *text);
|
|
||||||
|
|
||||||
void graphics_draw_text (int x, int y,
|
|
||||||
uint32_t colour,
|
|
||||||
const FBLibFont *font,
|
|
||||||
const char *text);
|
|
||||||
|
|
||||||
#define TEXT_VALIGN_LEFT (1)
|
|
||||||
#define TEXT_VALIGN_RIGHT (2)
|
|
||||||
#define TEXT_VALIGN_CENTER (3)
|
|
||||||
|
|
||||||
#define TEXT_HALIGN_TOP (1)
|
|
||||||
#define TEXT_HALIGN_CENTER (2)
|
|
||||||
#define TEXT_HALIGN_BOTTOM (3)
|
|
||||||
|
|
||||||
#define TEXT_OPT_WORDWRAP (1<<0)
|
|
||||||
|
|
||||||
#define TEXT_DEFAULTFONT ((void*)(1))
|
|
||||||
#define TEXT_SMALLFONT ((void*)(2))
|
|
||||||
#define TEXT_LARGEFONT ((void*)(3))
|
|
||||||
|
|
||||||
#endif /* _FBLIB_INCLUDE_TEXT_H */
|
|
||||||
@ -740,12 +740,12 @@ int main(int argc, char *argv[])
|
|||||||
ppu_setMirroring((Cart->Flags & iNES_MIRROR) ? PPU_MIRROR_VERTICAL : PPU_MIRROR_HORIZTAL);
|
ppu_setMirroring((Cart->Flags & iNES_MIRROR) ? PPU_MIRROR_VERTICAL : PPU_MIRROR_HORIZTAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
//console_printf(Console_Default, "Init mapper...\n");
|
console_printf(Console_Default, "Init mapper...\t\t\t");
|
||||||
if (mapper_init(Cart) == -1)
|
if (mapper_init(Cart) == -1)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
//console_printf(Console_Default, "[ OK ]\n");
|
console_printf(Console_Default, "[ OK ]\n");
|
||||||
|
|
||||||
// set_palette(basicPalette);
|
// set_palette(basicPalette);
|
||||||
|
|
||||||
@ -933,7 +933,7 @@ void Loop6502(quick6502_cpu *R)
|
|||||||
quick6502_reset(R);
|
quick6502_reset(R);
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin_keypress();
|
// plugin_keypress(skey);
|
||||||
|
|
||||||
if (cpuSignal != 0)
|
if (cpuSignal != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
17
src/os/32blit/CMakeLists.txt
Normal file
17
src/os/32blit/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#
|
||||||
|
# peTI-NESulator CMake
|
||||||
|
#
|
||||||
|
# Created by Manoël Trapier.
|
||||||
|
# Copyright (c) 2002-2019 986-Studio.
|
||||||
|
#
|
||||||
|
set(USE_GLFW OFF BOOL CACHE INTERNAL "USE_GLFW")
|
||||||
|
set(USE_PORTAUDIO OFF BOOL CACHE INTERNAL "USE_PORTAUDIO")
|
||||||
|
|
||||||
|
set(PATH_32BLIT "../32blit" CACHE PATH "Path to 32Blit SDK")
|
||||||
|
set(CMAKE_TOOLCHAIN_FILE "../../"${PATH_32BLIT}/32blit.toolchain)
|
||||||
|
|
||||||
|
|
||||||
|
include("../../"${PATH_32BLIT}/32blit.cmake)
|
||||||
|
|
||||||
|
add_library(oslib loadfile.c graphics.c sound.c io.c text.c)
|
||||||
|
target_link_libraries(oslib)
|
||||||
86
src/os/32blit/graphics.c
Normal file
86
src/os/32blit/graphics.c
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
* Graphic Manager - The peTI-NESulator Project
|
||||||
|
* os/macos/graphics.c
|
||||||
|
*
|
||||||
|
* Created by Manoël Trapier on 08/05/08.
|
||||||
|
* Copyright (c) 2002-2019 986-Studio.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include <os_dependent.h>
|
||||||
|
|
||||||
|
#include <palette.h>
|
||||||
|
|
||||||
|
|
||||||
|
int graphics_init()
|
||||||
|
{
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint32_t getColour(long color)
|
||||||
|
{
|
||||||
|
Palette *pal = &basicPalette[color];
|
||||||
|
uint8_t r, g, b, a;
|
||||||
|
r = pal->r << 2;
|
||||||
|
b = pal->b << 2;
|
||||||
|
g = pal->g << 2;
|
||||||
|
a = 255;//pal->a;
|
||||||
|
return (b << 24) | (g << 16) | (r << 8) | a;
|
||||||
|
}
|
||||||
|
|
||||||
|
int graphics_getScreenSize(int *w, int *h)
|
||||||
|
{
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int graphics_drawRect(uint32_t x0, uint32_t y0, uint32_t w, uint32_t h, uint32_t colour)
|
||||||
|
{
|
||||||
|
|
||||||
|
return getColour(colour);
|
||||||
|
}
|
||||||
|
|
||||||
|
int graphics_drawFillrect(int x0, int y0, int w, int h, uint32_t colour)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int graphics_drawpixel(long x, long y, long color)
|
||||||
|
{
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int graphics_drawCircle(int xc, int yc, int radius, uint32_t colour)
|
||||||
|
{
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int graphics_drawline(uint32_t x, uint32_t y, uint32_t x1, uint32_t y1, uint32_t colour)
|
||||||
|
{
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int graphics_blit(long x, long y, long w, long h)
|
||||||
|
{
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getKeyStatus(int key)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sync with 60Hz (or try to) */
|
||||||
|
void vsync(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
59
src/os/32blit/io.c
Normal file
59
src/os/32blit/io.c
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
/*
|
||||||
|
* IO Manager - The peTI-NESulator Project
|
||||||
|
* os/macos/graphics.c
|
||||||
|
*
|
||||||
|
* Created by Manoël Trapier on 04/01/09.
|
||||||
|
* Copyright (c) 2002-2019 986-Studio.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#include <os_dependent.h>
|
||||||
|
|
||||||
|
char LevelChar[] = { 'E', 'W', 'A', 'N', 'V', 'D' };
|
||||||
|
|
||||||
|
ConsoleLevel console_ActualLevel = Console_Default;
|
||||||
|
|
||||||
|
/* Actually nothing to do */
|
||||||
|
int console_init(ConsoleLevel DefaultLevel)
|
||||||
|
{
|
||||||
|
console_ActualLevel = DefaultLevel;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Actually a simple printf with levels */
|
||||||
|
int console_vprintf(const ConsoleLevel level, const char *format, va_list ap)
|
||||||
|
{
|
||||||
|
if (console_ActualLevel >= level)
|
||||||
|
{
|
||||||
|
vprintf(format, ap);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int console_printf(const ConsoleLevel level, const char *format, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, format);
|
||||||
|
|
||||||
|
console_vprintf(level, format, ap);
|
||||||
|
|
||||||
|
va_end(ap);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int console_printf_d(const char *format, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, format);
|
||||||
|
|
||||||
|
console_vprintf(Console_Debug, format, ap);
|
||||||
|
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
39
src/os/32blit/loadfile.c
Normal file
39
src/os/32blit/loadfile.c
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2002-2019 986-Studio.
|
||||||
|
*/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
|
#include <sys/mman.h>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* Map a file in memory */
|
||||||
|
void *LoadFilePtr(char *filename)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
void *RetPtr;
|
||||||
|
struct stat FileStat;
|
||||||
|
|
||||||
|
fd = open(filename, O_RDONLY);
|
||||||
|
|
||||||
|
fstat(fd, &FileStat);
|
||||||
|
|
||||||
|
RetPtr = mmap(NULL, FileStat.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
|
||||||
|
|
||||||
|
close(fd);
|
||||||
|
|
||||||
|
if (RetPtr == MAP_FAILED)
|
||||||
|
{
|
||||||
|
RetPtr = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return RetPtr;
|
||||||
|
}
|
||||||
0
src/os/32blit/sound.c
Normal file
0
src/os/32blit/sound.c
Normal file
@ -4,6 +4,9 @@
|
|||||||
# Created by Manoël Trapier.
|
# Created by Manoël Trapier.
|
||||||
# Copyright (c) 2002-2019 986-Studio.
|
# Copyright (c) 2002-2019 986-Studio.
|
||||||
#
|
#
|
||||||
|
set(USE_GLFW ON BOOL CACHE INTERNAL "USE_GLFW")
|
||||||
|
set(USE_PORTAUDIO ON BOOL CACHE INTERNAL "USE_PORTAUDIO")
|
||||||
|
|
||||||
if (COVERALLS)
|
if (COVERALLS)
|
||||||
set(COVERAGE_SRCS src/os/unix/loadfile.c src/os/unix/graphics_dummy.c src/os/unix/sound.c src/os/unix/io.c ${COVERAGE_SRCS} PARENT_SCOPE)
|
set(COVERAGE_SRCS src/os/unix/loadfile.c src/os/unix/graphics_dummy.c src/os/unix/sound.c src/os/unix/io.c ${COVERAGE_SRCS} PARENT_SCOPE)
|
||||||
add_library(oslib loadfile.c graphics_dummy.c sound.c io.c text.c)
|
add_library(oslib loadfile.c graphics_dummy.c sound.c io.c text.c)
|
||||||
|
|||||||
Binary file not shown.
@ -158,8 +158,8 @@ void kbHandler(GLFWwindow *window, int key, int scan, int action, int mod)
|
|||||||
}
|
}
|
||||||
keyArray[key].debounced |= (keyArray[key].lastState == GLFW_RELEASE) && (keyArray[key].curState == GLFW_PRESS);
|
keyArray[key].debounced |= (keyArray[key].lastState == GLFW_RELEASE) && (keyArray[key].curState == GLFW_PRESS);
|
||||||
keyArray[key].window = window;
|
keyArray[key].window = window;
|
||||||
/*printf("key:%d, state:%d debounce:%d, laststate:%d\n", key, keyArray[key].curState,
|
printf("key:%d, state:%d debounce:%d, laststate:%d\n", key, keyArray[key].curState,
|
||||||
keyArray[key].debounced, keyArray[key].lastState);*/
|
keyArray[key].debounced, keyArray[key].lastState);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sizeHandler(GLFWwindow *window, int xs, int ys)
|
void sizeHandler(GLFWwindow *window, int xs, int ys)
|
||||||
@ -206,13 +206,13 @@ void initDisplay(GLWindow *g)
|
|||||||
glfwSetWindowSizeCallback(g->windows, sizeHandler);
|
glfwSetWindowSizeCallback(g->windows, sizeHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void drawPixel(GLWindow *gw, uint32_t x, uint32_t y, uint32_t colour)
|
void drawPixel(GLWindow *gw, int x, int y, uint32_t colour)
|
||||||
{
|
{
|
||||||
uint8_t r, g, b, a;
|
uint8_t r, g, b, a;
|
||||||
|
|
||||||
uint32_t offset = (y * gw->WIDTH * 4U) + 4U * x;
|
uint32_t offset = (y * gw->WIDTH * 4U) + 4U * x;
|
||||||
|
|
||||||
if ((x > (uint32_t)gw->WIDTH) || (y > (uint32_t)gw->HEIGHT))
|
if ((x < 0) || (x > gw->WIDTH) || (y < 0) || (y > gw->HEIGHT))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -228,14 +228,10 @@ static void drawPixel(GLWindow *gw, uint32_t x, uint32_t y, uint32_t colour)
|
|||||||
gw->videoMemory[offset + 3] = b;
|
gw->videoMemory[offset + 3] = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void drawLine(GLWindow *g, int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t colour)
|
void drawLine(GLWindow *g, int x0, int y0, int x1, int y1, uint32_t colour)
|
||||||
{
|
{
|
||||||
printf("%s:%s(%p, %d, %d, %d, %d, %d) @ %d\n", __FILE__, __func__,
|
int d, dx, dy, aincr, bincr, xincr, yincr, x, y;
|
||||||
g, x0, y0, x1, y1, colour,
|
if (abs(x1 - x0) < abs(y1 - y0))
|
||||||
__LINE__);
|
|
||||||
int32_t d, dx, dy, aincr, bincr, xincr, yincr;
|
|
||||||
int32_t x, y;
|
|
||||||
if (abs((int32_t)x1 - x0) < abs((int32_t)y1 - y0))
|
|
||||||
{
|
{
|
||||||
/* parcours par l'axe vertical */
|
/* parcours par l'axe vertical */
|
||||||
if (y0 > y1)
|
if (y0 > y1)
|
||||||
@ -246,9 +242,9 @@ static void drawLine(GLWindow *g, int32_t x0, int32_t y0, int32_t x1, int32_t y1
|
|||||||
|
|
||||||
xincr = x1 > x0 ? 1 : -1;
|
xincr = x1 > x0 ? 1 : -1;
|
||||||
dy = y1 - y0;
|
dy = y1 - y0;
|
||||||
dx = abs((int32_t)x1 - x0);
|
dx = abs(x1 - x0);
|
||||||
d = 2 * dx - dy;
|
d = 2 * dx - dy;
|
||||||
aincr = 2 * ((int32_t)dx - dy);
|
aincr = 2 * (dx - dy);
|
||||||
bincr = 2 * dx;
|
bincr = 2 * dx;
|
||||||
x = x0;
|
x = x0;
|
||||||
y = y0;
|
y = y0;
|
||||||
@ -281,7 +277,7 @@ static void drawLine(GLWindow *g, int32_t x0, int32_t y0, int32_t x1, int32_t y1
|
|||||||
}
|
}
|
||||||
yincr = y1 > y0 ? 1 : -1;
|
yincr = y1 > y0 ? 1 : -1;
|
||||||
dx = x1 - x0;
|
dx = x1 - x0;
|
||||||
dy = abs((int32_t)y1 - y0);
|
dy = abs(y1 - y0);
|
||||||
d = 2 * dy - dx;
|
d = 2 * dy - dx;
|
||||||
aincr = 2 * (dy - dx);
|
aincr = 2 * (dy - dx);
|
||||||
bincr = 2 * dy;
|
bincr = 2 * dy;
|
||||||
@ -310,7 +306,7 @@ exit:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void drawCircle(GLWindow *g, int xc, int yc, int radius, uint32_t colour)
|
void drawCircle(GLWindow *g, int xc, int yc, int radius, uint32_t colour)
|
||||||
{
|
{
|
||||||
int f = 1 - radius;
|
int f = 1 - radius;
|
||||||
int ddF_x = 0;
|
int ddF_x = 0;
|
||||||
@ -368,24 +364,17 @@ static void drawCircle(GLWindow *g, int xc, int yc, int radius, uint32_t colour)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void drawRect(GLWindow *g, uint32_t x0, uint32_t y0, uint32_t w, uint32_t h, uint32_t colour)
|
void drawRect(GLWindow *g, int x0, int y0, int w, int h, uint32_t colour)
|
||||||
{
|
{
|
||||||
printf("%s:%s(%p, %d, %d, %d, %d, %d) @ %d\n", __FILE__, __func__,
|
|
||||||
g, x0, y0, w, h, colour,
|
|
||||||
__LINE__);
|
|
||||||
drawLine(g, x0, y0, x0 + w, y0, colour);
|
drawLine(g, x0, y0, x0 + w, y0, colour);
|
||||||
drawLine(g, x0 + w, y0, x0 + w, y0 + h, colour);
|
drawLine(g, x0 + w, y0, x0 + w, y0 + h, colour);
|
||||||
drawLine(g, x0 + w, y0 + h, x0, y0 + h, colour);
|
drawLine(g, x0 + w, y0 + h, x0, y0 + h, colour);
|
||||||
drawLine(g, x0, y0 + h, x0, y0, colour);
|
drawLine(g, x0, y0 + h, x0, y0, colour);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void drawFillrect(GLWindow *g, uint32_t x0, uint32_t y0, uint32_t w, uint32_t h, uint32_t colour)
|
void drawFillrect(GLWindow *g, int x0, int y0, int w, int h, uint32_t colour)
|
||||||
{
|
{
|
||||||
printf("%s:%s(%p, %d, %d, %d, %d, %d) @ %d\n", __FILE__, __func__,
|
int i;
|
||||||
g, x0, y0, w, h, colour,
|
|
||||||
__LINE__);
|
|
||||||
uint32_t i;
|
|
||||||
|
|
||||||
for (i = 0 ; i < h ; i++)
|
for (i = 0 ; i < h ; i++)
|
||||||
{
|
{
|
||||||
drawLine(g, x0, y0 + i, x0 + w, y0 + i, colour);
|
drawLine(g, x0, y0 + i, x0 + w, y0 + i, colour);
|
||||||
@ -399,7 +388,7 @@ void clearScreen(GLWindow *g)
|
|||||||
|
|
||||||
void updateScreen(GLWindow *g)
|
void updateScreen(GLWindow *g)
|
||||||
{
|
{
|
||||||
/* Update windows code */
|
/*Update windows code */
|
||||||
glfwMakeContextCurrent(g->windows);
|
glfwMakeContextCurrent(g->windows);
|
||||||
ShowScreen(g, g->WIDTH, g->HEIGHT);
|
ShowScreen(g, g->WIDTH, g->HEIGHT);
|
||||||
glfwSwapBuffers(g->windows);
|
glfwSwapBuffers(g->windows);
|
||||||
@ -442,49 +431,15 @@ static uint32_t getColour(long color)
|
|||||||
return (b << 24) | (g << 16) | (r << 8) | a;
|
return (b << 24) | (g << 16) | (r << 8) | a;
|
||||||
}
|
}
|
||||||
|
|
||||||
int graphics_getScreenSize(int *w, int *h)
|
|
||||||
{
|
|
||||||
*w = mainWindow.WIDTH;
|
|
||||||
*h = mainWindow.HEIGHT;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int graphics_drawRect(uint32_t x0, uint32_t y0, uint32_t w, uint32_t h, uint32_t colour)
|
|
||||||
{
|
|
||||||
printf("%s:%s(%d, %d, %d, %d, %d) @ %d\n", __FILE__, __func__,
|
|
||||||
x0, y0, w, h, colour,
|
|
||||||
__LINE__);
|
|
||||||
drawRect(&mainWindow, x0, y0, w, h, colour);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int graphics_drawFillrect(int x0, int y0, int w, int h, uint32_t colour)
|
|
||||||
{
|
|
||||||
printf("%s:%s(%d, %d, %d, %d, %d) @ %d\n", __FILE__, __func__,
|
|
||||||
x0, y0, w, h, colour,
|
|
||||||
__LINE__);
|
|
||||||
drawFillrect(&mainWindow, x0, y0, w, h, colour);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int graphics_drawpixel(long x, long y, long color)
|
int graphics_drawpixel(long x, long y, long color)
|
||||||
{
|
{
|
||||||
drawPixel(&mainWindow, x, y, getColour(color));
|
drawPixel(&mainWindow, x, y, getColour(color));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int graphics_drawCircle(int xc, int yc, int radius, uint32_t colour)
|
int graphics_drawline(long x, long y, long x1, long y1, long color)
|
||||||
{
|
{
|
||||||
drawCircle(&mainWindow, xc, yc, radius, colour);
|
drawLine(&mainWindow, x, y, x1, y1, getColour(color));
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int graphics_drawline(uint32_t x, uint32_t y, uint32_t x1, uint32_t y1, uint32_t colour)
|
|
||||||
{
|
|
||||||
printf("%s:%s(%d, %d, %d, %d, %d) @ %d\n", __FILE__, __func__,
|
|
||||||
x, y, x1, y1, colour,
|
|
||||||
__LINE__);
|
|
||||||
drawLine(&mainWindow, x, y, x1, y1, getColour(colour));
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -120,28 +120,11 @@ int graphics_drawpixel(long x, long y, long color)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int graphics_drawline(uint32_t x, uint32_t y, uint32_t x1, uint32_t y1, uint32_t colour)
|
int graphics_drawline(long x, long y, long x1, long y1, long color)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int graphics_drawRect(uint32_t x0, uint32_t y0, uint32_t w, uint32_t h, uint32_t colour)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int graphics_drawFillrect(int x0, int y0, int w, int h, uint32_t colour)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int graphics_getScreenSize(int *w, int *h)
|
|
||||||
{
|
|
||||||
*w = 640;
|
|
||||||
*h = 320;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int graphics_blit(long x, long y, long w, long h)
|
int graphics_blit(long x, long y, long w, long h)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -55,11 +55,11 @@ int plugin_load(int id)
|
|||||||
Plugin *ptr = &(Plugins[0]);
|
Plugin *ptr = &(Plugins[0]);
|
||||||
int i = id;
|
int i = id;
|
||||||
|
|
||||||
//console_printf(Console_Default, "%s(%d)", __func__, id);
|
console_printf(Console_Default, "%s(%d)", __func__, id);
|
||||||
|
|
||||||
for (; i > 1 && ptr->name != NULL ; i--)
|
for (; i > 1 && ptr->name != NULL ; i--)
|
||||||
{
|
{
|
||||||
//console_printf(Console_Default, "%d - %s\n", i, ptr->name);
|
console_printf(Console_Default, "%d - %s\n", i, ptr->name);
|
||||||
ptr++;
|
ptr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,15 +131,14 @@ int plugin_remove_keypressHandler(uint8_t key, PluginKeypress func)
|
|||||||
|
|
||||||
|
|
||||||
/* Available functions outside of plugins */
|
/* Available functions outside of plugins */
|
||||||
int plugin_keypress()
|
int plugin_keypress(uint8_t key)
|
||||||
{
|
{
|
||||||
KeyHandler *ptr = keyHandlersList;
|
KeyHandler *ptr = keyHandlersList;
|
||||||
|
|
||||||
while (ptr != NULL)
|
while (ptr != NULL)
|
||||||
{
|
{
|
||||||
if (getKeyStatus(ptr->key))
|
if (ptr->key == key)
|
||||||
{
|
{
|
||||||
console_printf(Console_Default, "Keyrrr [%d].....\n", ptr->key);
|
|
||||||
ptr->func();
|
ptr->func();
|
||||||
}
|
}
|
||||||
ptr = ptr->next;
|
ptr = ptr->next;
|
||||||
|
|||||||
@ -9,8 +9,6 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <os_dependent.h>
|
#include <os_dependent.h>
|
||||||
|
|
||||||
@ -19,11 +17,12 @@
|
|||||||
#include <plugins/manager.h>
|
#include <plugins/manager.h>
|
||||||
|
|
||||||
#undef __TINES_PLUGINS_
|
#undef __TINES_PLUGINS_
|
||||||
#include <os_dependent.h>
|
|
||||||
|
|
||||||
#include <memory/manager.h>
|
#include <memory/manager.h>
|
||||||
#include <types.h>
|
#include <types.h>
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
typedef enum gg_States_
|
typedef enum gg_States_
|
||||||
{
|
{
|
||||||
GG_S00_MAIN_STATE = 0,
|
GG_S00_MAIN_STATE = 0,
|
||||||
@ -52,7 +51,7 @@ uint8_t gg_PatchedValue[10];
|
|||||||
func_rdhook gg_rdhookPtr[10];
|
func_rdhook gg_rdhookPtr[10];
|
||||||
|
|
||||||
#define GG_RDHOOKPATCH(d) \
|
#define GG_RDHOOKPATCH(d) \
|
||||||
static uint8_t gg_RdHookPatch##d(uint8_t addr) \
|
uint8_t gg_RdHookPatch##d(uint8_t addr) \
|
||||||
{ \
|
{ \
|
||||||
if (addr == gg_PatchedAddr[d]) \
|
if (addr == gg_PatchedAddr[d]) \
|
||||||
{ \
|
{ \
|
||||||
@ -68,22 +67,30 @@ static uint8_t gg_RdHookPatch##d(uint8_t addr) \
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define GG_MAX_PATCH 10
|
#define GG_MAX_PATCH 10
|
||||||
/* Defines the read hook patches */
|
/* Defines the rdhook patches */
|
||||||
GG_RDHOOKPATCH(0)
|
GG_RDHOOKPATCH(0)
|
||||||
|
|
||||||
GG_RDHOOKPATCH(1)
|
GG_RDHOOKPATCH(1)
|
||||||
|
|
||||||
GG_RDHOOKPATCH(2)
|
GG_RDHOOKPATCH(2)
|
||||||
|
|
||||||
GG_RDHOOKPATCH(3)
|
GG_RDHOOKPATCH(3)
|
||||||
|
|
||||||
GG_RDHOOKPATCH(4)
|
GG_RDHOOKPATCH(4)
|
||||||
|
|
||||||
GG_RDHOOKPATCH(5)
|
GG_RDHOOKPATCH(5)
|
||||||
|
|
||||||
GG_RDHOOKPATCH(6)
|
GG_RDHOOKPATCH(6)
|
||||||
|
|
||||||
GG_RDHOOKPATCH(7)
|
GG_RDHOOKPATCH(7)
|
||||||
|
|
||||||
GG_RDHOOKPATCH(8)
|
GG_RDHOOKPATCH(8)
|
||||||
|
|
||||||
GG_RDHOOKPATCH(9)
|
GG_RDHOOKPATCH(9)
|
||||||
|
|
||||||
void gg_SetPatch(int id, uint8_t page, uint8_t addr, uint8_t value)
|
void gg_SetPatch(int id, uint8_t page, uint8_t addr, uint8_t value)
|
||||||
{
|
{
|
||||||
func_rdhook fptr;
|
func_rdhook fptr;
|
||||||
func_rdhook cur_ptr;
|
|
||||||
|
|
||||||
if (id >= GG_MAX_PATCH)
|
if (id >= GG_MAX_PATCH)
|
||||||
{
|
{
|
||||||
@ -147,28 +154,30 @@ void gg_SetPatch(int id, uint8_t page, uint8_t addr, uint8_t value)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_ptr = get_page_rdhook(page);
|
set_page_rd_hook(page, fptr);
|
||||||
if (cur_ptr != fptr)
|
|
||||||
{
|
|
||||||
set_page_rd_hook(page, fptr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Access to the bitmap Buffer */
|
||||||
|
extern BITMAP *Buffer;
|
||||||
|
BITMAP *gg_Buffer;
|
||||||
|
|
||||||
void MessageBox(char *title, char *msg)
|
void MessageBox(char *title, char *msg)
|
||||||
{
|
{
|
||||||
|
|
||||||
int sc_w, sc_h;
|
int sc_w, sc_h;
|
||||||
int box_h, box_t, box_l, box_w;
|
int box_h, box_t, box_l, box_w;
|
||||||
|
|
||||||
sc_w = 640; //screen->w;
|
sc_w = screen->w;
|
||||||
sc_h = 480; //screen->h;
|
sc_h = screen->h;
|
||||||
|
|
||||||
/*gg_Buffer = create_bitmap(sc_w, sc_h);
|
gg_Buffer = create_bitmap(sc_w, sc_h);
|
||||||
|
|
||||||
blit(Buffer, gg_Buffer, 0, 0, 0, 0, 512 + 256, 480);*/
|
blit(Buffer, gg_Buffer, 0, 0, 0, 0, 512 + 256, 480);
|
||||||
|
|
||||||
box_w = 0;// text_length(font, title) + 10;
|
box_w = text_length(font, title) + 10;
|
||||||
|
|
||||||
//box_w = (box_w > text_length(font, msg)) ? box_w : text_length(font, msg);
|
box_w = (box_w > text_length(font, msg)) ? box_w : text_length(font, msg);
|
||||||
|
|
||||||
box_w += 15 * 2; /*sc_w/2;*/
|
box_w += 15 * 2; /*sc_w/2;*/
|
||||||
box_h = 15 * 2 + 10;
|
box_h = 15 * 2 + 10;
|
||||||
@ -177,72 +186,70 @@ void MessageBox(char *title, char *msg)
|
|||||||
box_t = (sc_h - box_h) / 2;
|
box_t = (sc_h - box_h) / 2;
|
||||||
box_l = (sc_w - box_w) / 2;
|
box_l = (sc_w - box_w) / 2;
|
||||||
|
|
||||||
graphics_drawFillrect(box_l, box_t, box_l + box_w, box_t + box_h, 60);
|
rectfill(gg_Buffer, box_l, box_t, box_l + box_w, box_t + box_h, 60);
|
||||||
graphics_drawRect(box_l + 5, box_t + 5, box_l + box_w - 5, box_t + box_h - 5, 34);
|
rect(gg_Buffer, box_l + 5, box_t + 5, box_l + box_w - 5, box_t + box_h - 5, 34);
|
||||||
|
|
||||||
/* Display the title */
|
/* Display the title */
|
||||||
//textout_centre_ex(gg_Buffer, font, title, box_w / 2 + box_l, box_t + 2, 34, 60);
|
textout_centre_ex(gg_Buffer, font, title, box_w / 2 + box_l, box_t + 2, 34, 60);
|
||||||
|
|
||||||
/* Display the message */
|
/* Display the message */
|
||||||
//textout_centre_ex(gg_Buffer, font, msg, box_w / 2 + box_l, 15 + box_t + 2, 34, 60);
|
textout_centre_ex(gg_Buffer, font, msg, box_w / 2 + box_l, 15 + box_t + 2, 34, 60);
|
||||||
|
|
||||||
//blit(gg_Buffer, screen, 0, 0, 0, 0, 512 + 256, 480);
|
blit(gg_Buffer, screen, 0, 0, 0, 0, 512 + 256, 480);
|
||||||
|
|
||||||
sleep(1000);
|
sleep(1);
|
||||||
|
|
||||||
//release_bitmap(gg_Buffer);
|
release_bitmap(gg_Buffer);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t SelectNumber(char *title, char *msg, uint8_t size)
|
uint16_t SelectNumber(char *title, char *msg, uint8_t size)
|
||||||
{
|
{
|
||||||
|
|
||||||
//int sc_w, sc_h;
|
int sc_w, sc_h;
|
||||||
//int box_h;
|
int box_h, box_t, box_l, box_w;
|
||||||
int box_w;
|
|
||||||
//int box_t, box_l;
|
|
||||||
|
|
||||||
char valueText[10];
|
char valueText[10];
|
||||||
|
|
||||||
uint16_t value;
|
uint16_t value;
|
||||||
uint8_t digit = 0;
|
uint8_t digit = 0;
|
||||||
|
|
||||||
//sc_w = 640; //screen->w;
|
sc_w = screen->w;
|
||||||
//sc_h = 480; //screen->h;
|
sc_h = screen->h;
|
||||||
|
|
||||||
//gg_Buffer = create_bitmap(sc_w, sc_h);
|
gg_Buffer = create_bitmap(sc_w, sc_h);
|
||||||
|
|
||||||
//blit(Buffer, gg_Buffer, 0, 0, 0, 0, 512 + 256, 480);
|
blit(Buffer, gg_Buffer, 0, 0, 0, 0, 512 + 256, 480);
|
||||||
|
|
||||||
//box_w = text_length(font, title) + 10;
|
box_w = text_length(font, title) + 10;
|
||||||
|
|
||||||
box_w = 0; //(box_w > text_length(font, msg)) ? box_w : text_length(font, msg);
|
box_w = (box_w > text_length(font, msg)) ? box_w : text_length(font, msg);
|
||||||
|
|
||||||
sprintf(valueText, "0000");
|
sprintf(valueText, "0000");
|
||||||
|
|
||||||
//box_w = (box_w > text_length(font, valueText)) ? box_w : text_length(font, msg);
|
box_w = (box_w > text_length(font, valueText)) ? box_w : text_length(font, msg);
|
||||||
|
|
||||||
box_w += 15 * 2; /*sc_w/2;*/
|
box_w += 15 * 2; /*sc_w/2;*/
|
||||||
//box_h = 15 * 2 + 30;
|
box_h = 15 * 2 + 30;
|
||||||
|
|
||||||
/* Set the box center */
|
/* Set the box center */
|
||||||
//box_t = (sc_h - box_h) / 2;
|
box_t = (sc_h - box_h) / 2;
|
||||||
//box_l = (sc_w - box_w) / 2;
|
box_l = (sc_w - box_w) / 2;
|
||||||
|
|
||||||
|
|
||||||
value = 0;
|
value = 0;
|
||||||
|
|
||||||
while (getKeyStatus(KEY_ENTER)) // ENTER
|
while (!key[KEY_ENTER])
|
||||||
{
|
{
|
||||||
|
|
||||||
//rectfill(gg_Buffer, box_l, box_t, box_l + box_w, box_t + box_h, 60);
|
rectfill(gg_Buffer, box_l, box_t, box_l + box_w, box_t + box_h, 60);
|
||||||
//rect(gg_Buffer, box_l + 5, box_t + 5, box_l + box_w - 5, box_t + box_h - 5, 34);
|
rect(gg_Buffer, box_l + 5, box_t + 5, box_l + box_w - 5, box_t + box_h - 5, 34);
|
||||||
|
|
||||||
/* Display the title */
|
/* Display the title */
|
||||||
//textout_centre_ex(gg_Buffer, font, title, box_w / 2 + box_l, box_t + 2, 34, 60);
|
textout_centre_ex(gg_Buffer, font, title, box_w / 2 + box_l, box_t + 2, 34, 60);
|
||||||
|
|
||||||
/* Display the message */
|
/* Display the message */
|
||||||
//textout_centre_ex(gg_Buffer, font, msg, box_w / 2 + box_l, 15 + box_t + 2, 34, 60);
|
textout_centre_ex(gg_Buffer, font, msg, box_w / 2 + box_l, 15 + box_t + 2, 34, 60);
|
||||||
|
|
||||||
if (size == 2)
|
if (size == 2)
|
||||||
{
|
{
|
||||||
@ -253,44 +260,44 @@ uint16_t SelectNumber(char *title, char *msg, uint8_t size)
|
|||||||
sprintf(valueText, "%04X", value);
|
sprintf(valueText, "%04X", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
//textout_centre_ex(gg_Buffer, font, valueText, box_w / 2 + box_l, 15 + box_t + 2 + 10, 34, 60);
|
textout_centre_ex(gg_Buffer, font, valueText, box_w / 2 + box_l, 15 + box_t + 2 + 10, 34, 60);
|
||||||
|
|
||||||
switch (digit)
|
switch (digit)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
case 0:
|
case 0:
|
||||||
//textout_centre_ex(gg_Buffer, font, " ^", box_w / 2 + box_l, 15 + box_t + 2 + 20, 34, 60);
|
textout_centre_ex(gg_Buffer, font, " ^", box_w / 2 + box_l, 15 + box_t + 2 + 20, 34, 60);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
//textout_centre_ex(gg_Buffer, font, " ^ ", box_w / 2 + box_l, 15 + box_t + 2 + 20, 34, 60);
|
textout_centre_ex(gg_Buffer, font, " ^ ", box_w / 2 + box_l, 15 + box_t + 2 + 20, 34, 60);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
//textout_centre_ex(gg_Buffer, font, " ^ ", box_w / 2 + box_l, 15 + box_t + 2 + 20, 34, 60);
|
textout_centre_ex(gg_Buffer, font, " ^ ", box_w / 2 + box_l, 15 + box_t + 2 + 20, 34, 60);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
//textout_centre_ex(gg_Buffer, font, "^ ", box_w / 2 + box_l, 15 + box_t + 2 + 20, 34, 60);
|
textout_centre_ex(gg_Buffer, font, "^ ", box_w / 2 + box_l, 15 + box_t + 2 + 20, 34, 60);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//blit(gg_Buffer, screen, 0, 0, 0, 0, 512 + 256, 480);
|
blit(gg_Buffer, screen, 0, 0, 0, 0, 512 + 256, 480);
|
||||||
|
|
||||||
if (getKeyStatus(KEY_UP)) // UP
|
if (key[KEY_UP])
|
||||||
{
|
{
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
value += ((digit == 0) ? 0x0001 : ((digit == 1) ? 0x0010 : ((digit == 2) ? 0x0100 : 0x1000)));
|
value += ((digit == 0) ? 0x0001 : ((digit == 1) ? 0x0010 : ((digit == 2) ? 0x0100 : 0x1000)));
|
||||||
value &= (size == 2) ? 0xFF : 0xFFFF;
|
value &= (size == 2) ? 0xFF : 0xFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getKeyStatus(KEY_DOWN)) // DOWN
|
if (key[KEY_DOWN])
|
||||||
{
|
{
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
value -= ((digit == 0) ? 0x0001 : ((digit == 1) ? 0x0010 : ((digit == 2) ? 0x0100 : 0x1000)));
|
value -= ((digit == 0) ? 0x0001 : ((digit == 1) ? 0x0010 : ((digit == 2) ? 0x0100 : 0x1000)));
|
||||||
value &= (size == 2) ? 0xFF : 0xFFFF;
|
value &= (size == 2) ? 0xFF : 0xFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getKeyStatus(KEY_RIGHT)) // RIGHT
|
if (key[KEY_RIGHT])
|
||||||
{
|
{
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
if (digit <= 0)
|
if (digit <= 0)
|
||||||
@ -303,7 +310,7 @@ uint16_t SelectNumber(char *title, char *msg, uint8_t size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getKeyStatus(KEY_LEFT))
|
if (key[KEY_LEFT])
|
||||||
{
|
{
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
if (digit >= size - 1)
|
if (digit >= size - 1)
|
||||||
@ -317,8 +324,8 @@ uint16_t SelectNumber(char *title, char *msg, uint8_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//release_bitmap(gg_Buffer);
|
release_bitmap(gg_Buffer);
|
||||||
while (getKeyStatus(KEY_ENTER))
|
while (key[KEY_ENTER])
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
@ -331,27 +338,20 @@ int DispMenu(int itemc, char *itemv[], char *title)
|
|||||||
int selection = 0;
|
int selection = 0;
|
||||||
int i;
|
int i;
|
||||||
int sc_w, sc_h;
|
int sc_w, sc_h;
|
||||||
int32_t box_h, box_t, box_l, box_w;
|
int box_h, box_t, box_l, box_w;
|
||||||
int32_t text_h;
|
|
||||||
|
|
||||||
graphics_getScreenSize(&sc_w, &sc_h);
|
sc_w = screen->w;
|
||||||
|
sc_h = screen->h;
|
||||||
|
|
||||||
//gg_Buffer = create_bitmap(sc_w, sc_h);
|
gg_Buffer = create_bitmap(sc_w, sc_h);
|
||||||
|
|
||||||
//blit(Buffer, gg_Buffer, 0, 0, 0, 0, 512 + 256, 480);
|
blit(Buffer, gg_Buffer, 0, 0, 0, 0, 512 + 256, 480);
|
||||||
|
|
||||||
graphics_get_text_size(&box_w, &text_h, NULL, title);
|
|
||||||
box_w += 10;
|
|
||||||
|
|
||||||
|
box_w = text_length(font, title) + 10;
|
||||||
|
|
||||||
for (i = 0 ; i < itemc ; i++)
|
for (i = 0 ; i < itemc ; i++)
|
||||||
{
|
{
|
||||||
int32_t tmp;
|
box_w = (box_w > text_length(font, itemv[i])) ? box_w : text_length(font, itemv[i]);
|
||||||
graphics_get_text_size(&tmp, NULL, NULL, itemv[i]);
|
|
||||||
if (box_w < tmp)
|
|
||||||
{
|
|
||||||
box_w = tmp;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
box_w += 15 * 2; /*sc_w/2;*/
|
box_w += 15 * 2; /*sc_w/2;*/
|
||||||
@ -362,51 +362,36 @@ int DispMenu(int itemc, char *itemv[], char *title)
|
|||||||
box_l = (sc_w - box_w) / 2;
|
box_l = (sc_w - box_w) / 2;
|
||||||
|
|
||||||
|
|
||||||
while (!getKeyStatus(KEY_ENTER))
|
while (!key[KEY_ENTER])
|
||||||
{
|
{
|
||||||
/* Draw the box and highlight the selected item */
|
/* Draw the box and highlight the selected item */
|
||||||
int i;
|
rectfill(gg_Buffer, box_l, box_t, box_l + box_w, box_t + box_h, 60);
|
||||||
for (i = 0; i < box_h; i++)
|
rect(gg_Buffer, box_l + 5, box_t + 5, box_l + box_w - 5, box_t + box_h - 5, 34);
|
||||||
{
|
|
||||||
graphics_drawline(box_l, box_t+i, box_w, box_t + i, 1);
|
|
||||||
}
|
|
||||||
graphics_drawline(5, 121, 251, 121, 41);
|
|
||||||
|
|
||||||
//graphics_drawFillrect(box_l, box_t, box_w, box_h, 5);
|
|
||||||
//graphics_drawRect(box_l + 5, box_t + 5, box_w - 5, box_h - 5, 1);
|
|
||||||
|
|
||||||
/* Display the title */
|
/* Display the title */
|
||||||
graphics_text_ex(box_l, box_t + 2, box_w, text_h,
|
textout_centre_ex(gg_Buffer, font, title, box_w / 2 + box_l, box_t + 2, 34, 60);
|
||||||
NULL,
|
|
||||||
34, 60,
|
|
||||||
TEXT_VALIGN_CENTER, TEXT_HALIGN_CENTER,
|
|
||||||
0,
|
|
||||||
title);
|
|
||||||
//textout_centre_ex(gg_Buffer, font, title, box_w / 2 + box_l, box_t + 2, 34, 60);
|
|
||||||
|
|
||||||
/* Display the highlight item */
|
/* Display the highlight item */
|
||||||
//graphics_drawFillrect(box_l + 15, 15 + box_t + (selection * 10), box_l + box_w - 15,
|
rectfill(gg_Buffer, box_l + 15, 15 + box_t + (selection * 10), box_l + box_w - 15,
|
||||||
// 15 + box_t + (selection * 10) + 10, 34);
|
15 + box_t + (selection * 10) + 10, 34);
|
||||||
graphics_draw_text(box_w / 2 + box_l, 15 + box_t + (selection * 10) + 2, 60, NULL, itemv[selection]);
|
textout_centre_ex(gg_Buffer, font, itemv[selection], box_w / 2 + box_l, 15 + box_t + (selection * 10) + 2, 60,
|
||||||
//textout_centre_ex(gg_Buffer, font, itemv[selection], box_w / 2 + box_l, 15 + box_t + (selection * 10) + 2, 60,
|
34);
|
||||||
// 34);
|
|
||||||
|
|
||||||
/* Display other items */
|
/* Display other items */
|
||||||
for (i = 0 ; i < itemc ; i++)
|
for (i = 0 ; i < itemc ; i++)
|
||||||
{
|
{
|
||||||
if (i != selection)
|
if (i != selection)
|
||||||
{
|
{
|
||||||
//textout_centre_ex(gg_Buffer, font, itemv[i], box_w / 2 + box_l, 15 + box_t + (i * 10) + 2, 34, 60);
|
textout_centre_ex(gg_Buffer, font, itemv[i], box_w / 2 + box_l, 15 + box_t + (i * 10) + 2, 34, 60);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Blit the screen buffer */
|
/* Blit the screen buffer */
|
||||||
vsync();
|
blit(gg_Buffer, screen, 0, 0, 0, 0, 512 + 256, 480);
|
||||||
//blit(gg_Buffer, screen, 0, 0, 0, 0, 512 + 256, 480);
|
|
||||||
|
|
||||||
/* Now get the keyboard state */
|
/* Now get the keyboard state */
|
||||||
if (getKeyStatus(KEY_UP))
|
if (key[KEY_UP])
|
||||||
{
|
{
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
if (selection <= 0)
|
if (selection <= 0)
|
||||||
@ -419,7 +404,7 @@ int DispMenu(int itemc, char *itemv[], char *title)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getKeyStatus(KEY_DOWN))
|
if (key[KEY_DOWN])
|
||||||
{
|
{
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
if (selection >= (itemc - 1))
|
if (selection >= (itemc - 1))
|
||||||
@ -434,10 +419,9 @@ int DispMenu(int itemc, char *itemv[], char *title)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//release_bitmap(gg_Buffer);
|
release_bitmap(gg_Buffer);
|
||||||
while (getKeyStatus(KEY_ENTER))
|
while (key[KEY_ENTER])
|
||||||
{
|
{
|
||||||
vsync();
|
|
||||||
}
|
}
|
||||||
return selection;
|
return selection;
|
||||||
}
|
}
|
||||||
@ -490,7 +474,7 @@ uint8_t gg_SelectPatch()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprintf(tmp, "Patch %d: Put 0x%02X on address 0x%02X%02X (Code: %08X)",
|
sprintf(tmp, "Patch %d: Put 0x%02X on address 0x%02X%02X (Code: %08lX)",
|
||||||
i, gg_PatchedValue[i], gg_PatchedPage[i], gg_PatchedAddr[i],
|
i, gg_PatchedValue[i], gg_PatchedPage[i], gg_PatchedAddr[i],
|
||||||
gg_MakeCode((gg_PatchedPage[i] << 8) | gg_PatchedAddr[i], gg_PatchedValue[i]));
|
gg_MakeCode((gg_PatchedPage[i] << 8) | gg_PatchedAddr[i], gg_PatchedValue[i]));
|
||||||
}
|
}
|
||||||
@ -714,9 +698,6 @@ void gg_Start()
|
|||||||
int ret;
|
int ret;
|
||||||
uint8_t value;
|
uint8_t value;
|
||||||
uint16_t addr;
|
uint16_t addr;
|
||||||
|
|
||||||
console_printf(Console_Default, "Open GG plugin...\n");
|
|
||||||
|
|
||||||
switch (gg_state)
|
switch (gg_state)
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
@ -882,7 +863,7 @@ int gg_Init()
|
|||||||
int i;
|
int i;
|
||||||
console_printf(Console_Default, "Initializing GG plugin...\n");
|
console_printf(Console_Default, "Initializing GG plugin...\n");
|
||||||
|
|
||||||
plugin_install_keypressHandler('G', gg_Start);
|
plugin_install_keypressHandler('g', gg_Start);
|
||||||
|
|
||||||
for (i = 0 ; i < GG_MAX_PATCH ; i++)
|
for (i = 0 ; i < GG_MAX_PATCH ; i++)
|
||||||
{
|
{
|
||||||
@ -897,3 +878,5 @@ int gg_Deinit()
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -12,7 +12,7 @@
|
|||||||
#include "plugins/gamegenie.h"
|
#include "plugins/gamegenie.h"
|
||||||
|
|
||||||
Plugin Plugins[] = {
|
Plugin Plugins[] = {
|
||||||
{ "Game Genie", gg_Init, gg_Deinit },
|
// { "Game Genie", gg_Init, gg_Deinit },
|
||||||
|
|
||||||
/* EOL tag */
|
/* EOL tag */
|
||||||
{ NULL, NULL, NULL }
|
{ NULL, NULL, NULL }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user