applesoft_basic.git
5 months agoAdd /deps.sh, in /linapple remove full-screen mode to make it run properly on recent... master
Nick Downing [Tue, 14 Nov 2023 02:01:14 +0000 (13:01 +1100)]
Add /deps.sh, in /linapple remove full-screen mode to make it run properly on recent X server

5 months agoAdd forgotten /util directory, forgotten files /terminal/gr_terminal.asm and /termina...
Nick Downing [Tue, 14 Nov 2023 02:49:29 +0000 (13:49 +1100)]
Add forgotten /util directory, forgotten files /terminal/gr_terminal.asm and /terminal/gr_terminal_asm.txt, new .gitignore entries for /orig

22 months agoImplement text mode and make soft switches more generic (no split screen yet)
Nick Downing [Fri, 3 Jun 2022 13:01:54 +0000 (23:01 +1000)]
Implement text mode and make soft switches more generic (no split screen yet)

22 months agoImprove ROMs handling for the emulator, add CG ROM (not used yet)
Nick Downing [Thu, 2 Jun 2022 23:33:38 +0000 (09:33 +1000)]
Improve ROMs handling for the emulator, add CG ROM (not used yet)

23 months agoMake ctrl-c available all the time, improve cleanup to reset scrolling region
Nick Downing [Thu, 26 May 2022 08:20:06 +0000 (18:20 +1000)]
Make ctrl-c available all the time, improve cleanup to reset scrolling region

23 months agoAdd a convenience script for each game showing how to launch it, with comments
Nick Downing [Thu, 26 May 2022 07:52:26 +0000 (17:52 +1000)]
Add a convenience script for each game showing how to launch it, with comments

23 months agoRefactor CALL implementation, to auto-detect tone routine, and be more readable
Nick Downing [Thu, 26 May 2022 05:28:38 +0000 (15:28 +1000)]
Refactor CALL implementation, to auto-detect tone routine, and be more readable

23 months agoMove tone.obj and bootable.dsk generation into /util instead of duplicating
Nick Downing [Thu, 26 May 2022 04:50:12 +0000 (14:50 +1000)]
Move tone.obj and bootable.dsk generation into /util instead of duplicating

23 months agoRename /hrcg to /terminal and terminal* to hrcg_terminal*, add forgotten script
Nick Downing [Thu, 26 May 2022 04:36:18 +0000 (14:36 +1000)]
Rename /hrcg to /terminal and terminal* to hrcg_terminal*, add forgotten script

23 months agoImprove emulator keyboard handling to make shift work, enable cursor by default
Nick Downing [Thu, 26 May 2022 01:46:10 +0000 (11:46 +1000)]
Improve emulator keyboard handling to make shift work, enable cursor by default

23 months agoIn pty code, fix file handle leaks, add session stuff and termios configuration
Nick Downing [Thu, 26 May 2022 01:01:32 +0000 (11:01 +1000)]
In pty code, fix file handle leaks, add session stuff and termios configuration

23 months agoLet HRCG terminal run a child process, with pty for bidirectional communication
Nick Downing [Wed, 25 May 2022 16:18:55 +0000 (02:18 +1000)]
Let HRCG terminal run a child process, with pty for bidirectional communication

23 months agoMake HRCG cursor blink, fix some timing/lagginess issues in emulator
Nick Downing [Wed, 25 May 2022 13:27:18 +0000 (23:27 +1000)]
Make HRCG cursor blink, fix some timing/lagginess issues in emulator

23 months agoAdd cursor in HRCG, not blinking yet
Nick Downing [Wed, 25 May 2022 12:31:12 +0000 (22:31 +1000)]
Add cursor in HRCG, not blinking yet

23 months agoTuning ribbit slightly
Nick Downing [Wed, 25 May 2022 08:13:39 +0000 (18:13 +1000)]
Tuning ribbit slightly

23 months agoHRCG and joystick improvements, can now play ribbit game (still a bit rough)
Nick Downing [Wed, 25 May 2022 07:35:03 +0000 (17:35 +1000)]
HRCG and joystick improvements, can now play ribbit game (still a bit rough)

