Monitor ROM Source code

Steve Gray
Posts: 281
Joined: Mon Oct 06, 2008 1:54 pm
Location: Markham, Ontario, Canada
Contact:

Monitor ROM Source code

Post by Steve Gray » Sat Apr 27, 2019 5:06 am

I've started a new repository on Github where I'm disassembling monitor ROMs and making re-assembleable sourcecode. I've started with CEGMON and WEMON. CEGMON will re-assemble and can produce binaries for C1/Superboard, C2/C4, and UK-101. The C1 binary is byte-exact to the C1 binary on OSIWEB.ORG. Soon I will be generating C2/C4 and UK-101 as well. Once that is done I am hoping to be able to make modifications to the configurations etc. I have a suspicion that the binaries on here have been modified, so I'd like to get other CEGMON monitor dumps to compare with.

I've also started disassembling WEMON for the UK-101 with the hopes of adapting it to the C2/C4.

You can find them here: https://github.com/sjgray/OSI-monitor-roms

Steve
C4P working, C1P working. 600D Replica working, C4P+D&N floppy not working. 505 board, 610 board, Mittendorf board, TOSIE hacker board need testing, PicoDOS disk untested.

Steve Gray
Posts: 281
Joined: Mon Oct 06, 2008 1:54 pm
Location: Markham, Ontario, Canada
Contact:

Re: Monitor ROM Source code

Post by Steve Gray » Sun May 12, 2019 8:07 pm

I have posted the latest CEGMON code. This code contains a lot of new meaningful address labels, additional commenting, tidier formatting and... my own customization options. You can remove the DISK BOOTSTRAP code and replace it with your own customized initialization and printing. With this I have added the following features:

CTRL-W ... switch to "wide" characters (24/32 column mode)
CTRL-N ... switch to "narrow" characters (48/64 column mode)
CTRL-V ... switch to "video" mode (standard Black and White composite)
CTRL-R ... switch to "RGB" mode (for 630 colour or similar)
CTRL-U ... clear coloUr ram (sets it to whatever is at start of colour ram location $D400)

All the above is working, however I still have to track down a bug where the bottom of the screen is not detected in 48 column mode, causing printing to disappear. The CTRL-W and CTRL-N take their parameters from a table, so this table can be customized (in the source) to set any video mode you like, and also set the proper colour mode.

At this point I have only run the customized CEGMON in WinOSI not actual hardware, but I will keep you posted. WinOSI would not let me put colour ram at $D400 so the CTRL-U is assumed to work.

Work on my own RGB colour board continues. As well I'm planning to continue adding new customization options including removing the ML Monitor.

Any comments/feedback are appreciated.

Steve
C4P working, C1P working. 600D Replica working, C4P+D&N floppy not working. 505 board, 610 board, Mittendorf board, TOSIE hacker board need testing, PicoDOS disk untested.

waltermixxx
Posts: 118
Joined: Sun Feb 03, 2019 10:31 pm

Re: Monitor ROM Source code

Post by waltermixxx » Sun May 12, 2019 11:54 pm

instead of having two seperate controls for wide and narrow, would it save code space if you made it a toggle instead? Just a thought? (an uneducated, uninformed, not really familiar with 6502 coding, thought...) :)
Turning into quite an OSI Junkie (HTFDTH?) Superboard II REV B-40K, 9600b, HC-05 Bluetooth, Superboard II Rev D, C4P rebuild- 502, 542c, 540B. :)

Steve Gray
Posts: 281
Joined: Mon Oct 06, 2008 1:54 pm
Location: Markham, Ontario, Canada
Contact:

Re: Monitor ROM Source code

Post by Steve Gray » Mon May 13, 2019 12:42 am

I had to remove CTRL-X to toggle due to lack of space. I decided it would be better to have two specific CTRL codes to set the screen, rather than a toggle which would not know the current state. There are 10 unused bytes, so If I could free up about 12 more bytes I could probably put the feature back in, but I already optimized the code for compactness a few times just to get all the code in I needed. Anyone is welcome to see if they can optimize it ;-)

Steve
C4P working, C1P working. 600D Replica working, C4P+D&N floppy not working. 505 board, 610 board, Mittendorf board, TOSIE hacker board need testing, PicoDOS disk untested.

Steve Gray
Posts: 281
Joined: Mon Oct 06, 2008 1:54 pm
Location: Markham, Ontario, Canada
Contact:

Re: Monitor ROM Source code

Post by Steve Gray » Mon May 13, 2019 4:43 am

I found the problem using CTRL-N (48-column) mode. The left margin was off causing characters to be off screen. Also somehow I used the C4 bottom margin which explains why printing /scrolling wasn't working. This is all now fixed and tested on real hardware. CTRL-U to clear colour RAM also works (on my machine you have to do CTRL-U about 4 or 5 times to clear ram as per 600D discussion).

So, if anyone with a 600D wants to play, grab the binary and give it a go!

Steve
C4P working, C1P working. 600D Replica working, C4P+D&N floppy not working. 505 board, 610 board, Mittendorf board, TOSIE hacker board need testing, PicoDOS disk untested.

Steve Gray
Posts: 281
Joined: Mon Oct 06, 2008 1:54 pm
Location: Markham, Ontario, Canada
Contact:

Re: Monitor ROM Source code

Post by Steve Gray » Wed Jun 19, 2019 3:32 am

Work continues on the CEGMON source...

My new additions seem to be working pretty well. There are no issues that I know of. Due to lack of space there's not much else I can add.
I have restructured the code to be able to better customize things, and I've written another "module" to replace the disk bootstrap. I hope it will be useful to someone here...

