applesoft_basic.git
2 years 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

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

2 years 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)

2 years 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

2 years 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

2 years 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)

2 years 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

2 years 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

2 years 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)

2 years 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)

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

2 years 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)

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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()

2 years 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)

2 years 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

2 years 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)

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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)

2 years 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

2 years 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

2 years 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)

2 years 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

2 years 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

2 years 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)

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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

2 years 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)

2 years 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

2 years 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)

2 years 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

2 years 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)

2 years 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

2 years 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

2 years 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)

2 years 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)

2 years 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

2 years 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

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

2 years 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

2 years 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

2 years 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

2 years 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)

2 years 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

2 years 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

2 years 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)

2 years 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

2 years 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()

2 years 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

2 years 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

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

2 years 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

2 years 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)

2 years 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

2 years 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

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

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

2 years 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

2 years 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

2 years 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

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

2 years 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