All Projects → tebe6502 → Mad-Pascal

tebe6502 / Mad-Pascal

Licence: other
Mad Pascal Compiler for 6502 (Atari XE/XL, C64, C4Plus)

Programming Languages

pascal
1382 projects
HTML
75241 projects
assembly
5116 projects
python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to Mad-Pascal

atari64
Commodore 64 OS running on Atari 8-bit hardware
Stars: ✭ 133 (+189.13%)
Mutual labels:  c64, 6502, atari800
cbmtapepi
Use a Raspberry Pi as fast mass storage solution for your Commodore 8-bit computer using just the datassette port.
Stars: ✭ 41 (-10.87%)
Mutual labels:  c64, 8-bit, 6502
c64adventures
Adventures into retro 8 bit Commodore 64 programming
Stars: ✭ 14 (-69.57%)
Mutual labels:  c64, 8-bit, 6502
apultra
Free open-source compressor for apLib with 5-7% better ratios
Stars: ✭ 84 (+82.61%)
Mutual labels:  c64, 8-bit, 6502
basicv2
A Commodore (CBM) BASIC V2 interpreter/compiler written in Java
Stars: ✭ 73 (+58.7%)
Mutual labels:  c64, 6502
salvador
A free, open-source compressor for the ZX0 format
Stars: ✭ 35 (-23.91%)
Mutual labels:  c64, 8-bit
VolksForth
volksFORTH is a 16bit Forth System maintained by the German Forth Gesellschaft e.V.
Stars: ✭ 41 (-10.87%)
Mutual labels:  c64, atarixl
6502-npp-syntax
Notepad++ Syntax Highlighting for 6502 Assembly (and NESASM)
Stars: ✭ 21 (-54.35%)
Mutual labels:  c64, 6502
retro-computing
🤓🕹💾 This hobby project contains software implementations of old microprocessors and complete computer systems. I'm very interested in retrocomputing and this is how I learn about the inner workings of these old, classic and amazing computers and game consoles.
Stars: ✭ 15 (-67.39%)
Mutual labels:  c64, 6502
cc64
cc64 is a small-C compiler written in Forth, hosted on the Commodore C64, Plus4 and C16 with 64k, and on the Commander X16. It is targeting the 6502 CPU.
Stars: ✭ 57 (+23.91%)
Mutual labels:  c64, 6502
c64-game
A horizontal space shooter for Commodore 64.
Stars: ✭ 17 (-63.04%)
Mutual labels:  c64, 6502
6502.Net
A .Net-based Cross-Assembler for Several 8-Bit Microprocessors
Stars: ✭ 44 (-4.35%)
Mutual labels:  8-bit, 6502
fastbasic
FastBasic - Fast BASIC interpreter for the Atari 8-bit computers
Stars: ✭ 108 (+134.78%)
Mutual labels:  6502, atarixl
retrore
A curated list of original and reverse-engineered vintage 6502 game sourcecode.
Stars: ✭ 22 (-52.17%)
Mutual labels:  c64, 6502
izapple2
Portable emulator of an Apple ][+ or //e. Written in Go. Runs Total Replay.
Stars: ✭ 27 (-41.3%)
Mutual labels:  6502
elite-a-beebasm
Fully documented and annotated source code for Angus Duggan's Elite-A on the BBC Micro
Stars: ✭ 24 (-47.83%)
Mutual labels:  6502
openNES-Snake
Simple rebuilt of the classic Snake game for the NES in C using the cc65 cross compiler.
Stars: ✭ 18 (-60.87%)
Mutual labels:  6502
mandelbrot
Mandelbrot set drawers for vintage hardware
Stars: ✭ 15 (-67.39%)
Mutual labels:  c64
kernal64
A Scala Commodore 64, 128, VIC20, CBM2 and SuperCPU emulator
Stars: ✭ 87 (+89.13%)
Mutual labels:  6502
Fearless-NES
A NES emulator written in Rust
Stars: ✭ 112 (+143.48%)
Mutual labels:  6502

Mad-Pascal

Doc PL

Doc ENG

Introduction

Mad-Pascal (MP) is a 32-bit Turbo Pascal compiler for Atari XE/XL. By design, it is compatible with the Free Pascal Compilator (FPC) (the -MDelphi switch should be active), which means the possibility of obtaining executable code for XE/XL, PC and every other platform for which FPC exists. MP is not a port of FPC; it has been written based on of SUB-Pascal (2009), XD-Pascal (2010), the author of which is Vasiliy Tereshkov.

A program that works on Atari might have problems on PC if, for example, the pointers have not been initialized with the address of a variable and the program attempts to write to the address $0000 (memory protection fault). The strengths of MP include fast and convenient possibility of inclusion of inline assembly. A program using inline ASM does not work on platforms other than XE/XL. MP uses 64KB of primary memory; TMemoryStream provides usage of extended memory. Variable allocation is static; there is no dynamic memory management. Parameters are passed to functions by value, variable or constant.

The available features are:

  • If Case For To For In While Repeat statements
  • Compound statements
  • Label Goto statements
  • Arithmetic and boolean operators
  • Procedures and functions with up to 8 parameters. Returned value of a function is assigned to a predefined RESULT variable
  • Static local variables
  • Primitive data types, all types except the ShortReal/Real type are compatible. Pointers are dereferenced as pointers to Word:
    • Cardinal Word Byte Boolean
    • Integer SmallInt ShortInt
    • Char String PChar
    • Pointer File Text
    • ShortReal Real (fixed-point)
    • Float16
    • Single
  • One-dimensional and Two-dimensional arrays (with zero lower bound) of any primitive type. Arrays are treated as pointers to their origins (like in C) and can be passed to subroutines as parameters
  • Predefined type String [N] which is equivalent to array [0..N] of Char
  • Type aliases.
  • Records
  • Objects
  • Separate program modules
  • Recursion

Usage

Mad Pascal i Geany

mp.exe filename.pas
mads.exe filename.a65 -x -i:base

BAT

<MadPascalPath>\MP.exe %1 -ipath:<MadPascalPath>\lib -ipath:<MadPascalPath>\blibs

if exist %~dp1%~n1.a65 (
    mads.exe "%~dp1%~n1.a65" -xli:<MadPascalPath>\base
    if exist "%~dp1%~n1.obx" altirra "%~dp1%~n1.obx"
)

Tools

MadStrap

Simple Atari Mad-Pascal common project bootstrap.

Source code at GitLab

BLIBS

Set of custom libraries for MadPascal.

Lastest documentation always at GitLab

pasdoc

Custom tool for generating documentation from pascal comments in units.

Source code at GitLab

Effectus - Action! compiler

In new version the source code is generated by using Mad Pascal cross-compiler, which is further compiled to binary code with Mad Assembler.

Game tutorial

Simple game tutorial by using Mad Pascal

FiDL

Display List program editor for 8-bit Atari ANTIC chipset

CutAs

Simple binary data manipulation tool written in javascript (export to Action!, Assembler, C, Pascal)

Bocianu's Atari Toolkit HUB

CutAs, FiDL, SprED, Sprite XL

Projects in Mad-Pascal

Benchmarks

CC65 Mad Pascal Millfork
Sieve (less is better) 602 577 579
YoshPlus (higher is better) 41933 41933 41933
Chessboard (higher is better) 76 88 82

https://github.com/tebe6502/Mad-Pascal/blob/master/samples/benchmark.7z

Floating Point

iteration x 256 Atari OS FastChip MP Single MP Real
add, sub, mul, div 232 118 64 99
add, sub, mul, div, sin, cos 5820 2915 3728 1231
  • MP Single: IEEE754-32bit
  • MP Real: Q24.8 Fixed Point

https://github.com/tebe6502/Mad-Pascal/blob/master/samples/fp_benchmark.7z

Suite

suite-animation

sources

Links

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].