Giter VIP home page Giter VIP logo

yapesdl's Introduction

README.SDL

This is the README for the SDL port of Yape/SDL (Yet Another Plus/4 Emulator)

Current version is 0.80.1

LEGAL
=====

  Yape for SDL is 
  (C) 2000,2001,2004,2007,2008,2015-2023 Attila Grósz ([email protected])
  http://yape.plus4.net

  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License as
  published by the Free Software Foundation; either version 2 of the
  License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not see <http://www.gnu.org/licenses/>.

  The ROM file headers in the package used to be 
  Copyright (C) by Commodore Business Machines.

COMPILE
=======

  The source code is hosted on GitHub.
  https://github.com/calmopyrin/yapesdl

  Define AUDIO_CALLBACK if you want to use the older audio API using
  callbacks (pre-2.0.4 versions of SDL2 only support this one).

  Define explicitly ZIP_SUPPORT in case you need preliminary ZIP file 
  support - only used for opening compressed D64 files for now.

  GNU
  ---
  
  To be able to compile on Linux, you must have the latest SDL
  package from http://libsdl.org. The recent stable release as of time of
  this writing is 2.26.x. You will also need the development libraries.
  
  The provided makefile is written for the GNU C++ compiler but can also
  be easily adjusted for other compilers.
  
  It is very likely that if SDL and GCC are supported on your system, then 
  Yape can be compiled and run. Hence, an Android port is also possible, 
  and Yape has been succesfully compiled on systems other than Windows and 
  Linux as well.
  
  Once the libraries and header files are installed, you should
  extract the source tarball to a directory, and simply type:
  
  make

  Alternatively, you can use the provided Code::Blocks project
  file to compile Yape.
  
  If the compilation finished with no error, you can type:
  
      ./yapesdl [PRG/P00/T64/TAP/D64/ZIP filename] [-c64]
  
  to start the emulator, where [] means optional arguments.

  Mac OS X
  --------

  Other than downloading the relevant SDL development libraries, you also 
  need to copy the SDL2.framework file to the /Library/Frameworks folder. 
  From then on, just use the provided Xcode workspace.

  Windows
  -------

  Make sure you install either the Visual Studio or the Mingw version
  of the SDL development library. You can use either compiler
  targeting 32 as well as 64-bit binary builds.

  It is recommended that you use the provided Microsoft Visual Studio 14 
  solution file. The Community 2015 and 2017 Editions are terrific and free 
  IDE's with an excellent debugger.
  
  Note that the 2.0.4 version of the Windows SDL runtime library had a
  serious crash in its DX9 driver. Upgrade to 2.0.5+ to avoid it.

  Emscripten
  ----------

  Install Emscripten using the instructions here first:
  https://emscripten.org/docs/getting_started/downloads.html

  In case you are using Visual Studio, grab the toolchain extension here:
  https://github.com/nokotan/VSExtForEmscripten/releases/
  https://marketplace.visualstudio.com/items?itemName=KamenokoSoft.emscriptenproj1

  Under Windows it's best to use the Solution configuration provided.
  Compiling for Emscripten manually requires a lot of manual workarounds. 
  These will be documented at a later stage.  

  You won't need to download SDL2 headers as these are pulled in automatically during
  the first compilation but they are available from here:
  https://github.com/kripken/emscripten
  https://github.com/emscripten-ports/SDL2

  Prebuilt SDL2 libraries required for linking can be found here, but these are not
  needed if you are using the VS solution:
  https://buildbot.libsdl.org/sdl-builds/sdl-emscripten/?C=M;O=D

USAGE
=====

  The user interface isn't yet ready, so you MUST memorise a couple
  of keyboard shortcuts:
  
  F12 or ESCAPE : exits the emulator
  F11 or Alt+R  : soft reset
  LCTRL + F11	: forced reset (memory remains intact)
  SHIFT + F11	: hard reset (clear memory, reloads ROMs, rewinds tape)
  
  F5		: press PLAY on tape
  F6		: press STOP on tape
  F7		: save screenshot to BMP file
  F8		: enter the user interface, press F8 again or ESC to quit.
              You can move around in the menus with the arrow keys, press ENTER for selection.
  F9		: quick debugger
  F10		: save current settings to user's home directory

  LALT + 1-3   : set window size
  LALT + L	   : switch among emulators (C+4 cycle based; C+4 line based; C64 cycle based; VIC20 cycle based)
  LALT + I	   : switch emulated joystick port
  LALT + M     : enter console based external monitor and disassembler
  LALT + P	   : toggle CRT emulation
  LALT + R     : machine forced reset
  LALT + S     : display frame rate on/off  
  LALT + W	   : toggle between unlimited speed and 50 Hz frame rate (original speed)
  LALT + ENTER : toggle full screen mode
  LALT + F5    : save emulator state
  LALT + F6    : load emulator state
  LALT + F8	   : save memory pointed by $2B/$2C and $2D/$2E
  LALT + KPLUS : collate replay frequencies
  
  Internal disk LOAD/SAVE operations are supported to the current
  file system directory - which is usually '/home/<username>/yape'.
  Any PRG files you may wish to load, should go there, although you can browse the directory tree
  from the user interface, too.
   
  This means that an exact filename match will load
  the requested program, similarly can you save a file.
  
  Full ROM banking is supported on the plus/4, via the 'Attach/Detach ROM...' menu.
  Yape also supports the default ROM's. These are:
  
  - 'BASIC' 	 - the ROM image containing the BASIC interpreter
  - 'KERNAL' 	 - the system kernal ROM image
  - '3PLUS1LOW'  - the low bank ROM image of the built-in plus/4 software
  - '3PLUS1HIGH' - the high bank ROM image of the built-in plus/4 software
  
  In C64 mode, the 'Attach/Detach ROM...' can be used for cartridges, but right now
  only a handful are supported.

