diff --git a/README.md b/README.md index 7e8929f95..2bb9890a0 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,9 @@ IntelliJ IDEA with the Kotlin plugin). It's handy to have an emulator (or a real machine perhaps!) to run the programs on. The compiler assumes the presence of the [Vice emulator](http://vice-emu.sourceforge.net/) for the C64 target, -and the [x16emu emulator](https://github.com/commanderx16/x16-emulator) for the CommanderX16 target. +and a recent emulator version (R42 or newer) for the CommanderX16, such as [x16emu](https://cx16forum.com/forum/viewforum.php?f=30) +(preferred, this is the official emulator. If required, source code is [here](https://github.com/X16Community/x16-emulator/)). +There is also [Box16](https://github.com/indigodarkwolf/box16) which has powerful debugging features. **Syntax highlighting:** for a few different editors, syntax highlighting definition files are provided. Look in the [syntax-files](https://github.com/irmen/prog8/tree/master/syntax-files) directory in the github repository to find them. diff --git a/compiler/res/prog8lib/cx16/floats.p8 b/compiler/res/prog8lib/cx16/floats.p8 index 6f52b4900..eada25301 100644 --- a/compiler/res/prog8lib/cx16/floats.p8 +++ b/compiler/res/prog8lib/cx16/floats.p8 @@ -5,7 +5,6 @@ floats { ; ---- this block contains C-64 compatible floating point related functions ---- - ; the addresses are from cx16 V39 emulator and roms! they won't work on older versions. const float PI = 3.141592653589793 const float TWOPI = 6.283185307179586 diff --git a/compiler/res/prog8lib/cx16/psg.p8 b/compiler/res/prog8lib/cx16/psg.p8 index 075fa661e..ddf842802 100644 --- a/compiler/res/prog8lib/cx16/psg.p8 +++ b/compiler/res/prog8lib/cx16/psg.p8 @@ -44,7 +44,7 @@ psg { sub freq(ubyte voice_num, uword vera_freq) { ; -- Changes the frequency of the voice's sound. ; voice_num = 0-15, vera_freq = 0-65535 calculate this via the formula given in the Vera's PSG documentation. - ; (https://github.com/commanderx16/x16-docs/blob/master/VERA%20Programmer's%20Reference.md) + ; (https://github.com/x16community/x16-docs/blob/master/VERA%20Programmer's%20Reference.md) cx16.r0 = $f9c0 + voice_num * 4 cx16.VERA_CTRL = 0 cx16.VERA_ADDR_L = lsb(cx16.r0) diff --git a/compiler/res/prog8lib/cx16/syslib.p8 b/compiler/res/prog8lib/cx16/syslib.p8 index 1c1925ba5..f17da2f68 100644 --- a/compiler/res/prog8lib/cx16/syslib.p8 +++ b/compiler/res/prog8lib/cx16/syslib.p8 @@ -605,40 +605,6 @@ asmsub vpoke_xor(ubyte bank @A, uword address @R0, ubyte value @Y) clobbers (A) } -sub FB_set_pixels_from_buf(uword buffer, uword count) { - %asm {{ - ; -- This is replacement code for the normal FB_set_pixels subroutine in ROM - ; However that routine contains a bug in the current v38 ROM that makes it crash when count > 255. - ; So the code below replaces that. Once the ROM is patched this routine is no longer necessary. - ; See https://github.com/commanderx16/x16-rom/issues/179 - phx - lda buffer - ldy buffer+1 - sta P8ZP_SCRATCH_W1 - sty P8ZP_SCRATCH_W1+1 - jsr _pixels - plx - rts - -_pixels lda count+1 - beq + - ldx #0 -- jsr _loop - inc P8ZP_SCRATCH_W1+1 - dec count+1 - bne - - -+ ldx count -_loop ldy #0 -- lda (P8ZP_SCRATCH_W1),y - sta cx16.VERA_DATA0 - iny - dex - bne - - rts - }} -} - ; ---- system stuff ----- asmsub init_system() { ; Initializes the machine to a sane starting state. diff --git a/docs/source/index.rst b/docs/source/index.rst index aacd6e529..29763b4d5 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -180,9 +180,11 @@ For MacOS you can use the Homebrew system to install a recent version of OpenJDK Finally: an **emulator** (or a real machine of course) to test and run your programs on. In C64 mode, the compiler assumes the presence of the `VICE emulator `_. -If you're targeting the Commander X16 instead, there's a choice of the official `x16emu `_ -and the unofficial `box16 `_ (you can select which one you want to launch -using the ``-emu`` or ``-emu2`` command line options) +If you're targeting the Commander X16 instead, +download a recent emulator version (R42 or newer) for the CommanderX16, such as `x16emu `_ +(preferred, this is the official emulator. If required, source code is `here `_. +There is also `Box16 `_ which has powerful debugging features. +You can select which one you want to launch using the ``-emu`` or ``-emu2`` command line options. **Syntax highlighting:** for a few different editors, syntax highlighting definition files are provided. Look in the `syntax-files `_ directory in the github repository to find them. diff --git a/docs/source/syntaxreference.rst b/docs/source/syntaxreference.rst index 49d803012..40ce6a97f 100644 --- a/docs/source/syntaxreference.rst +++ b/docs/source/syntaxreference.rst @@ -77,8 +77,6 @@ Directives to perform a system reset. (A ``system_reset`` subroutine is available in the syslib to help you do this) - style ``dontuse`` -- don't use *any* location in the zeropage. - Also read :ref:`zeropage`. - .. note:: ``kernalsafe`` and ``full`` on the C64 leave enough room in the zeropage to reallocate the 16 virtual registers cx16.r0...cx16.r15 from the Commander X16 into the zeropage as well diff --git a/syntax-files/Vim/prog8_builtins.vim b/syntax-files/Vim/prog8_builtins.vim index 47651b69f..8b363dbfb 100644 --- a/syntax-files/Vim/prog8_builtins.vim +++ b/syntax-files/Vim/prog8_builtins.vim @@ -680,7 +680,6 @@ syn match prog8BuiltInFunc "\" syn match prog8BuiltInFunc "\" syn match prog8BuiltInFunc "\" syn match prog8BuiltInFunc "\" -syn match prog8BuiltInFunc "\" syn match prog8BuiltInFunc "\" syn match prog8BuiltInFunc "\" syn match prog8BuiltInFunc "\"