Page 1 of 7

at67 emulator

Posted: 16 Nov 2018, 07:35
by Maniccyberdog
Hi,

I have made some progress on at67 emulator and now have it compiling under windows. My next problem to solve is the message ‘CPU stall...’ keeps being echoed to the screen, has anyone else seen this?

Re: at67 emulator

Posted: 16 Nov 2018, 14:49
by Maniccyberdog
Some progress made; I can see the start menu!

Download SDL (https://www.libsdl.org/download-2.0.php Windows VC Libs) and at67 from github
Create a folder c:\gtEMU and place at67 files in it.
Create a folder c:\gtEMU\SDL and place the SDL files in it

CMake;

Point the source code to c:\gtEMU
Point the build to binaries to c:\gtEMU\VS_Project
Press Configure

Set;
SDLMAIN_LIBRARY to C:/gtEmu/SDL/lib/x86/SDL2MAIN.lib
SDL2_INCLUDE_DIR to C:/gtEmu/SDL/include
SDL2_LIBRARY to C:/gtEmu/SDL/lib/x86/SDL2.lib

If you get asked about a SDLtemp set this to C:/gtEmu/SDL/lib/x86/SDL2.lib
Press Generate
Press Open Project


Change under Properties for the gtemuSDL (right click in solution Explorer)
Configuration Properties > Linker > Input (Hit dropdown button, select edit, enter ..\SDL\lib\x86\SDL2.lib ..\SDL\lib\x86\SDL2main.lib in top box if required)

Configuration Properties > Linker > System > Subsystem : Console (/SUBSYSTEM:CONSOLE)

in cpu.cpp change line that reads 'if(!AllocConsole()) return;' to '\\if(!AllocConsole()) return;' ie comment this out (just under the #if def _WIN32)

Now build the project

C:\gtEmu\vs_project\Debug will now contain gtemuSDL.exe
Add these files;
SDL2.dll
graphics_config.ini
high_scores.ini
input_config.ini
loader_config.ini

On one of my PCs it would not run in windowed mode, change this in graphics_config.ini

I think that was it, I'll do some more testing and see if I can make an exe available.

Re: at67 emulator

Posted: 16 Nov 2018, 17:37
by Maniccyberdog
Tested on Win 10, just unzip

Re: at67 emulator

Posted: 18 Nov 2018, 16:26
by bmwtcu
Thanks MCD for compiling it.

This might be more a question for at76. It looks like the emulator emulates PS2 keyboard entry, but does it also work with the save/CTRL-F3 mechanism to save BASIC programs? I tried and while save seems to have done something, when I tried CTRL-F3, it didn't look like it worked.

Thanks.

Re: at67 emulator

Posted: 18 Nov 2018, 17:22
by Maniccyberdog
I would like to add an editor for vasm code, so that I have more of an IDE. Saving BASIC would also be cool.

Re: at67 emulator

Posted: 18 Nov 2018, 19:51
by marcelk
bmwtcu wrote: ↑18 Nov 2018, 16:26 This might be more a question for at76. It looks like the emulator emulates PS2 keyboard entry, but does it also work with the save/CTRL-F3 mechanism to save BASIC programs? I tried and while save seems to have done something, when I tried CTRL-F3, it didn't look like it worked.
Pluggy McPlugface runs BabelFish. None of the emulators I know of do any of the BabelFish stuff regarding PS/2 handling.There's quite a bit that goes on there to make it work smooth with real keyboards and to map the game controller signals properly. Most just put ASCII codes directly into the emulated input register IN, and ignore the vPulse modulation of ROM v3 to send data back. An easy way to check if BabelFish is involved is to start Loader and typing Ctrl-F1...

Also the javascript emulator on our website doesn't do anything that advanced.

Re: at67 emulator

Posted: 18 Nov 2018, 22:59
by marcelk
Maniccyberdog wrote: ↑16 Nov 2018, 17:37 Tested on Win 10, just unzip
GREAT WORK!

I dug up an Asus Eeepc with Windows 7 on it that has been collecting dust for years, and I managed to get it running there. Initially there was a pop-up about missing MSVCP140.dll.

Instead of downloading that from a dll site, as many Internet postings advice, I downloaded "Visual C++ Redistributable for Visual Studio 2015" from microsoft.com. It's a 13 MB download called vc_redist.x86 (Sorry, no links, I'm typing this on the other computer.)

I ran that download with right-click and "Run as administrator" and it installed some stuff after an extremely long "Initializing..." phase.
After that "gtemuSDL_release" opened successfully with the Gigatron startup screen and menu! This is the first time I see at67's tool other than in a youtube video.

There're some quirks. It's reaching 96% speed if I interpret the indicator correctly, but 36 fps? It defaults to a non-standard 64K and the the startup sound is choppy (probably due to the speed). I haven't figured out much the controls. F11 switches between controlling the Gigatron and the hex editor. Delete, PageDown and PageUp seem to be mapped to the correct game controller signals. The emulation of video mode 2 looks quite messy.

P.S: It wouldn't run on wine on my Mac (and I didn't really expect that to be honest).