KEYBOARD MAPPINGS
=================

  For the keys at different positions, the emulator relies on SDL, so your
  mileage may vary.
  
  There are a few keys that need to be mapped to the emulator keyboard
  differently. These are:
  
  Real C=     Emulator
  ------------------------
  Pound 	= End
  Clr/Home	= Home
  Restore   = PageUp
  C=        = Left Ctrl
  CONTROL   = Right Ctrl
  INST/DEL  = Backspace
  RUN/STOP  = TAB

FEATURES
========

  YapeSDL features:
  
  - full, cycle exact MOS 6502/6510/7501/8501 CPU emulation
  - almost full MOS 7360/8360 aka 'TED' chip emulation
  - almost complete MOS 6569 aka 'VIC-II' chip emulation
  - almost complete MOS 6561 aka 'VIC' chip emulation
  - reasonable MOS 6581/8580 aka 'SID' chip emulation
  - somewhat incomplete MOS 6526 aka 'CIA' emulation
  - somewhat incomplete MOS 6522 aka 'VIA' emulation
  - real 1541 drive emulation (Read/Write)
  - full ROM banking on +4
  - almost full tape emulation (MTAP, WAV images)
  - joystick emulation via cursor keys and gamepads
  - PRG, P00, T64, D64 and TAP file format support
  - partial CRT emulation
  - serial IEC disk LOAD/SAVE to the file system
  - REU 1700/1750/1764 and Hannes 256kB memory expansion support
  - snapshots / savestates

LINKS
=====

  https://github.com/calmopyrin/yapesdl : official source repository for yape/SDL
  http://yape.homeserver.hu             : Yape homepage
  http://plus4world.powweb.com          : Commodore +4 World (games, tape images, scans etc.)
  http://c64.rulez.org	                : Commodore plus/4 FTP archive
  http://gaia.atilia.eu                 : My 8-bit emulator page

yapesdl's People

Contributors

calmopyrin avatar gemba avatar szigand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

yapesdl's Issues

Question about emscripten use

Hi! I have compiled Yape for MacOS - it's working great.

I now want to compile so I can run from a browser using emscripten, however I don't see anymore detailed guide on how to do this.

Do you have the emcc compilation string you used when you did this which you can share? It would be very much appreciated!

Using relative paths for command line argument does not work

yapesdl, on start, loads a configuration and sets working directory to that in the configuration. That is fine if it is started without arguments, as it resumes from where it was last time.
But, if there is an argument in the command line, it will load/autostart file ONLY if the file is in the path from where yapesdl is started. but, if I put relative path to a file, then it does not work because current directory is changed when configuration is loaded and then relative paths are wrong.
For example, if this is directory structure:

dir1/
     /file1.prg
     /dir2/
          /file2.prg

and shell is in dir1/dir2, this works:
./yapesdl file2.prg
but this does not:
./yapesdl ../file1.prg
Proposed solution: if there is a command line argument, switch working directory to its directory. In the attachment is a patch (made with git diff) that implements this solution and so far works great for me (it probably should have more checks). This will also be convenient if, for example, multi-disk game is started, as selecting next image will be in the same directory, and not somewhere from configuration file.

patch.log

xcode 9.2 build fails

Hi,
Trying to build yapesdl with the xcodeproj file.
I'm having a linker error for a few Cia methods (occuring in vic2mem).
I thought I'd check out the warnings before going after the linker error. I found these repeatedly:

instantiation of variable 'LinkedList<Resettable>::count' required here, but no definition is available

(also for root and last)
So, how come those members of LinkedList are static, is it intentional? One global list per type? Can I ignore this warning? Thanks!

Compile error on Linux x86_64

YapeSDL fails to compile (GCC 7.2.1) for me after this commit (Isolated CIA emulation code )
0fc463e

[michael@manjaro yapesdl]$ make
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c 1541mem.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c archdep.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c cpu.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c dis.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c diskfs.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c dos.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c drive.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c FdcGcr.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c iec.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c interface.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c keyboard.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c keys64.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c main.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c monitor.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c prg.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c SaveState.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c serial.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c Sid.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c sound.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c tape.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c tcbm.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c tedmem.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c tedsound.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c vic2mem.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -c video.cpp
g++ -O3 -w -I/usr/include/SDL2 -D_REENTRANT -o yapesdl -s 1541mem.o archdep.o cpu.o dis.o diskfs.o dos.o drive.o FdcGcr.o iec.o interface.o keyboard.o keys64.o main.o monitor.o prg.o SaveState.o serial.o Sid.o sound.o tape.o tcbm.o tedmem.o tedsound.o vic2mem.o video.o -L/usr/lib -lSDL2
vic2mem.o: In function Vic2mem::~Vic2mem()': vic2mem.cpp:(.text+0x288): undefined reference to Cia::refCount'
vic2mem.o: In function Vic2mem::Read(unsigned int)': vic2mem.cpp:(.text+0x6fd): undefined reference to Cia::read(unsigned int)'
vic2mem.cpp:(.text+0x75c): undefined reference to Cia::read(unsigned int)' vic2mem.cpp:(.text+0x8f8): undefined reference to Cia::read(unsigned int)'
vic2mem.cpp:(.text+0x916): undefined reference to Cia::read(unsigned int)' vic2mem.cpp:(.text+0x9ab): undefined reference to Cia::read(unsigned int)'
vic2mem.o: In function non-virtual thunk to Vic2mem::~Vic2mem()': vic2mem.cpp:(.text+0xad0): undefined reference to Cia::refCount'
vic2mem.o: In function Vic2mem::~Vic2mem()': vic2mem.cpp:(.text+0xb98): undefined reference to Cia::refCount'
vic2mem.o: In function non-virtual thunk to Vic2mem::~Vic2mem()': vic2mem.cpp:(.text+0xc58): undefined reference to Cia::refCount'
vic2mem.o: In function Vic2mem::Reset(bool)': vic2mem.cpp:(.text+0x13c5): undefined reference to Cia::reset()'
vic2mem.cpp:(.text+0x13d1): undefined reference to Cia::reset()' vic2mem.o: In function Vic2mem::Vic2mem()':
vic2mem.cpp:(.text+0x15cc): undefined reference to Cia::refCount' vic2mem.cpp:(.text+0x15d5): undefined reference to Cia::refCount'
vic2mem.cpp:(.text+0x2a10): undefined reference to Cia::reset()' vic2mem.cpp:(.text+0x2a1a): undefined reference to Cia::reset()'
vic2mem.cpp:(.text+0x2d6a): undefined reference to Cia::refCount' vic2mem.o: In function Vic2mem::loadromfromfile(int, char const*, unsigned int)':
vic2mem.cpp:(.text+0x38df): undefined reference to Cia::reset()' vic2mem.cpp:(.text+0x38eb): undefined reference to Cia::reset()'
vic2mem.o: In function Vic2mem::Write(unsigned int, unsigned char)': vic2mem.cpp:(.text+0x4101): undefined reference to Cia::write(unsigned int, unsigned char)'
vic2mem.cpp:(.text+0x48e9): undefined reference to Cia::write(unsigned int, unsigned char)' vic2mem.cpp:(.text+0x4a05): undefined reference to Cia::write(unsigned int, unsigned char)'
vic2mem.o: In function Vic2mem::readState()': vic2mem.cpp:(.text+0x4f9e): undefined reference to Cia::write(unsigned int, unsigned char)'
vic2mem.cpp:(.text+0x4fb4): undefined reference to Cia::write(unsigned int, unsigned char)' vic2mem.o:vic2mem.cpp:(.text+0x5f03): more undefined references to Cia::write(unsigned int, unsigned char)' follow
vic2mem.o: In function Vic2mem::ted_process(unsigned int)': vic2mem.cpp:(.text+0x8a84): undefined reference to Cia::countTimers()'
vic2mem.cpp:(.text+0x8a8e): undefined reference to Cia::countTimers()' vic2mem.cpp:(.text+0x8bf7): undefined reference to Cia::setIRQflag(unsigned int)'
vic2mem.cpp:(.text+0xa2c3): undefined reference to Cia::todUpdate()' vic2mem.cpp:(.text+0xa2cd): undefined reference to Cia::todUpdate()'
vic2mem.o: In function Vic2mem::Read(unsigned int)': vic2mem.cpp:(.text+0x899): undefined reference to Cia::read(unsigned int)'
vic2mem.o: In function Vic2mem::Write(unsigned int, unsigned char)': vic2mem.cpp:(.text+0x409d): undefined reference to Cia::write(unsigned int, unsigned char)'
collect2: error: ld returned 1 exit status
make: *** [Makefile:46: yape] Error 1
[michael@manjaro yapesdl]$

Keyrebindings

In the settings/configure keyboard&jostick I cannot find any useful options like remap the arrow keys ><^ to WASD or to the joystick.

Will this be ever implemented?

If I plug in a joystick its recognized well at the game controller but no way to bind keys to it. It would be very useful in games which dont support joystick at all, DOSbox can do something similar and its great.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.