- Interessanter Beitrag
With "911001.bin" as C65 ROM it works:
Bitte melde dich an, um diesen Anhang zu sehen.
![]()
Es gibt 124 Antworten in diesem Thema, welches 42.700 mal aufgerufen wurde. Der letzte Beitrag (
With "911001.bin" as C65 ROM it works:
Bitte melde dich an, um diesen Anhang zu sehen.
![]()
if you worked with 910xxx until now, we should meybe test the other not implemented commands you listed here, or have you already done that?
if you worked with 910xxx until now, we should meybe test the other not implemented commands you listed here, or have you already done that?
I have the same thoughts. It's on my todo list to test them with the "newer" ROM.
The "problem" was, that I get the C65 ROMs for the Xemu emulator with the "make roms" command (Bitte melde dich an, um diesen Link zu sehen.). It gets the "910111-390488-01.bin":
c65-system.rom
Bitte melde dich an, um diesen Link zu sehen.
131072
And this was the C65 ROM I used for my tests.
The question is, is the "911001.bin" C65 ROM I use now, the latest available C65 ROM?
Edit: I ask the question in an extra thread: Bitte melde dich an, um diesen Link zu sehen.
Maybe we should mention in the book which ROM-revision is described.
Maybe we should mention in the book which ROM-revision is described.
The book describes currently the BASIC 10 version, that was planned for the release of the C65, based on available documents.
Hopefully someone will provide ROM patches, to finalize the incomplete known ROM versions.
The question is, is the "911001.bin" C65 ROM I use now, the latest available C65 ROM?
We use for the MEGA65 the latest available, official ROM 911001 (01.october.1991).
On Zimmers you can find a "patched" version from the 8th of october (911008), i am not sure, what they've patched, i havn't found a difference, tp the 911001.
We know, that Fred Bowen used in his C65 a later version from Dezember (9112xx) but we have not been able to get or find this version anywhere.
Bitte melde dich an, um diesen Anhang zu sehen.
Paul said, that the last available ROM is available as sourcecode.
A new version of the book is in the repository: Bitte melde dich an, um diesen Link zu sehen.
I want to give some feedback to the great manual.
Manual Version: MEGA-Book-200117.pdf
xemu C65, ROM: BASIC 10.0 V0.9B.911001
I was playing around with the token. The internal monitor is great to inspect BASIC lines in Memory.
Bitte melde dich an, um diesen Anhang zu sehen.
Example (explore the dma keyword):
5 times ":" let find the token for the keyword easily in the hex dump of the BASIC line
Type: 5 dma::::: - BASIC LINE
Type: moN - start Monitor
Type: m 2000 2000 - dump BASIC line as hex
>002000 00 0d 20 05 00 fe 1f 3a 3a 3a 3a 3a 00 00 00 00:.. ....:::::....
--1-- --2-- --3-- ------4------- -5 --6--
1: Link field
2: Line number
3: Token for DMA keyword (two bytes in this case)
4: :::::
5: Line end (0)
6: Link field (0=program end)
Type: x - leave the Monitor program
The token for DMA is encoded as $FE $1F
Alles anzeigen
There are some Keywords missing in the manual.
CURSOR x,y
Place the text cursor at x,y
x = 0..39 / 0..79 on the 40 / 80 character screen
y= 0..24
Example: cursor 8,1:print "** test **"
Some BASIC dialects use LOCATE to place the text cursor, so the man-page for LOCATE should include a reference to the CURSOR command.
Some Keywords token are different as printed in the manual.
CHANGE Token:$FE $2C
COPY Token:$F4
HIGHLIGHT Token:$FE $3D
DMA Token:$FE $1F
DIRECTORY
DIR, DIRECTORY
The DIRECTORY keyword can be typed as DIR or DIRECTORY
DIRECTORY is build out of two token, DIR + ECTORY
DIR $ee
DIRECTORY $ee $fe $29
Both typing variants should be explained in the manual.
LINE
(1) LINE xbeg,ybeg,xend,yend
(2) LINE x,y
LINE can be used to draw a line (1) or a single pixel (2)
Graphics Examples:
I tried some of the examples with xemu and they didn't work for me.
They maybe are ok with older ROM versions, I don't know.
The color palette seems to be set to white for every pen.
To make things work, the color palette has to be initialized (with random values in this example).
This program works for me with xemu, it can be divided into 3 parts.
(1) graphics init
100 GRAPHIC CLR
110 SCREEN DEF 1,0,0,4: REM set screen #1 to 320x200x4 resolution
120 SCREEN OPEN 1
130 FOR I=0 TO 15
140 PALETTE 1,I,rnd(1)*15,rnd(1)*15,rnd(1)*15: REM set color
150 NEXT I
160 SCREEN SET 1,1: REM set draw screen and view screen to #1
170 SCNCLR 0
180 SLEEP 1
190 BORDER 0
(2) LINE demo
200 FOR I=0 TO 255
210 PEN 0,i
220 LINE 160,100, rnd(1)*320,rnd(1)*200
230 NEXT I
240 SLEEP 5
(3) close graphics
300 SCREEN CLOSE 1
310 PALETTE RESTORE
320 BORDER 6
Alles anzeigen
It can be used as sample program for Graphic commands.
Just part (2) has to be changed for the different graphic commands.
There are some token in the ROM which are not explained in the manual.
Some of them - but not all - are not implemented.
Token = E3 PASTE draw graphic area from cut buffer
Token = CE,09 RWINDOW return text window parameter function
Token = CE,0C PIXEL return pixel color: p = pixel(x,y)
Token = CE,0D RPALETTE return palette color: r0 = rpalette(1,1,0)
Token = FE,1C WIDTH (currently unimplemented)
Token = FE,1D SPRDEF (currently unimplemented)
Token = FE,1E QUIT (currently unimplemented)
Token = FE,29 ECTORY extend Token DIR to DIRECTORY
Token = FE,31 VIEWPORT (currently unimplemented)
Token = FE,32 GCOPY graphic copy
Token = FE,37 PIC graphic subcommand
Token = FE,38 GENLOCK set video sync mode
Token = FE,41 CURSOR place text cursor (x,y)
Token = FE,42 RCURSOR RCURSOR(0..2) return cursor / screen width (I guess)
Token = FE,43 LOADIFF LOADIFF "name" works only in graphics mode (invalid file format?)
Token = FE,44 SAVEIFF SAVEIFF "name" works only in graphics mode (hang up?)
Token = FE,45 EDIT ?
Alles anzeigen
I want to give some feedback to the great manual.
Manual Version: MEGA-Book-200117.pdf
xemu C65, ROM: BASIC 10.0 V0.9B.911001
Thank you very much for your feedback, which is appreciated.
I'll update the BASIC-10 chapter and use your hints.
The description remains however preliminary as long as the OPEN ROM version is not finished and the C65 version is not patched.
So I'll add the description of some currently uninplemented commands, when they are available.
Alles anzeigenI make some first little tests with the BASIC 10 commands and I think, I have found a error in the command FOREGROUND:
Bitte melde dich an, um diesen Anhang zu sehen.The color codes in the manual are not the colors seeing on the screen (XEMU emulator).
I wrote a litte test program that shows all FOREGROUND colors (0 to 15):
Bitte melde dich an, um diesen Anhang zu sehen.
Color 0 is not display. There is a error message after trying FOREGROUND 0:
Bitte melde dich an, um diesen Anhang zu sehen.
Changing the FOR loop to starting with I=1:
Bitte melde dich an, um diesen Anhang zu sehen.
gets this result:
Bitte melde dich an, um diesen Anhang zu sehen.
The color index in the manual seems to be shifted one digit:
0 doesn't work (error message)
1 is black
2 is white
...and so on ...
Using the latest available C65 ROM (911001.bin) the color codes in BASIC 10 are from 0 to 15 again (16 returns an error).
So it depends on the ROM version, whether the color codes are from 0 to 15 or from 1 to 16. ![]()
Using the latest available C65 ROM (911001.bin) the color codes in BASIC 10 are from 0 to 15 again (16 returns an error).
So it depends on the ROM version, whether the color codes are from 0 to 15 or from 1 to 16.
Arrrgh!![]()
Arrrgh!
Arrrg! : Syntax error.
Alles anzeigenThere are some Keywords missing in the manual.
CURSOR x,y
Place the text cursor at x,y
x = 0..39 / 0..79 on the 40 / 80 character screen
y= 0..24
Example: cursor 8,1:print "** test **"
Some BASIC dialects use LOCATE to place the text cursor, so the man-page for LOCATE should include a reference to the CURSOR command.
In this short man-text "cursor.man" (from the sources from Commodore) is described, that there are two more possible parameters at the CURSOR command: ON | OFF and <style>:
CURSOR - Set cursor position, style, and turn it on or off
CURSOR [ON|OFF,] [column] [,row [,style] ]
The CURSOR command is used to turn the cursor ON or OFF, or specify its style
(0=flashing, 1=non-flashing). You can also use CURSOR to place the cursor at
a particular place on the text display. The next thing PRINTed or INPUT from
the display will start at this position.
The column and row parameters specify a new character position in the
currently defined screen window. If either column or row is outside the
current window, an ILLEGAL QUANTITY ERROR is reported. Use RWINDOW to
determine the screen size and current WINDOW dimensions. Use RCURSOR to find
out where the cursor is. In any case, column must be in the range of 0-39 for
40-column screens or 0-79 for 80-column screens. Row must be in the range of
0-24.
CURSOR ON Turns cursor on at current position.
CURSOR ON, 20 Turns cursor on in column 20 on the
current line. The next item printed
or input will start here.
CURSOR 0,24 Moves cursor to beginning of last line.
The next item printed or input will start
here. If the cursor was on, it's still on,
and if it was off, it's still off.
CURSOR ,,1 Changes to solid cursor without moving it.
Note: because the C64DX screen editor uses a "software" cursor, you must make
sure the cursor is OFF before moving it or printing anything. If you don't,
you risk leaving images of the cursor behind. When a BASIC program is running,
the cursor is normally off except when processing an INPUT statement. The
example below illustrates the proper way to program the cursor. This program
simply echos whatever you type onto the screen. Press the ESCAPE key to exit:
10 DO: CURSOR ON: GET A$: CURSOR OFF: PRINT A$;: LOOP UNTIL A$=CHR$(27)
If you simply want to PRINT some text at a particular location, use:
CURSOR col,row: PRINT "message"
If you want to INPUT some text from a particular location, use:
CURSOR col,row: INPUT x$
Alles anzeigen
On Zimmers you can find a "patched" version from the 8th of october (911008), i am not sure, what they've patched, i havn't found a difference, tp the 911001.
If you load the original ROM in the MESS emulator, then it comes with a small Basic demo program bundled, which runs automatically every time (and you have to press Run/Stop to break it and get to the OS). In the patched version, however, it has been changed to enter the Monitor instead (so you have to type an X command to exit the Monitor and get to the OS).
Interestingly enough, in the XEMU emulator nothing of the above happens (it just boots up normally like the other ROM's).
(No idea where and how it takes the built-in demo program from, but after having been started, it even tries to load some more additional programs from a Fred Bowen demo disk, which fails, of course, as the disk is not present. It's also interesting that the tried-to-be-loaded additional program list always depends on the actual memory expansion detected, thus setting either to 128K or 640K or more in the emulator makes to try a different program list to start with. Also no idea why the whole action is completely missing if started in XEMU.)
We have seen that sometimes it starts and sometimes it doesn't', as we have continued development. It would be super helpful for someone to eamine in the ROM how it decides whether or not to run the demo program.
LG
Paul
We use for the MEGA65 the latest available, official ROM 911001 (01.october.1991).
On Zimmers you can find a "patched" version from the 8th of october (911008), i am not sure, what they've patched, i havn't found a difference, tp the 911001.
In the "patched" version of the ROM the build in demo programs (in the area from $4000 to $6930) are removed. All other memory areas are unchanged.
In the "patched" version of the ROM the build in demo programs (in the area from $4000 to $6930) are removed. All other memory areas are unchanged.
Thanks for checking this !!!
Maybe - at least as a kind of first aid - it would be enough to fill up the first few bytes with zeroes starting at $4000 for changing the built-in program to an empty one (since it is in the patched version has not been completely eliminated, but rather a "0 MONITOR" Basic one-liner is there).
As I started listing out the Basic demo program (which seems to be written by Fred Bowen), I spotted another strange thing.
It uses the FRE(2) function to determine whether a memory expansion is present (that gives back the number of the extra banks). While FRE(0) and FRE(1) indicate the free bytes in the first two banks (as available program code and variable memory). But the latter two here only give back about 24K. Does anyone know why?
Both of them should report 55K at least (or more) as they generally do (since in both banks the used space is starting at $2000, although it can be manually increased a little downwards yet).
With that 24K displayed, it seems the free space is only counted until the 32K boundary for some reason now.
It uses the FRE(2) function to determine whether a memory expansion is present (that gives back the number of the extra banks). While FRE(0) and FRE(1) indicate the free bytes in the first two banks (as available program code and variable memory). But the latter two here only give back about 24K. Does anyone know why?
It has to be an error in BASIC 10 in the newest ROMs.
In an older ROM (910429.bin) the FRE commands shows the correct results:
Bitte melde dich an, um diesen Anhang zu sehen.
Maybe try to progressively reduce the amount of free memory by allocating variables on a new rom, and see if the 24K goes down to 0, and then jumps back up to 32K. I am suspecting that FRE() in the newer ROMs might be returning only the bottom 15 bits of the value.
LG
Paul.