P.S.2: Do you have a GitHub account? I think we should archive the zip file in Contrib/<yourname> instead of just in a forum post.

Re: at67 emulator

Posted: 18 Nov 2018, 23:05
by bmwtcu
I haven't figured out much the controls.
If you hit "h", it pulls up the help file that explains the various modes and key mappings.

Re: at67 emulator

Posted: 19 Nov 2018, 01:53
by at67
Never download unknown code, shared libraries/DLL's or executables from the internet, even if from a well meaning and/or previously reliable source, (they might not even know their PC is infected). Always build the code yourself on your own PC.

Here are the step by step instructions for Windows, I will post Linux instructions shortly:

Code: Select all

This is for Windows10 x64 and Visual Studio15 or Visual Studio17

- Clone or download https://github.com/at67/gigatron-rom

- Download and install cmake and cmake-gui 3.07 or higher

- Download sdl2 development libraries https://www.libsdl.org/release/SDL2-devel-2.0.9-VC.zip

- Install at67/gigatron-rom to a directory:
e.g. "D:\Projects\Gigatron TTL\test\gigatron-rom"

- Install SDL2 to a directory:
e.g. "D:\Projects\Gigatron TTL\test\SDL2-2.0.9"

- Run cmake-gui

- Browse to the source code and select the source folder:
e.g. "D:\Projects\Gigatron TTL\test\gigatron-rom\Contrib/at67"

- Browse to the binaries folder and select the build folder:
e.g. "D:\Projects\Gigatron TTL\test\build"

**Optional** if you want to be able to develop using SDL2 without having to configure the include and lib variables for each new project, then just add a new environment variable pointing to SDL2 development libraries, (this is the preferred way):
- Type "env" in the windows search bar
- Click "Edit the system environment variables"
- Click "Environment Variables"
- Click "New" under user variables
- "Variable name" = "SDL2DIR"
- "Variable value" = "D:\Projects\Gigatron TTL\test\SDL2-2.0.9"

- Press "Configure", cmake should perform it's magic and find SDL2 using the environment variable you set above.

If for whatever reason you skip the environment variable step above then you will receive an error from the FindSDL2.cmake script. In this case you will need to manually set the SDL2_INCLUDE_DIR variable and SDL2_LIBRARY_TEMP variable under the SDL2 entry and the SDL2MAIN_LIBRARY variable under the Ungrouped Entries, (they will be marked in red).
- "SDL2_INCLUDE_DIR" = "D:\Projects\Gigatron TTL\test\SDL2-2.0.9\include"
- "SDL2_LIBRARY_TEMP" = "D:\Projects\Gigatron TTL\test\SDL2-2.0.9\lib\x64\SDL2.lib"
- "SDL2MAIN_LIBRARY" = "D:\Projects\Gigatron TTL\test\SDL2-2.0.9\lib\x64\SDL2main.lib"

- Press "Generate"

- Press "Open Project"

- Select "Release" "x64"

- Select "Build Solution"

The project should compile all tools and executables without warnings or errors.

- Copy "D:\Projects\Gigatron TTL\test\SDL2-2.0.9\lib\x64\SDL2.dll" to "D:\Projects\Gigatron TTL\test\build\Release"

- Set gtemuSDL as the Startup Project, (right click on gtemuSDL and select "Set as Startup Project"

- Hit CTRL + F5

Re: at67 emulator

Posted: 19 Nov 2018, 02:16
by at67
Linux installation instructions, (tested under Ubuntu 18.04.1 LTS under a VM):

Code: Select all

- Open a terminal/console window.

- sudo apt-get install g++

- sudo apt-get install git

- sudo apt-get install cmake

- sudo apt-get install cmake-gui

- sudo apt-get install libsdl2-dev

- git clone https://github.com/at67/gigatron-rom

- cmake-gui

- Browse Source:
e.g. /home/linux/gigatron-rom/Contrib/at67

- Browse Build:
e.g. /home/linux/gigatron-rom/build

- Press Configure and then Finish

- Press Generate

- Exit cmake-gui

- Change directory to build directory
e.g. cd /home/linux/gigatron-rom/build

- make

- ./gtemuSDL