Micro-KIM EPROM expansion?

Talk about your Micro-KIM

Re: Micro-KIM EPROM expansion?

Postby jac_goudsmit » Feb Wed 18, 2015 2:24 pm

Paul Förster wrote:I did accidentally erased my EPROM once and Vince was so nice and help me out by sending the ROM image file so I could burn another EPROM. I can either send you the ROM file or burn an EPROM and send it to you if you like. Note however, if you choose the latter option, it'll come from Switzerland, so shipping would take some time. ;-)


Maybe I'll take you up on that offer, but not until I know for sure that that's what's wrong.

Anyway, I made some progress on this last weekend: I connected a Propeller QuickStart board to my MicroKim's expansion port, removed the EPROM and disabled the on-board address decoder on the MicroKim by removing the jumper. This way, the RAM and RIOT chips on the MicroKim don't ever activate and the Propeller has the address bus and data bus to itself. I ran my L-Star Apple-1 emulator firmware on the QuickStart (actually a slightly modified version that uses PHI2 from the MicroKim as clock source instead of a Propeller clock generator, and doesn't expect to have a keyboard or screen). The L-Star Apple-1 emulator emulates 8K ROM and 16K RAM and the Apple-1 PIA as I/O device, and redirects the serial port to/from the PIA emulator. It worked! See https://plus.google.com/+JacGoudsmit/posts/csPTHy9PkW7

I then replaced the Apple-1 ROM image file in my software by the KIM ROM image, and disabled the RAM emulator and the PIA emulator. And I enabled the MicroKim address decoder with the jumper. The MicroKim now thinks that the Propeller is the ROM but uses the RIOT and the RAM in their normal locations. This didn't work right away because the 6502 ROM code expects that the ROM is mirrored at $1800-1FFF as well as $F800-FFFF. I had to modify the Propeller software to ignore address lines A13-A15 to make sure the ROM shows up in those locations and all others. That worked too! See https://plus.google.com/+JacGoudsmit/posts/bLvo7tF1Qy3

It was nice to see the displays light up again after such a long time, but I'm still not sure what's wrong: When I set up my software to simply map the ROM at the two relevant locations ($1800 and $F800), it still doesn't work. I have to mask out address bus lines A13-A15 to make it work. It's as if there's some piece of hardware on the MicroKim that's pulling an address line low or high. I think the next step is to run the Apple-1 firmware again (especially Ken Wessen's Krusader) while the MicroKim address decoder is active, so I can write some test programs in 6502 assembler to see what's going on.

I'll probably put an article online on one of my websites about how I did this, but I'm going to be short on spare time for a while so I don't know yet when that will happen. If you know a thing or two about electronics and you can get your hands on a Propeller board and some wires, I can give you a quick explanation of what I did if you send me a PM with your email address. I'll also give you some suggestions as to how to e.g. put KIM Basic in ROM.

===Jac
User avatar
jac_goudsmit
 
Posts: 74
Joined: Jun Mon 14, 2010 4:22 pm
Location: Rancho Cucamonga, California

Re: Micro-KIM EPROM expansion?

Postby cappy2112 » Feb Wed 18, 2015 2:44 pm

jac_goudsmit wrote:
Paul Förster wrote:I did accidentally erased my EPROM once and Vince was so nice and help me out by sending the ROM image file so I could burn another EPROM. I can either send you the ROM file or burn an EPROM and send it to you if you like. Note however, if you choose the latter option, it'll come from Switzerland, so shipping would take some time. ;-)


Maybe I'll take you up on that offer, but not until I know for sure that that's what's wrong.

Anyway, I made some progress on this last weekend: I connected a Propeller QuickStart board to my MicroKim's expansion port, removed the EPROM and disabled the on-board address decoder on the MicroKim by removing the jumper. This way, the RAM and RIOT chips on the MicroKim don't ever activate and the Propeller has the address bus and data bus to itself. I ran my L-Star Apple-1 emulator firmware on the QuickStart (actually a slightly modified version that uses PHI2 from the MicroKim as clock source instead of a Propeller clock generator, and doesn't expect to have a keyboard or screen). The L-Star Apple-1 emulator emulates 8K ROM and 16K RAM and the Apple-1 PIA as I/O device, and redirects the serial port to/from the PIA emulator. It worked! See https://plus.google.com/+JacGoudsmit/posts/csPTHy9PkW7

I then replaced the Apple-1 ROM image file in my software by the KIM ROM image, and disabled the RAM emulator and the PIA emulator. And I enabled the MicroKim address decoder with the jumper. The MicroKim now thinks that the Propeller is the ROM but uses the RIOT and the RAM in their normal locations. This didn't work right away because the 6502 ROM code expects that the ROM is mirrored at $1800-1FFF as well as $F800-FFFF. I had to modify the Propeller software to ignore address lines A13-A15 to make sure the ROM shows up in those locations and all others. That worked too! See https://plus.google.com/+JacGoudsmit/posts/bLvo7tF1Qy3

It was nice to see the displays light up again after such a long time, but I'm still not sure what's wrong: When I set up my software to simply map the ROM at the two relevant locations ($1800 and $F800), it still doesn't work. I have to mask out address bus lines A13-A15 to make it work. It's as if there's some piece of hardware on the MicroKim that's pulling an address line low or high. I think the next step is to run the Apple-1 firmware again (especially Ken Wessen's Krusader) while the MicroKim address decoder is active, so I can write some test programs in 6502 assembler to see what's going on.

I'll probably put an article online on one of my websites about how I did this, but I'm going to be short on spare time for a while so I don't know yet when that will happen. If you know a thing or two about electronics and you can get your hands on a Propeller board and some wires, I can give you a quick explanation of what I did if you send me a PM with your email address. I'll also give you some suggestions as to how to e.g. put KIM Basic in ROM.

===Jac


Impressive and quite interesting, Jac
cappy2112
 
Posts: 48
Joined: Sep Fri 26, 2014 1:28 am

Re: Micro-KIM EPROM expansion?

Postby djones60 » Feb Thu 19, 2015 2:29 pm

I've been reading along with this. This discussion has been giving me ideas. I need to check out those GIT project and dig into the code. I'm sure it will give me even more ideas. Now if I just had the time to follow up with them!
djones60
 
Posts: 19
Joined: Aug Fri 08, 2014 4:53 pm
Location: Indiana, USA

Re: Micro-KIM EPROM expansion?

Postby Paul Förster » Feb Fri 20, 2015 2:07 pm

Hi Jac,

jac_goudsmit wrote:Maybe I'll take you up on that offer, but not until I know for sure that that's what's wrong.

ok, just let me know if/when you need it.

jac_goudsmit wrote:Anyway, I made some progress on this last weekend: I connected a Propeller QuickStart board to my MicroKim's expansion port, removed the EPROM and disabled the on-board address decoder on the MicroKim by removing the jumper.

I second cappy2112's view: Impressive! :)

Cheers,

Paul
User avatar
Paul Förster
 
Posts: 17
Joined: Mar Wed 19, 2014 12:35 pm
Location: Switzerland

Re: Micro-KIM EPROM expansion?

Postby jac_goudsmit » Feb Sun 22, 2015 5:43 am

You may want to see this: https://github.com/jacgoudsmit/L-Star/t ... re/KimStar

The KimStar/MicroPle1 directory in the GitHub Repository linked above will let you use a Propeller QuickStart board and a few wires to add the Replica-1 functionality to the MicroKim without losing the KIM functionality. I'll do some more work later on and I'll post some articles when I have time.

Basically what I did is: I connected the address bus, data bus, R/~W, PHI2 and DEN of the expansion bus on the MicroKim to the pins of the QuickStart board and used the software from my L-Star project to control DEN (so that the RIOT and RAM chips are mapped at $0000-$17FF) and so that the KIM ROM files are mapped at $1800-$1CFF (normally that's where the on-board EPROM is mapped, but my EPROM is corrupted). Also, I let the Propeller map the Replica-1 ROM into $E000-$FFFF and the Apple-1 PIA emulator at $D010 which is where Woz mon expects it.

The Propeller code patches the Replica-1 ROM (*) so that the reset vector is changed to $1C22; this way the system still boots up like a KIM-1: the displays light up or (if you have JP2 installed) the MicroKim serial port works. You can do all the things you can normally do with the MicroKim (**) and you can start Woz mon by pushing AD F F 0 0 GO. This will let you save and load programs with the Woz mon and it will let you write KIM programs with Krusader ($F000) or even Apple Basic ($F000). Reversely, you can go back to KIM mode by using Woz Mon or the Krusader monitor to jump to $1C22 which is the normal reset entry location in the KIM ROM.

There are some things I want to improve; for example there is about 20K of RAM left over in the Propeller that I can easily map into 6502 memory. I may design a simple circuit board to plug a Propeller QuickStart board into the MicroKim expansion port, for those who don't want to go through the trouble of connecting 28 wires.

2015-02-22 02.06.39 small.jpg
MicroPle1 ready to start Woz mon (just hit GO)
2015-02-22 02.06.39 small.jpg (286.78 KiB) Viewed 23493 times


Have fun!

===Jac

(*) Actually I just realized I'm using the 65C02 ROM instead of the regular 6502 ROM which is the wrong one but that's easy to fix
(**) I just also realized if you want to single-step with the 7-segment displays you will have to change the Propeller code so it patches the NMI and IRQ vectors to the values that the KIM ROM expects. Also an easy fix.
User avatar
jac_goudsmit
 
Posts: 74
Joined: Jun Mon 14, 2010 4:22 pm
Location: Rancho Cucamonga, California

Re: Micro-KIM EPROM expansion?

Postby djones60 » Feb Tue 24, 2015 10:18 am

Well I'm not the proud owner of a Micro-Kim kit ( replica 1 too ). Time to get started building.:) One thing I'm going to do is see if my EPROM programmer will read the one in the kit and make a backup image of it.
djones60
 
Posts: 19
Joined: Aug Fri 08, 2014 4:53 pm
Location: Indiana, USA

Re: Micro-KIM EPROM expansion?

Postby jac_goudsmit » Feb Tue 24, 2015 7:23 pm

djones60 wrote:Well I'm not the proud owner of a Micro-Kim kit ( replica 1 too ). Time to get started building.:) One thing I'm going to do is see if my EPROM programmer will read the one in the kit and make a backup image of it.


Both the Replica-1 and the MicroKim use EPROMs whose images are available online. No EPROM programmer required, at least to make a backup. And for my little gadget you don't need an EPROM programmer to burn the EPROM either: the Parallax software will load everything into the on-board EEPROM that the Propeller uses to run its software.

===Jac
User avatar
jac_goudsmit
 
Posts: 74
Joined: Jun Mon 14, 2010 4:22 pm
Location: Rancho Cucamonga, California

Re: Micro-KIM EPROM expansion?

Postby Tor6502 » Feb Wed 25, 2015 12:56 am

So.. I should have built the MicroKIM instead of the replica-1 and then I would've had both? :)
I like the idea of using a Quickstart this way.

-Tor
Tor6502
 
Posts: 10
Joined: Dec Thu 05, 2013 7:12 am
Location: Norway/Japan

Re: Micro-KIM EPROM expansion?

Postby djones60 » Feb Wed 25, 2015 2:17 pm

jac_goudsmit wrote:
djones60 wrote:Well I'm not the proud owner of a Micro-Kim kit ( replica 1 too ). Time to get started building.:) One thing I'm going to do is see if my EPROM programmer will read the one in the kit and make a backup image of it.


Both the Replica-1 and the MicroKim use EPROMs whose images are available online. No EPROM programmer required, at least to make a backup. And for my little gadget you don't need an EPROM programmer to burn the EPROM either: the Parallax software will load everything into the on-board EEPROM that the Propeller uses to run its software.

===Jac


Actually, I'm going to play with the Propeller too. I mostly wanted to see if my eprom burner would read the chip. Sort of a just to be safe thing, in case I ever wanted to modify the software and run it from an eprom.

Speaking of the Propeller, I'm seriously thinking of trying to get one to work with an original OSI Superboard I have. It's either that or order a Superboard III. Or both :)

David
djones60
 
Posts: 19
Joined: Aug Fri 08, 2014 4:53 pm
Location: Indiana, USA

Re: Micro-KIM EPROM expansion?

Postby cappy2112 » Mar Sat 14, 2015 1:04 am

Paul Förster wrote:Hi,

6 KB of the 8 KB EPROM is unused as the (Micro-) KIM has only a 2 KB ROM. I wonder if it is possible to either map the remaining 6 KB somewhere into the available address space (possibly behind 0xa000 to not have a conflict with the 32 KB expansion board) or is there an EPROM expansion board available? The latter would allow another 24 KB of address space. It would be really cool because that'd allow porting the C64 kernel and BASIC to the KIM. All that would be needed is to remove all C64 graphics and I/O stuff and redirect CHRIN and CHROUT to the KIM ROM as well as remapping a few zero-page locations.

This way, you can have Commodore (Microsoft) BASIC V2 in ROM available at power up. And if the ROM space would be 24 KB instead of 16 KB needed for the C64 port of kernel and BASIC, there could also be a real machine language monitor too. How's that for an idea. But to do that, I'd need at least 16 KB ROM space, 24 would be better.

Vince, is there something like an EPROM expansion card that maps to 0xa000-0xffff in your queue? That'd be a REALLY cool project, don't you think? Or could a second memory expansion board with the RAM chip replaced by an EPROM and relocated to 0xa000 instead of 0x2000 do the job?

Cheers,

Paul


Paul- I have a simple question- what good would it do to put any basic in a KIM ROM, because the only output you
have are the 6 hex displays? I don't see how these could be useful with any high level language, unless
you plan on adding a video output, and full keyboard for input.

Thanks
cappy2112
 
Posts: 48
Joined: Sep Fri 26, 2014 1:28 am

Re: Micro-KIM EPROM expansion?

Postby vbriel » Mar Sat 14, 2015 2:18 am

There is a built in serial port of I/O if you want to hook up a terminal or a computer with a terminal emulator you have full screen I/O. This was built into the KIM-1 and many people don't know it.
User avatar
vbriel
Site Admin
 
Posts: 1184
Joined: Jul Tue 19, 2005 1:10 pm
Location: Ohio

Re: Micro-KIM EPROM expansion?

Postby cappy2112 » Mar Sat 14, 2015 2:43 am

vbriel wrote:There is a built in serial port of I/O if you want to hook up a terminal or a computer with a terminal emulator you have full screen I/O. This was built into the KIM-1 and many people don't know it.


Hey Vince- it's good to see you back!

I've recently got my MicroKim built, and I did transfer 1 program via serial port.
I was surprised that the serial port didn't echo the output of that program though.
The instructions for the program said to remove the serial port jumper after transferring the program,
so that the hex displays would show the program output.

I was expecting that everything that goes to the hex displays would also go to the serial port.
cappy2112
 
Posts: 48
Joined: Sep Fri 26, 2014 1:28 am

Re: Micro-KIM EPROM expansion?

Postby vbriel » Mar Sat 14, 2015 3:32 am

Thanks, lol good to be back. The way the KIM-1 works is you had to choose between the I/O keyboard and hex display, or you could disable it and use a TTY interface. The uKIM is mostly the original KIM-1 so this protocol is the same. It uses some of the I/O that would be used for the display/keypad for the serial port. Would be nice to have both though, I agree.
User avatar
vbriel
Site Admin
 
Posts: 1184
Joined: Jul Tue 19, 2005 1:10 pm
Location: Ohio

Re: Micro-KIM EPROM expansion?

Postby cappy2112 » Mar Sat 14, 2015 10:57 pm

vbriel wrote:Thanks, lol good to be back. The way the KIM-1 works is you had to choose between the I/O keyboard and hex display, or you could disable it and use a TTY interface. The uKIM is mostly the original KIM-1 so this protocol is the same. It uses some of the I/O that would be used for the display/keypad for the serial port. Would be nice to have both though, I agree.



I didn't realize that the serial port could be used for keyboard input and program output. I thought
it was just for transferring the programs to the KIM. The instructions for the clock program inferred that
the program output could only go to the hex display. I need to dig out the kIM user's manual
cappy2112
 
Posts: 48
Joined: Sep Fri 26, 2014 1:28 am

Re: Micro-KIM EPROM expansion?

Postby vbriel » Mar Sun 15, 2015 2:19 am

The clock program was written only to output time to the 6 digit display. BASIC for the KIM-1 was compiled to use the KIM-1's TTY interface for I/O. You can't just port the hex display to the serial port, it has to be written to go there. That would be convenient though! There are samples in the books for sending and receiving data from the serial port. The port even makes a decent attempt at auto baud rate detection, however you can manual set the serial port speed to find a baud rate that works for you. Bit banging is always hit and miss.
User avatar
vbriel
Site Admin
 
Posts: 1184
Joined: Jul Tue 19, 2005 1:10 pm
Location: Ohio

PreviousNext

Return to Micro-KIM General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron