Git Product home page Git Product logo

vectrexy's Introduction

Vectrexy

Vectrexy is a Vectrex emulator programmed in C++.

This project is open source and available on GitHub: https://github.com/amaiorano/vectrexy

Download Latest Build

Build status master branch status


Hosted By: Cloudsmith

Package repository hosting is graciously provided by Cloudsmith. Cloudsmith is the only fully hosted, cloud-native, universal package management solution, that enables your organization to create, store and share packages in any format, to any place, with total confidence.

Twitch Development

I regularly stream part of the development on Twitch right here. Follow me to know when I'm streaming!

Compatibility

See the Vectrexy Compatibility List for the list of games that Vectrexy can run.

Controls

Devices Player 1 Player 2
No gamepads Keyboard N/A
1 gamepad Gamepad 1 Keyboard
2 gamepads Gamepad 1 Gamepad 2

Keyboard key bindings: ASDF + Arrow keys

Overlays

The Vectrex display is black & white, so to add color, each game cartridge came with a transparent colored overlay that would be slotted in front of the screen. For emulation purposes, you should be able to find png files for these overlays. If you place these png file in the data/overlays folder, Vectrexy will attempt to match the rom's file name to the overlay name using "fuzzy" string matching (in other words, the file names do not need to match exactly).

What's a Vectrex and why did you write this emulator?

The Vectrex is a really cool and unique video game console that was released in 1982. What made it unique was that it came with its own screen and displayed vector-based graphics, rather than the typical sprite/raster based graphics of most game consoles. My uncle had gotten me a Vectrex when I was only 8 years old, and I still have it, and it's still awesome.

Credits

Although the emulator core is written by me, Antonio Maiorano (Daroou2), it makes use of third party libraries, and is packaged with overlays created by other people. I hope I've got everyone covered here; if not, please let me know and I'll be happy to correct this list.

Building the code

Windows

Install:

Clone and build vectrexy using CMake:

git clone --recursive https://github.com/amaiorano/vectrexy.git
cd vectrexy
mkdir build && cd build
cmake ..
cmake --build .

Ubuntu

Install:

Install a compiler and some Linux-specific libs we depend on:

sudo apt-get install g++-8 libgtk2.0-dev

SDL2 has many dependencies, some of which you may need to install:

# SDL static lib dependencies (see https://hg.libsdl.org/SDL/file/default/docs/README-linux.md)
# Alternatively, you can just 'apt-get libsdl2-dev' to build against the dynamic library

sudo apt-get install build-essential mercurial make cmake autoconf automake libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev fcitx-libs-dev libsamplerate0-dev libsndio-dev

Clone and build vectrexy using CMake:

git clone --recursive https://github.com/amaiorano/vectrexy.git
cd vectrexy
mkdir build && cd build
cmake ..
cmake --build .

Extra CMake Build Args

Use -D<VAR_NAME>=<VALUE> from the CMake CLI, or use cmake-gui to set these.

BUILD_SHARED_LIBS=on|off (Default: off)

If enabled, builds a DLL/.so version.

NOTE: On Windows, vcpkg's "static" triplets (e.g. x64-windows-static) create static libs that link against the static CRT (/MT), while CMake generates shared library builds that link against the dynamic CRT (/MD). Thus, when building, the linker will emit: LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library. You can ignore this for the most part; however, you can fix this warning by creating a custom vcpkg triplet, e.g. x64-windows-static-md.cmake, that is a copy of x64-windows-static.cmake, except with set(VCPKG_CRT_LINKAGE dynamic). If you use this triplet to build dependencies with vcpkg, and specify it as CMake's VCPKG_TARGET_TRIPLET, all libraries will use the dynamic CRT, and no warning will be emitted by the linker.

DEBUG_UI=on|off (Default: on)

If enabled, the in-game debug UI can be displayed. Mostly useful for development.

ENGINE_TYPE=null|sdl (Default: sdl)

The type of engine to use. By default, SDL is used. If "null" is specified, the emulator will execute without any audio or visuals; however, the debugger will work, which can be useful for testing the emulator, or as a starting point for a new engine type.

Contributing

As the emulator is still in early stages of development, I generally won't be looking at or accepting pull requests. Once the project has matured enough, this will likely change. If you wish, follow my stream and make suggestions in chat instead.

vectrexy's People

Contributors

amaiorano 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  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  avatar

vectrexy's Issues

Embed version number in code, not just in version.txt?

Got this error playing Omega Chase just now:

Root path set to: C:\Users\root\Downloads\Vector Emulation\vectrexy_latest
Found overlay for C:\Users\root\Downloads\Vector Emulation\vectrexy_latest\roms\Omega Chase (Final Version) (1998) (PD).vec: C:\Users\root\Downloads\Vector Emulation\vectrexy_latest\overlays\2_vectrexworld\Omega Chase (Final Version) (1998) (PD).png
Exception caught:
Assertion Failed!
Condition: false
File: c:\projects\vectrexy\src\via.cpp(318)
Message: A without handshake not implemented yet

[$3e96] dcde LDD $de DP:(PC) = $d0de $d0de->$0 99999 A$01|B$40|X$071a|Y$ca4d|U$ca6b|S$cbe6|DP$d0|eFHInzvc
$3e98 (step)>

It might be helpful to you to print the version number of the build with this information?

(btw it was v0.0.0-510-gf0e34ad )

support for using mouse as an analog joystick?

Would you consider adding the option to use the mouse as an analog joystick? When the mouse is over the emulated screen, map the mouse position relative to the left/right and top/bottom of the screen to -128/127... freeze the value when the mouse moves out of the emulated display area. Hide the OS mouse cursor when it is over the emulated display area.

The mechanism has been tested in vecx and vide and works acceptably well, and allows emulators to play games that require an analog joystick. (for example http://gtoal.com/vectrex/wangle/wangle02a.bin or http://gtoal.com/vectrex/unblockme/unblockme.bin )

There's an analog joystick test program at http://gtoal.com/vectrex/joystick/

regards,

Graham

Vectors do not draw on my system

The program appears to start and run on my Windows10 Home (on an HP portable) but no vectors are drawn. However the overlays are drawn. Let me know what information/testing you need to narrow this down.

ASL overflow flag

Hi, just found this video series and am enjoying it so far! I was watching episode one and noticed that the overflow flag calculation for OpASL is wrong:

        CC.Overflow = (origValue >> 7) ^ (origValue >> 6);

origValue >> 6 needs to be masked or you'll set the overflow flag when it shouldn't be. For example if origValue is 0b11000000, then you'll get 1 ^ 3 == 2 instead of 1 ^ 1 == 0.

GCE Test Rom V4 breaks into debugger

Vectrexy v0.0.0-720-gb68337f breaks into the debugger on running the DAC offset test.

[Unsupported] ShiftRegisterMode expected to only support ShiftOutUnder02
Exception caught:
Assertion Failed!
Condition: AuxCntl::GetTimer2Mode(value) == TimerMode::OneShot
File: D:\a\vectrexy\vectrexy\libs\emulator\src\Via.cpp(435)
Message: t2 assumed always on one-shot mode

[$0190] d70b STB $0b DP:(PC) = $d00b $d00b<-$b6 0 A$1f|B$b6|X$fbb4|Y$0000|U$01f0|S$cbe8|DP$d0|eFHInzvc
*[$0192] 4a DECA (step)>

By the way it would be useful to put the Vectrexy version number in the Help/About Vectrexy box as the only place it can be found is in the window title which is text that cannot be cut & pasted in Windows.

The test rom code can be seen at https://gtoal.com/vectrex/disassemblies/TestRev4.asm

L018B LDD #$1FB6 ; 018B: CC 1F B6
STA <VIA_port_b ; 018E: 97 00
STB <VIA_aux_cntl ; 0190: D7 0B
DECA ; 0192: 4A
BSR L01BE ; 0193: 8D 29

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.