CodeWalrus

Development => PC, Mac & Vintage Computers => Topic started by: Keoni29 on November 19, 2015, 02:00:39 PM

Title: CBS6000 emulator
Post by: Keoni29 on November 19, 2015, 02:00:39 PM
CBS6000 Emulator
I always wanted to write an emulator, but pretty much every device has been emulated already.
Then I thought to myself: Why not emulate the computer that I designed and built myself.

About the CBS6000
The CBS6000 is an 8 bit microcomputer with a 1MHz 6502 cpu at its core. The user interacts with it using a terminal.

About the emulator
I did not feel like re-inventing the wheel with the CPU emulator, so I based my emulator on a 6502 emulator written by Gianluca Ghettini.
The emulator features a custom terminal emulator, modem emulation trough sockets,

Original post: https://hackaday.io/project/4406-cbs6000-8-bit-computer/log/28096-more-about-the-emulator
The emulator is really starting to take shape. It has a terminal emulator, variable execution speed, single stepping (but no monitor yet), tcp socket for loading and saving files as well as connecting to the internet (soon.) The next items on the agenda are emulating the CIA , Bankswitching, Printer port, Seven segment display and Interrupts.

I open-sourced the project, so you can have a look at it on my github page: https://github.com/keoni29/mos6502

Here's a screenshot of the emulator in action!
Title: Re: CBS6000 emulator
Post by: novenary on November 19, 2015, 06:10:11 PM
Cool to see an emulator for it, you really pushed that homebrew computer far into completion. :)
Title: Re: CBS6000 emulator
Post by: Dream of Omnimaga on November 19, 2015, 06:48:50 PM
It would definitively be interesting to be able to try stuff that you write for this computer. Also I'm glad to see you back in action, programming-wise :walrii:
Title: Re: CBS6000 emulator
Post by: Keoni29 on November 19, 2015, 07:33:09 PM
Most of the things I wrote for the computer have been integrated into the operating system. I have not written too many user programs for it yet. It can run most apple 1 software with a few modifications though. I want to get an assembler and a text editor to work on it, so that's what I'm gonna try tonight.
Title: Re: CBS6000 emulator
Post by: Dream of Omnimaga on November 19, 2015, 07:33:59 PM
I see. Good luck. Will those also be integrated into the OS?
Title: Re: CBS6000 emulator
Post by: alexgt on November 19, 2015, 08:10:14 PM
Cool, Keoni :) Good luck implementing further stuff ;)
Title: Re: CBS6000 emulator
Post by: Keoni29 on November 20, 2015, 07:59:47 AM
Quote from: DJ Omnimaga on November 19, 2015, 07:33:59 PM
I see. Good luck. Will those also be integrated into the OS?
I am porting an assembler to the cbs6000 right now. It is not likely to be included into the OS, since the assembler is a separate program. That does not mean it won't be included in the rom of the device.
Title: Re: CBS6000 emulator
Post by: Keoni29 on November 20, 2015, 11:07:52 PM
Done it. I have succesfully ported the KRUSADER assembler (http://school.anhb.uwa.edu.au/personalpages/kwessen/apple1/Krusader.htm) to the CBS6000. It was a lot of work, but I finally cracked the code!
I have added a lot of debug features to my CBS6000 emulator, so I could figure out why some things were not working.

As you can see there's a zero page monitor, register monitor, live disassembler, debug console, speed control and single-stepping. This weekend I will probably be prettifying the interface. The modified source for the assembler can be found here: https://github.com/keoni29/cbs6000/blob/master/user/krusader1.3CBS.asm
Title: Re: CBS6000 emulator
Post by: Dream of Omnimaga on November 21, 2015, 06:45:27 AM
Wow, you did that fast Keoni29 :D. That reminds me, would the TI-84+ be fast enough for such emulator?
Title: Re: CBS6000 emulator
Post by: Keoni29 on November 21, 2015, 09:03:45 AM
I modified a stand-alone disassembler program and made it into a live assembler class. I can pass 3 bytes of code to it and it will return a string of the disassembled code. I want to have breakpoints and a full memory monitor as well.

The speed of the TI84+ would not be the issue: it's the screen real estate. On the pc you got all the debug info in front of you, so that's a more useful tool. I'd also have to write the cpu emulator and test suite from scratch. I'd rather keep adding features to the pc emulator.