Search the Community
Showing results for tags 'cross-compiler'.
Found 2 results
I am developing a new language that I have been introducing here: After the Atari 8-bit, I am now targeting it at the 2600. I just posted the first demo here: Here is the source code: unsafe!!! constant reference volatile byte! [ ; TIA VSYNC= ~0000 VBLANK WSYNC COLUBK= ~0009 PF0= ~000D PF1 PF2 GRP0= ~001B GRP1 ENAM0 ENAM1 ENABL ] vertical-sync-bit= %0000'0010 VBLANK: ; Set beam to on to use the entire vertical-blank overscan area ENABL: ; Ball off ENAM1: ENAM0: ; Missiles off GRP1: GRP0: ; Players off PF2: PF1: PF0: 0 ; Playfield off; we only use the background byte! [jiffies colour] forever [ VSYNC: WSYNC: vertical-sync-bit ; Wait for end of scanline, then start vertical sync ; Vertical sync pulse. ; This lasts 3 scanlines, where some small work can be done to set up the next screen. colour: jiffies ; Begin colour gradient, shifted by jiffy counter ; Wait three scanlines, then end vertical sync, continue vertical blank VSYNC: WSYNC: WSYNC: WSYNC: 0 ; Vertical blank area, followed by the visible display area, ; followed by another vertical-blank overscan area. ; PAL and SECAM officially have 45 + 228 + 36 scanlines here, NTSC has 37 + 192 + 30. ; We generate 283 scanlines (plus the 3 for vertical sync), for a display frequency of 55Hz, ; inbetween PAL/SECAM and NTSC. It will work on all, if you have a tolerant television set. ; The first scanline is used for the setup overhead of the LOOP, ; so it gets the last colour wrapped over from the last scanline of the previous screen. ; Being the first line of the vertical blank overscan area, it is normally not visible. loop 282 [COLUBK: WSYNC: overflow increment colour] ; Increment background colour for every scanline overflow increment jiffies ] Here are some artifacts of the compilation. The assembler listing: https://language.meta.frl/examples/platforms/Atari/2600/rainbow.list A VICE labels file, for debuggers: https://language.meta.frl/examples/platforms/Atari/2600/rainbow.labels The memory sections map: https://language.meta.frl/examples/platforms/Atari/2600/rainbow.map It's my second 2600 program; please be gentle. 😁 The language will be cross-platform on as many systems as possible. 2600 programs are developed by cross-compiling. In many cases, it is also needed to pre-compute data for a 2600 program. You will be able to write such tools in the same language, on your PC or Mac or other favourite system.
ok, so I'm working on a cross-compiler for my own little high-level language called b99. The language is kinda similar to Pascal or ADA. The target is to create software in b99, compile and then assemble the TMS9900 assembly source code. It uses my spectra2 library as its runtime. So the program will run on a bare console, no 32K memory expansion required. It's still very early work (started in january), so I'm not releasing the compiler yet. The compiler itself is written in perl (using Parse::RecDescent as parsing module) Language constructs are subject to change as I'm playing around and doing funky stuff sndtest.b99 : Here's a little b99 music demo. Tunes converted by @OLD CS1 Here I am using multiple cartridge menu entries, some labels and the play sound command. Note that I make use of resources (e.g. binary files that are automatically dumped to byte statements). The idle command is used for passing control to the runtime library kernel. This is what starts the tune. sndtest.a99 : The resulting assembly source code ... and this is the cartridge binary you can run in classic99 or on the real deal: CART.bin