The new module is a software selectable monitor rom menu. You can select from 4 different monitors. If you select #1 you will boot into this customized CEGMON but without the disk bootstrap of course. ROMs #2 to #4 can be whatever you like. In this latest commit I chose #2 as the full CEGMON, #3 as SYN600, and #4 as my own customized CEGMON aka SJGMON. You could pick any monitor ROM provided it's the standard 2K in size.

To make this work you assemble all 4 roms into one 8K EPROM. Then you need to connect the BK0 and BK1 lines to the upper address lines of the EPROM. The machine boots with BK0 and BK1 off, thereby selecting the first 2K, where this new monitor rom goes. The new monitor then sets the BK lines according to your selection and then reboots the machine again, thereby activating your selected rom.

These BK lines were originally intended to be used for the BASIC sockets. The sockets support 2K or 8K roms. You combine all 4 BASIC ROMs into one 8K ROM which then frees up the other 3 sockets. The BK lines could then select which socket is active. I figured it would be more useful to switch monitor ROMs.

I have tested the new menu module using WINOSI. It seems to work but WINOSI doesn't support the BK lines. I'll try to get everything going on real hardware and let you know how it goes.

Steve
Last edited by Steve Gray on Wed Jun 19, 2019 8:58 pm, edited 1 time in total.
C4P working, C1P working. 600D Replica working, C4P+D&N floppy not working. 505 board, 610 board, Mittendorf board, TOSIE hacker board need testing, PicoDOS disk untested.

Steve Gray
Posts: 281
Joined: Mon Oct 06, 2008 1:54 pm
Location: Markham, Ontario, Canada
Contact:

Re: Monitor ROM Source code

Post by Steve Gray » Wed Jun 19, 2019 8:53 pm

I've added another CEGMON module, similar to the last. This one lets you select which of the 4 BASIC ROM sockets is active.
Note, these use the same BK lines as the MONITOR ROM select module, so you can't have both at once. If there is enough interest in my Control Register Expander board I will work on supporting both by using the two new lines for MONITOR select, and the two existing BK lines for BASIC.

Steve
C4P working, C1P working. 600D Replica working, C4P+D&N floppy not working. 505 board, 610 board, Mittendorf board, TOSIE hacker board need testing, PicoDOS disk untested.

Steve Gray
Posts: 281
Joined: Mon Oct 06, 2008 1:54 pm
Location: Markham, Ontario, Canada
Contact:

Re: Monitor ROM Source code

Post by Steve Gray » Fri Jun 21, 2019 4:48 am

So, I went to Walter's and we modded my machine for 8K-size BASIC ROMs. Josh had burned me the UK-101 BASIC onto a 68766 eprom. I burned my BASIC SELECT version of CEGMON, plugged both ROMs in and voila!
IMG_20190620_215535_5-P50.jpg
IMG_20190620_215535_5-P50.jpg (242.72 KiB) Viewed 992 times
We also plugged Walter's 8K UK-101 BASIC chip into another slot. We verified that the selection system works by trying all slots. The machine would crash if we picked a slot with no ROM chip. Success!

Steve
C4P working, C1P working. 600D Replica working, C4P+D&N floppy not working. 505 board, 610 board, Mittendorf board, TOSIE hacker board need testing, PicoDOS disk untested.

Steve Gray
Posts: 281
Joined: Mon Oct 06, 2008 1:54 pm
Location: Markham, Ontario, Canada
Contact:

Re: Monitor ROM Source code

Post by Steve Gray » Fri Jun 21, 2019 5:50 pm

I'm on a roll.... I have now modified CEGMON to allow for placing extra code outside of the monitor ROM space, in this case at $8000-9FFF like is available by using the EPROM socket on BILLO's RAM/ROM board. So we have the full CEGMON with disk bootstrap, plus another 8K of space for whatever we want. I've put the REV D additional CTRL code support in there now but it only fills 160 or so bytes of the 8K space. We could use this space for additional CTRL codes, a serial communication system (think DRIVEWIRE for Coco), SD card interface support or almost anything else.
I may try to implement WEMON using the 8K space. This way the monitor rom stays at 2K in size and wouldn't require modding the mainboard or re-locating the ACIA.

If anyone has any ideas let me know.

Steve
C4P working, C1P working. 600D Replica working, C4P+D&N floppy not working. 505 board, 610 board, Mittendorf board, TOSIE hacker board need testing, PicoDOS disk untested.

Steve Gray
Posts: 281
Joined: Mon Oct 06, 2008 1:54 pm
Location: Markham, Ontario, Canada
Contact:

Re: Monitor ROM Source code

Post by Steve Gray » Sat Jun 22, 2019 2:04 am

So, I've been meaning to try this for a while.. it should make development easier.
Dallas chips working!.jpg
Dallas chips working!.jpg (113.86 KiB) Viewed 982 times
I am using a DS1220Y nvram chip in the RevD monitor socket. It is pin compatible with the 2716 EPROM.
I have a DS1225 nvram in BILLO's RAM/ROM board. It is 2764 compatible.

On the screen is my latest changes with the modified CEGMON with all standard features (including disk bootstrap) modified to support 24 and 48 column mode properly and additional CTRL codes to support the Rev D. Addiional monitor code is in the DS1225 (at $8000). So no more eprom erasing!

Steve
C4P working, C1P working. 600D Replica working, C4P+D&N floppy not working. 505 board, 610 board, Mittendorf board, TOSIE hacker board need testing, PicoDOS disk untested.

Post Reply