Categories
C++ Programming Languages

Install Mingw-64 (GCC C/C++) compiler on Windows 10

Download

https://www.mingw-w64.org/downloads/#mingw-builds

Mingw-W64-builds
Mingw-builds

https://sourceforge.net/projects/mingw-w64/

Install (Default setting)

mingw-64-install.exe

C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64

System Environment Variable (Path)

Append the C++ bin folder to System Environment Variable (Path)

Test the C compiler (CMD – Windows Terminal)

gcc –version

Test the Compiler (CMD – Windows Terminal)

g++ –version

Categories
C Programming Languages

Install raylib and Setup Visual Studio Code for Windows

Assumed that MinGW-64 (C/C++ compiler) have been installed and system environment variable (Path) setup.

Download the raylib from GitHub and extract it

https://github.com/raysan5/raylib

Build raylib using make

Using MinGW make a tool, just navigate from the command line to raylib/src/ folder and type:

mingw32-make PLATFORM=PLATFORM_DESKTOP
librarylib.a created mean build has been successful

Project folder structure

Example (main.cpp)

#include "raylib.h"

int main(void)
{
    InitWindow(800, 450, "raylib [core] example - basic window");

    while (!WindowShouldClose())
    {
        BeginDrawing();
            ClearBackground(RAYWHITE);
            DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
        EndDrawing();
    }

    CloseWindow();

    return 0;
}

Makefile

default:   

g++ ../main.cpp -o test.exe -O2 -Wall -Wno-missing-braces -I ../include/ -L ../lib/ -lraylib -lopengl32 -lgdi32 -lwinmm

Run

mingw32-make

Binary (/build)

test.exe

Categories
C Programming Languages

C/C++ Extension for Visual Studio Code Setup

C/C++ Extension

Code Runner Extension

Setup Code Runner (Run in Terminal is Checked)

Program Testing

A simple printf(“Hello to C Programming”); code and to run the code press CTRL + ALT + N

Result: Hello to C Programming

Categories
Love2D and Lua Programming Languages

Installing Lua (64bit) on Window 10

Download site

http://luabinaries.sourceforge.net/download.html

Extract (unzip) the lua-5.x._win64_bin.zip

Unzip (files)

Create a new folder

D:\Program Files\LUA

Copy all the unzip files into this folder

Rename the lua54.exe to lua.exe

Append a new path for lua.exe to the Windows 10 System environment variable path

Launch the Lua 5.x interpreter from command prompt (terminal)

If everything has been done correctly then you see the Lua 5.x.x Copyright (C) otherwise check the system variable environment path again. Note the semcolon ( ; ) entries before and after the path value.

Categories
Love2D and Lua

Love2D Resources

Wikipedia and Documentation API

https://www.love2d.org/wiki/Main_Page

Categories
Love2D and Lua

How LOVE2D Work

LÖVE calls 3 functions. First it calls love.load(). After that it calls love.update() and love.draw(), repeatedly in that order.

So: love.load -> love.update -> love.draw -> love.update -> love.draw -> love.update, etc.

Behind the scenes, LÖVE calls these functions, and we to create them, and fill them with code. This is what we call a callback.

LÖVE is made out of modules, love.graphics, love.audio, love.filesystem. There are about 15 modules, and each module focuses on 1 thing. Everything that you draw is done with love.graphics. And anything with sound is done with love.audio.

Categories
6502 Assembly Language

IDE (Visual Studio Code) Extensions and Online IDE

Beeb VSC

https://marketplace.visualstudio.com/items?itemName=simondotm.beeb-vsc

8bitworkshop

https://8bitworkshop.com/

Categories
6502 Assembly Language

Emulator (Multiplatform)

https://stella-emu.github.io/downloads.html

https://javatari.org/

Categories
6502 Assembly Language

Resources

http://www.6502.org/

https://www.atariarchives.org/

Categories
6502 Assembly Language

Assembly Instructions and Opcodes

Assembly Instructions and Opcodes

http://www.6502.org/tutorials/6502opcodes.html

6502 Cheat Sheets

https://www.chibiakumas.com/6502/CheatSheet.pdf