23 months agoImplement HTAB and VTAB in HRCG terminal, fix character set addressing error
Nick Downing [Wed, 25 May 2022 05:18:36 +0000 (15:18 +1000)]
Implement HTAB and VTAB in HRCG terminal, fix character set addressing error

23 months agoImplement 16-color palette and averaging, for a more realistic NTSC display
Nick Downing [Wed, 25 May 2022 03:42:57 +0000 (13:42 +1000)]
Implement 16-color palette and averaging, for a more realistic NTSC display

23 months agoAdd basic HRCG terminal program (cut-down emulated apple running HRCG for now)
Nick Downing [Wed, 25 May 2022 00:56:51 +0000 (10:56 +1000)]
Add basic HRCG terminal program (cut-down emulated apple running HRCG for now)

23 months agoAdd HRCG, for now just extract a BLOADable image, to avoid dealing with R files
Nick Downing [Tue, 24 May 2022 13:03:34 +0000 (23:03 +1000)]
Add HRCG, for now just extract a BLOADable image, to avoid dealing with R files

23 months agoAdd ribbit, and various language features needed to make it parse and execute
Nick Downing [Tue, 24 May 2022 11:44:39 +0000 (21:44 +1000)]
Add ribbit, and various language features needed to make it parse and execute

23 months agoDetect common patterns involving PEEK(-16336) and convert to tones (roughly)
Nick Downing [Tue, 24 May 2022 10:57:09 +0000 (20:57 +1000)]
Detect common patterns involving PEEK(-16336) and convert to tones (roughly)

23 months agoQuick little brick out patch which makes the game playable without inter-statement...
Nick Downing [Tue, 24 May 2022 09:36:56 +0000 (19:36 +1000)]
Quick little brick out patch which makes the game playable without inter-statement delay (and makes paddle remain responsive by checking it during the delay)

23 months agoAdd little brick out
Nick Downing [Tue, 24 May 2022 07:42:53 +0000 (17:42 +1000)]
Add little brick out

23 months agoChange lemonade_tone_patched to lemonade_tone and LEMONADE TONE PATCHED to LEMONADE...
Nick Downing [Tue, 24 May 2022 08:05:24 +0000 (18:05 +1000)]
Change lemonade_tone_patched to lemonade_tone and LEMONADE TONE PATCHED to LEMONADE TONE everywhere (just trim disassembly instead of patching out null bytes)

23 months agoChange lemonade_tone_nick to tone and LEMONADE TONE NICK to TONE everywhere
Nick Downing [Tue, 24 May 2022 07:49:36 +0000 (17:49 +1000)]
Change lemonade_tone_nick to tone and LEMONADE TONE NICK to TONE everywhere

23 months agoFix error in text() escape sequence leading to incorrect window after quitting
Nick Downing [Tue, 24 May 2022 07:34:05 +0000 (17:34 +1000)]
Fix error in text() escape sequence leading to incorrect window after quitting

23 months agoAdd inter-statement delay, fix an oversight regarding POKEs to CH, CV, INVFLG
Nick Downing [Tue, 24 May 2022 07:29:08 +0000 (17:29 +1000)]
Add inter-statement delay, fix an oversight regarding POKEs to CH, CV, INVFLG

23 months agoImplement a heuristic to detect delay loops, can now play unpatched lemonade
Nick Downing [Tue, 24 May 2022 04:39:13 +0000 (14:39 +1000)]
Implement a heuristic to detect delay loops, can now play unpatched lemonade

23 months agoImplement the ability to update text screen with GR commands and vice versa
Nick Downing [Tue, 24 May 2022 04:27:47 +0000 (14:27 +1000)]
Implement the ability to update text screen with GR commands and vice versa

23 months agoImplement a new gr_encode() routine containing most of the logic of gr_update()
Nick Downing [Tue, 24 May 2022 03:20:24 +0000 (13:20 +1000)]
Implement a new gr_encode() routine containing most of the logic of gr_update()

23 months agoImplement zero-page emulation for normal/inverse/flash (to help GR emulation)
Nick Downing [Tue, 24 May 2022 02:45:53 +0000 (12:45 +1000)]
Implement zero-page emulation for normal/inverse/flash (to help GR emulation)

23 months agoEliminate gr_mem, instead emulate the proper memory layout in ordinary memory
Nick Downing [Mon, 23 May 2022 23:57:57 +0000 (09:57 +1000)]
Eliminate gr_mem, instead emulate the proper memory layout in ordinary memory

23 months agoImprove the console emulation a bit, can now run little brick out (but the gameplay...
Nick Downing [Mon, 23 May 2022 23:34:02 +0000 (09:34 +1000)]
Improve the console emulation a bit, can now run little brick out (but the gameplay is not right because we do not emulate text/gr screen memory at the moment)

23 months agoAdd joystick support, and keyboard ready-polling support via HW_IOADR
Nick Downing [Mon, 23 May 2022 11:46:32 +0000 (21:46 +1000)]
Add joystick support, and keyboard ready-polling support via HW_IOADR

23 months agoImplement lightning flash in apple_io.py
Nick Downing [Sun, 22 May 2022 12:00:25 +0000 (22:00 +1000)]
Implement lightning flash in apple_io.py

23 months agoImprove VAL() backend and handling of invalid numbers in INPUT/READ statements
Nick Downing [Sun, 22 May 2022 11:40:32 +0000 (21:40 +1000)]
Improve VAL() backend and handling of invalid numbers in INPUT/READ statements

23 months agoFurther improvement to terminal emulation, makes scrolling window work properly
Nick Downing [Sun, 22 May 2022 09:58:49 +0000 (19:58 +1000)]
Further improvement to terminal emulation, makes scrolling window work properly

23 months agoImplement simulated LOMEM and HIMEM, add memory size check in patched lemonade
Nick Downing [Sun, 22 May 2022 06:50:32 +0000 (16:50 +1000)]
Implement simulated LOMEM and HIMEM, add memory size check in patched lemonade

23 months agoImprove PCM audio by reducing framesize (so that latency is 0.01s) and adding a call...
Nick Downing [Sun, 22 May 2022 06:37:20 +0000 (16:37 +1000)]
Improve PCM audio by reducing framesize (so that latency is 0.01s) and adding a call to snd_pcm_drain(), we can only do this by opening/closing PCM each time

23 months agoImprove terminal emulation (window left/right etc), allow selectable beep style
Nick Downing [Sun, 22 May 2022 01:04:31 +0000 (11:04 +1000)]
Improve terminal emulation (window left/right etc), allow selectable beep style

23 months agoMake GR graphics single width by default, use --gr-width=2 for old behaviour
Nick Downing [Sun, 22 May 2022 00:19:53 +0000 (10:19 +1000)]
Make GR graphics single width by default, use --gr-width=2 for old behaviour

23 months agoCalibrate FOR/NEXT delay loops, change delay loops to CALLRE in patched version
Nick Downing [Sat, 21 May 2022 08:33:29 +0000 (18:33 +1000)]
Calibrate FOR/NEXT delay loops, change delay loops to CALLRE in patched version

23 months agoImplement the new music in /apple_io.py as well, for running under emulation
Nick Downing [Fri, 20 May 2022 18:08:31 +0000 (04:08 +1000)]
Implement the new music in /apple_io.py as well, for running under emulation

23 months agoChange all music to my tone routine (some differences, but not too noticeable)
Nick Downing [Fri, 20 May 2022 17:32:45 +0000 (03:32 +1000)]
Change all music to my tone routine (some differences, but not too noticeable)

23 months agoTune sunny music a bit, add cup filling music
Nick Downing [Fri, 20 May 2022 15:45:14 +0000 (01:45 +1000)]
Tune sunny music a bit, add cup filling music

23 months agoAdd a new assembly language tone generator, analyze and convert lemonade music
Nick Downing [Fri, 20 May 2022 15:10:34 +0000 (01:10 +1000)]
Add a new assembly language tone generator, analyze and convert lemonade music

23 months agoIn patched lemonade, change call 770 to call 784 everywhere, to fix an audible artifa...
Nick Downing [Fri, 20 May 2022 10:13:43 +0000 (20:13 +1000)]
In patched lemonade, change call 770 to call 784 everywhere, to fix an audible artifact in which the first cycle has the wrong length (heard as leading click)

23 months agoImprove the lemonade_tone disassembly slightly, improve the analysis procedure in...
Nick Downing [Fri, 20 May 2022 10:10:50 +0000 (20:10 +1000)]
Improve the lemonade_tone disassembly slightly, improve the analysis procedure in /test to create a correct and reversible model of lemonade_tone and rom_wait

23 months agoImprove console handling, fixes 40 column width issue, implements scroll window
Nick Downing [Thu, 19 May 2022 15:22:38 +0000 (01:22 +1000)]
Improve console handling, fixes 40 column width issue, implements scroll window

23 months agoBuild linapple directly rather than building Applewin and moving it (the move was...
Nick Downing [Thu, 19 May 2022 15:13:29 +0000 (01:13 +1000)]
Build linapple directly rather than building Applewin and moving it (the move was problematic for make since it caused it to be rebuilt on every make cycle)

23 months agoRemove the RESTORE line-number syntax, which turns out not to be in applesoft
Nick Downing [Thu, 19 May 2022 15:06:15 +0000 (01:06 +1000)]
Remove the RESTORE line-number syntax, which turns out not to be in applesoft

23 months agoRemove dead code and redundant operations, fix corrupt byte in lemonade flash
Nick Downing [Thu, 19 May 2022 15:00:39 +0000 (01:00 +1000)]
Remove dead code and redundant operations, fix corrupt byte in lemonade flash

23 months agoAdd edasm assembly for lemonade assembly language routines, make the patched version...
Nick Downing [Thu, 19 May 2022 14:36:19 +0000 (00:36 +1000)]
Add edasm assembly for lemonade assembly language routines, make the patched version load them with BLOAD which frees up space to reinstate the header comments, also back out some problematic changes about RESTORE and the 40-column width

23 months agoAdd some reverse engineering of lemonade assembly language routines
Nick Downing [Thu, 19 May 2022 10:42:40 +0000 (20:42 +1000)]
Add some reverse engineering of lemonade assembly language routines

23 months agoImprove cursor handling, improve tracebacks, improve lemonade game instructions
Nick Downing [Thu, 19 May 2022 09:27:38 +0000 (19:27 +1000)]
Improve cursor handling, improve tracebacks, improve lemonade game instructions

23 months agoRemove comments in lemonade patch to fix out-of-memory error, improve slightly
Nick Downing [Thu, 19 May 2022 07:12:10 +0000 (17:12 +1000)]
Remove comments in lemonade patch to fix out-of-memory error, improve slightly

23 months agoImplement a better way of creating a bootable disk, via new linapple batch mode
Nick Downing [Thu, 19 May 2022 06:50:15 +0000 (16:50 +1000)]
Implement a better way of creating a bootable disk, via new linapple batch mode

23 months agoMove lemonade files to /lemonade, create Makefiles for /lemonade and /orig
Nick Downing [Thu, 19 May 2022 02:59:49 +0000 (12:59 +1000)]
Move lemonade files to /lemonade, create Makefiles for /lemonade and /orig

23 months agoUpdate the lemonade patch to avoid an out-of-data error after weather report
Nick Downing [Thu, 19 May 2022 02:57:43 +0000 (12:57 +1000)]
Update the lemonade patch to avoid an out-of-data error after weather report

23 months agoImplement ALSA PCM audio sounds for console beep and lemonade (via pyalsaaudio)
Nick Downing [Thu, 19 May 2022 01:46:05 +0000 (11:46 +1000)]
Implement ALSA PCM audio sounds for console beep and lemonade (via pyalsaaudio)

23 months agoImprove interpreter and I/O slightly for lemonade, add lemonade.sh source patch
Nick Downing [Wed, 18 May 2022 07:07:07 +0000 (17:07 +1000)]
Improve interpreter and I/O slightly for lemonade, add lemonade.sh source patch

23 months agoAdd bin_to_tok and tok_to_bin for applesoft native format (via dos33 utility)
Nick Downing [Wed, 18 May 2022 05:06:38 +0000 (15:06 +1000)]
Add bin_to_tok and tok_to_bin for applesoft native format (via dos33 utility)

23 months agoRename tokenizer to bas_to_tok, detokenizer to tok_to_bas, improve Makefile
Nick Downing [Wed, 18 May 2022 04:35:42 +0000 (14:35 +1000)]
Rename tokenizer to bas_to_tok, detokenizer to tok_to_bas, improve Makefile

23 months agoLo-res graphics sort of working (needs some modifications to LEMONADE source)
Nick Downing [Wed, 18 May 2022 01:53:44 +0000 (11:53 +1000)]
Lo-res graphics sort of working (needs some modifications to LEMONADE source)

23 months agoImplement more statements and ignore some I/O related ones, LEMONADE can run
Nick Downing [Tue, 17 May 2022 14:11:36 +0000 (00:11 +1000)]
Implement more statements and ignore some I/O related ones, LEMONADE can run

23 months agoImplement all functions except some I/O related ones
Nick Downing [Tue, 17 May 2022 13:02:59 +0000 (23:02 +1000)]
Implement all functions except some I/O related ones

23 months agoBulk add statements and functions in token order (reorder those already there)
Nick Downing [Tue, 17 May 2022 12:26:40 +0000 (22:26 +1000)]
Bulk add statements and functions in token order (reorder those already there)

23 months agoMake interpreter accept tokenized input, this solves a problem with IF A > B THEN...
Nick Downing [Tue, 17 May 2022 11:10:26 +0000 (21:10 +1000)]
Make interpreter accept tokenized input, this solves a problem with IF A > B THEN 100 which treated BTHEN100 as a variable name (now tokenizing has priority)

23 months agoAdd applesoft-like (but not identical) tokenizer and detokenizer
Nick Downing [Tue, 17 May 2022 09:45:01 +0000 (19:45 +1000)]
Add applesoft-like (but not identical) tokenizer and detokenizer

23 months agoCorrectly handle DATA other than STR_LITERAL as unquoted possibly empty strings,...
Nick Downing [Tue, 17 May 2022 05:35:53 +0000 (15:35 +1000)]
Correctly handle DATA other than STR_LITERAL as unquoted possibly empty strings, allow READing multiple lvalues, fix bug of RESTORE requiring the line number

23 months agoImplement REM statement
Nick Downing [Tue, 17 May 2022 04:01:33 +0000 (14:01 +1000)]
Implement REM statement

23 months agoImplement PRINT TAB() and very basic cursor position tracking
Nick Downing [Mon, 16 May 2022 17:43:00 +0000 (03:43 +1000)]
Implement PRINT TAB() and very basic cursor position tracking

23 months agoAdd TEXT, GR, COLOR=, PLOT, HLIN, VLIN statements
Nick Downing [Mon, 16 May 2022 17:02:38 +0000 (03:02 +1000)]
Add TEXT, GR, COLOR=, PLOT, HLIN, VLIN statements

23 months agoAllow multiple arrays to be dimensioned in the same DIM statement
Nick Downing [Mon, 16 May 2022 16:51:26 +0000 (02:51 +1000)]
Allow multiple arrays to be dimensioned in the same DIM statement

23 months agoAdd PEEK, POKE and CALL (via apple_io, to emulate any needed monitor routines)
Nick Downing [Mon, 16 May 2022 16:44:30 +0000 (02:44 +1000)]
Add PEEK, POKE and CALL (via apple_io, to emulate any needed monitor routines)

23 months agoAdd DIM statement, clean up parser to use lvalues properly, add LValueArray
Nick Downing [Mon, 16 May 2022 16:24:43 +0000 (02:24 +1000)]
Add DIM statement, clean up parser to use lvalues properly, add LValueArray

23 months agoAdd LValue node, so that locating the variable for get or set uses common code
Nick Downing [Mon, 16 May 2022 15:52:09 +0000 (01:52 +1000)]
Add LValue node, so that locating the variable for get or set uses common code

23 months agoRemove Node and NodeText prefixes on all class names (keeping Statement and RValue...
Nick Downing [Mon, 16 May 2022 15:13:01 +0000 (01:13 +1000)]
Remove Node and NodeText prefixes on all class names (keeping Statement and RValue prefixes as they add meaning, although prefixing only some is inconsistent)

23 months agoChange VARIABLE to VARIABLE_NAME, NodeTextVariable to NodeTextVariableName
Nick Downing [Mon, 16 May 2022 15:08:26 +0000 (01:08 +1000)]
Change VARIABLE to VARIABLE_NAME, NodeTextVariable to NodeTextVariableName

23 months agoChange NodeExpression to NodeRValue, NodeExpression.evaluate() to .get()
Nick Downing [Mon, 16 May 2022 14:56:49 +0000 (00:56 +1000)]
Change NodeExpression to NodeRValue, NodeExpression.evaluate() to .get()

23 months agoMake variables boxed for easy referencing and/or subscripting
Nick Downing [Mon, 16 May 2022 14:49:30 +0000 (00:49 +1000)]
Make variables boxed for easy referencing and/or subscripting

23 months agoImplement data_types.py and STR, VAL() functions
Nick Downing [Mon, 16 May 2022 13:18:36 +0000 (23:18 +1000)]
Implement data_types.py and STR, VAL() functions

23 months agoImplement INPUT
Nick Downing [Mon, 16 May 2022 13:02:03 +0000 (23:02 +1000)]
Implement INPUT

23 months agoTranslate cr to crlf at output similarly to how Apple ROM console routines work
Nick Downing [Mon, 16 May 2022 12:17:44 +0000 (22:17 +1000)]
Translate cr to crlf at output similarly to how Apple ROM console routines work

23 months agoImplement console input, improve console output a bit (use write not print)
Nick Downing [Mon, 16 May 2022 10:21:28 +0000 (20:21 +1000)]
Implement console input, improve console output a bit (use write not print)

23 months agoAdd apple_io module and HOME, NORMAL, INVERSE, FLASH, HTAB, VTAB statements
Nick Downing [Mon, 16 May 2022 10:08:16 +0000 (20:08 +1000)]
Add apple_io module and HOME, NORMAL, INVERSE, FLASH, HTAB, VTAB statements

23 months agoImplement READ, RESTORE and DATA, but no empty items or unquoted strings yet
Nick Downing [Sun, 15 May 2022 16:05:22 +0000 (02:05 +1000)]
Implement READ, RESTORE and DATA, but no empty items or unquoted strings yet

23 months agoImplement FOR and NEXT
Nick Downing [Sun, 15 May 2022 15:12:10 +0000 (01:12 +1000)]
Implement FOR and NEXT

23 months agoImplement GOSUB and RETURN
Nick Downing [Sun, 15 May 2022 14:47:50 +0000 (00:47 +1000)]
Implement GOSUB and RETURN

23 months agoImprove number printing to make it more symmetrical with parsing
Nick Downing [Sun, 15 May 2022 14:29:38 +0000 (00:29 +1000)]
Improve number printing to make it more symmetrical with parsing

23 months agoAdd END statement, fix float parsing with exponents
Nick Downing [Sun, 15 May 2022 07:40:01 +0000 (17:40 +1000)]
Add END statement, fix float parsing with exponents

23 months agoFull type checking for expression evaluation
Nick Downing [Sun, 15 May 2022 07:23:52 +0000 (17:23 +1000)]
Full type checking for expression evaluation

23 months agoImplement IF statement
Nick Downing [Sun, 15 May 2022 07:09:55 +0000 (17:09 +1000)]
Implement IF statement

23 months agoInitial commit, can interpret LET, PRINT and GOTO, expression evaluation works
Nick Downing [Sun, 15 May 2022 07:03:46 +0000 (17:03 +1000)]
Initial commit, can interpret LET, PRINT and GOTO, expression evaluation works