New Breadboard 8088 PC V2 #5 Nanocomp Monitor

New Breadboard 8088 PC V2 #5 Nanocomp Monitor

Show Video

welcome to breadboarding in the previous video we managed to get the seven segment LED display and the keypad based on the Adafruit Neo key dpad plugged in and working and we managed to get some test software running in the EP prom that would at least allow us to test the LED display and the code return from the keypad so this is video 5 in the breadboard PC 888 version 2 and in this video we're going to be updating the 86 version of the nanocom monitor to work with the new display and keypad this is part of the high level plan and you'll see that in this video the number 11 refers to the original breadboard PC playlist where we would have covered this in more detail I went into more detail about the conversion of the 6809 code into 8088 and this is the plan we're following which is a little bit compressed compared to the previous Series where we're going to get this initial Nano comp working first of all with the 7sec display keypad and monitor and the serial Port able to save and load programs from the serial port and then we're going to be building out the basic floppy disc PC able to boot off floppy disc and then be extending that to cover the hard disk enhancing the CGI video controller to do Graphics modes getting a PS2 Mouse working and then eventually we'll be running Windows one two and three like we did in series 1 this is the block diagram we've been working off so we've completed all of this so far previous video we wired in the seven segment display port and keypad port and all of the supporting logic here and what we're going to need to do is to add the reset and abort button so we didn't do that in the previous video so this allows us to initiate reset if something hangs for some reason and the abort key is actually used to jump into the monitor this display registers so that we can actually look at debugging running code so why do we need a monitor program so the Apple One included a very simple monitor called wmon which was coded in 248 bytes and Benita has done a good video on this and he goes into the detail of this and I think recreates Wason on his own 6502 based micro computer so Wason would allow you to inspect memory enter values and do basic amount of debugging then in the early days Tim Patterson of Seattle computer products who was one of the first developer for 86 dos which then became MS DOS in apparently in the early stages of developing 86 dos he used a version of debug in ROM and this version eventually became debug. XE in MS DOS the documentation on debug was was not really great in the beginning and there's a lot you could do with it however it wasn't the easiest to use of programs but it is actually quite powerful then in the early ' 80s a lot of the early computers before the PC had a basic ROM generally Microsoft basic so the Commodore pet BBC micro Spectrum Dragon 32 trs8 all had built-in basic and had similar features for example the dragon 32 included some documentation that's said for users of machine code for example you could use the machine language code can be put in memory using an editor assembler or a basic program using poke can use Peak and poke commands and then the death user and user commands would allow you to jump to machine code so even using the built-in basic you could do some simple coding using machine code although I use the uh mace macro assembler was a plug-in cartridge in fact for the dragon 32 that I have fond memories of so we need a monitor basically to provide something for when the computer powers on gives you some sort of functionality and what we'll be doing is building out the monitor first of all so that we then can start to get the BIOS working once we got a bios that allow us to boot an operating system like msdos so the nanoc comp monitor is a very simple operating system I don't think you'd really be stretching a bit to call it an operating system but it was from from the original 6809 nanocom project from back in 1981 and I had a copy of the ROM actually in a prom from back in 1981 what the monitor will do is initialize a stack reset inup vectors and in fact in the 88 we need it to initialize the segment registers allow you to inspect and change memory execute programs given a particular starting address display register values after a break point so on the 6809 that was the software interrupt 3F but on the PC and the 88886 then that is interrupt 3 which is CC in hexadecimal now the original nanocom supported loading and saving memory to tape that is replaced with saving and loading files over the serial Port using the Motorola s record format SRE which is just a simple text format to allow transferring binary data the original monitor was written in Motorola 6800 assembly code it was then updated to work with 6809 in the July version of the nanoc comp in 1981 in the nanoc comp 6809 video 12 I reverse engineered and disassembled the original monitor ROM that I had with help from Mike spivey's nanom 6802 ROM disassembly at this location I'll include the URLs in the description below so Mike had actually done a disassembly of the original 6802 ROM which helped enormously in working out the differences with the 6809 version and then in the 888 breadboard PC version one series which there'll be a link up the top right hand corner of the screen here to this video then in video 11 we converted the monitor from the 6809 Assembly Language to 888 so I'm not going to go through the changes that we did there but we need this 888 monitor to build and test the Hardware to run and debug the XT bios that we need to run up MS DOS and this is the display that we've got from the breadboard PC series 1 the nanocom 888 version 5 monitor this is the version of the software that going to be using to update with the changes that we tested out in the previous video so just review what the monitor does so we've got the keypad here so we got the load save continue go code segment extra segment memory register and increment Keys here as well as hexad desmal keypad here going from Z up to F so the m key allows us to inspect and change memory and we just keep on typ in keys to change the bite values and then when we press increment then it will save those changes it will also read back the memory so if we're trying to save for example the memory to ROM then in fact when it reads back the value it won't be correct and so it'll actually just jump back to the monitor prompt go allows us to execute a program at a given address now because of the 1 Megabyte segmented memory model that the 8088 886 had then in fact what we need to do first of all is set the code segment first for the top sort of four address bits that we need to specify then the go command allows us to put the lower four heximal address values in the save and load we're not covering here cuz we haven't installed the serial Port yet so we'll cover that in another video continue allows us to continue from an interrupt free so if there's a software interrupt the CC X decimal code so we can use that for debugging things and when we hit that uh int3 it will then display the register values and continue will allow us to continue back where we jump from and Carry On from the next instruction register does a register display and will also be autom atically called on an interrupt increment is used by the memory command and by the register command so memory takes us from one memory location to the next so if we don't type any changes then it just sort of goes onto the next location and in the register display increment just takes us to the next register then these are two extra commands that I added as part of the 888 conversion so es allows us to set the extra segment and that is used for the memory inspect and change and for the save and load that would allow us to load for example programs into say the upper area of memory so perhaps the segment starting with 70000 for example and then the code segment then allows us to set the code segment register as well for the execution of that now what we also need to do in the original keypad the reset and the abort key were actually on the keypad here but because those need to be wired into Hardware lines rather than this Matrix I've actually got some separate keys to put in there so as part of this video we're going to wire up the reset and the abort button which actually does the non-maskable interrupt so let's take a look at the changes that have needed to make so I've got version six of the monitor here which is a new version compared to version five which is the version that we saw from the LED display previously and the number of changes have gone through here I'm only going to cover them in summary because we kind of did most of the changes in the previous video when we were doing the the updates necessary to the test program to handle the New Ports and the Neo key keypad so Neo key keypad we're now using the ports at 4 and 401 we've got the new key code so I've updated key codes and we've also got the two new keys for the code segment extra segment we're going to be adding the serial port in the next video so that's just the address that we'll be using for the serial Port coming up now you'll see that the control port a and control Port B are no longer needed because we're not using a peripheral interface adapter Pia or parallel port we're just using sort of hardwired Ls logic ports and I've updated the display to show version six so we know that we're running the later version we're now dealing with rows 0 to four or Row 1 to 5 if it's one index rather than zero index we just need to increase some of those values the last digit will now be 0 D rather than 0 C when we've gone beyond the last digit now we're also now rather than using 7f I'm now using FF to turn all segments off because we've enabled the decimal point as well so if we want to we can now use a decimal point and we got again the new code for the new keypad and the get key probably has a few more changes in again all of the control Port initialization is now removed and there's just a few changes to some of the comments so the version six monitor has now now those changes have been done and I was thinking should I just do the monitor on its own or should I just leave it still Incorporated with the BIOS but I decided it's probably easier since we're going to be doing the BIOS soon what I've done is here is the BIOS that we used in the previous version of the bread PC and this actually referenced and included the monitor with within it and all I've done is I've changed this from version 5 to version six it's probably easier to do this and then we'll come and look at the bios at a later point but this least means so I don't have to change any other code here so what we're going to do in fact is in assembling the monitor what we're actually going to do is to follow the build instructions for the BIOS where the monitor is actually Incorporated so we're just going to make that that's all finished without any errors so what this means is when we're programming the at prom we just need to make sure that we allow a space at the bottom of the eom for the IDE bios when we add that just going to start up XG Pro just going to take the prom out of the zero insertion for socket make sure it's the right way around at the bottom there it's in the programmer they're just going to read it first of all make sure it's in the right way and you can see here this is the code test code that we used previously there's only a little bit of that at the beginning and it has the reset code now we're going to load the BIOS file which includes our monitor so by default this starts in the Monitor and then when we Press B it then actually starts the bios so we're all set up then for when we start to add the PC compatible parts of this to the computer now the only thing we need to do is we need to make sure we load this from 4K into the 32k at prom so this allows us to have the first 4K being the XD IDE bios so when we load this you'll see that when we go from here down to 1 you'll see here the first 4K is all fs and then we have the BIOS starts there then some of the way down there will be the uh Monitor and then at the end can see here we have the reset code that actually jumps to F0 00 c00 0 so the monitor actually starts at c0000 okay so we're just going to program that put the at back into the socket and we'll try powering up so what we'd expect is it should come up with u NC 888- 6 version six that's good so it's come up with nanocom 888 version 6 and if we now press key here we now got the nanocom prompt and if for example we want to look at 000000 memory we can see that there's the memory there the load and save aren't going to do anything at the moment and if we hit R we'll get the registers so that is the flags there code segment instruction pointer stack pointer the ax CX DX BX the base pointer source index the destination index so those are the registers that we need to worry about just try setting some memory so we've set the code segment to 70000 0 the extra segment 70000 so this is the top bit of memory just below 512k if we go to 00 0 so I've already put 00 0 01 02 03 in there if you go back and try and change that to FF FF Fe FD FC we go back and have a look FF Fe FD FC so that appears to be working if we Tred to do this in the ROM area for example so if I change the extra segment to f0000 for example and then we go to f ff0 can see this is EA 00 c0 00 F0 so that's the reset code if I try to change this so change that to FF you'll see it doesn't save it properly because it's read only goes back to the monitor so if we try and make a change and the memory can't save it then in fact it goes back to the monitor at the moment my reset button is this line is this wire here so if I ground this momentarily you'll see it'll go red show that it's in reset and at the moment you can also see that the display here is actually latched on now I did do some changes to avoid this but I I think I didn't quite account for one thing that we're going to need to look at so when we're in reset we're actually getting one segment s of burning quite brightly there if I take it out of reset it goes back to the nanocom so that's something we need to look at to see if we can fix that we really would want that all the all the LED display is off during reset now these are the buttons I was going to use for reset now originally I'd intended to try and put these over here but when I tried it out a little earlier what I was Finding is by the time all the wires came all over here there was enough interference on the reset button line that in fact it wouldn't actually go into reset so what I'm going to do instead is we're just going to put these down the bottom here and and I'm going to wire in the turned off at the moment going to wire in the ground line first of all very close to chip here we'll wi in the 5 Vol as well and then this is going to Wi in the non-maskable interrupt actually to 5 Vols we're just going to change this now that the push button reset is now going to go to here we'll leave the interrupt the moment all I want to do first of all is just to make sure to see can we now reset this rather than using our yellow wire here to do it can we now actually do reset so if we turn it on and if we go into the monitor here but press the reset button we should see the red light come on when it's held down we might see a segment illuminate here we need to fix and then when I release it then it should after about half a second go to green light right and then we should see the nanocom display message okay so that is definitely resetting and we see the segment there illuminated re relase it right that's working okay now I'm just going to turn it off again and this is wired to this button here is wired to 5 Vols and we're going to plug this into the non-maskable interrupt there we go so this is now plugged into the nonm markable interrupt so what this should do is actually take us back to the monitor so if I go into here doing something and if I press this yes it takes back to the mon and if we want to we can also then press the r to display the registers what we're at that seems to be working so I've got the I've got the reset button and the abort button which does the non-maskable interrupt that will always allow us to interrupt the bi or something like that to if we need to do any debugging and we can also see that the green go light means that the processor is running the red light means either there's a power problem or we're in reset the only thing we need to fix now is this sort of segment here which seems to be Illuminating when it in reset which I did include some configuration in the pl s to prevent that but we need to have a look and see why that is occurring so let's take a look at the pl configuration and the schematic if we look at the schematic the intention was that when there was a reset that we would actually set all of the sp0 to sp3 lines to one so this would these would all be ones and so this would mean that it' be out of range so either it would it when we looked at the data she we saw that anything above nine would end up with none of these outputs selected I had a look at the PD configuration and although I had set these to be set to one when there was a reset the trouble is is that the preset is actually synchronous with the load B so unless we can actually get load B to clock this then in fact the preset won't actually work so go to the pl here so we we can see here that the load B is the clock that's coming in from the control PL and we can see here that we've actually set the pre the synchronous preset for this to be the reset however this will only take into account if load B goes from low to high now I had to look at the other PL to see how easily that would be to do and it isn't actually particularly straightforward and so what I was thinking is what we really need to do is sp3 is not actually used for anything other than this reset condition so what I might be able to do is to change the rules here and actually rather than using this table to do the mapping what I might do is comment this out and put in the rules that this generates specifically and I'll just include that the sp3 will just be set to reset so when reset is active then sp3 will be set to high and it will mean that none of the display segments will actually be output so if we have a look at the doc file that's generated we can see that in fact that the values for the sp0 through to SP 2 are actually included here so we can actually just copy those into here and the sp3 as well and all we need to include in here is an all that says all reset okay so I've done the changes so this is first three now and all I've done is down the bottom here I've now disabled the preset because without the clock on the load B then under reset that won't occur so now what we're going to be doing is setting sp3 to one during reset and I've commented out the table mapping here but I have been able to use the generated rules from the documentation file I've just put in the rules there for sp0 1 2 and 3 and and then I've just added three that if reset is enabled then in fact this will be one this should actually prevent the digits from occurring we just need to compile this and program it to just turn the project off because it will crash if the project view is enabled so I'll just compile that that's compiled successfully so now I'll just program the plld and put it in and see whether or not that works okay so that's all plugged in programmed let's try it out see if it works okay so that looks okay so that's working so far and now let's press the reset button and see if that results in the blank display or we still have any segments left that didn't do any good so back to the drawing board let's have another thing so in fact what the problem was in the changes I made here I'd forgotten that in fact the sp3d this was still latched and so the reset would only take account if there was a clock Del Lo B clock signal so it wasn't any better than what we had before with preset but what I did not notice is we've got a spare output pin here so what I've done now is I've changed this pin to be the latched sp3 for reset purposes all I'm now doing is just combining that output there with reset for this one here so when reset occurs then this will immediately change it's not dependent on a clock so let's just look at the pins here so we've got our pin 14 sp3 reset and what's going to happen now is I've just changed the SP 3. D to sp3 reset. D so this is the one that's going to get latched on the clock but then the sp3 output is in a combination of this one here and reset so that hopefully should sort it out so all I'm going to do is to recompile that program it and then we'll fit in the circuit and see if that's fixed the problem okay so the updated plld has been fitted in here so we're just going to power this on make sure we still get the display and going back to the monitor prompt if I press reset now what we'd expect to see is display to go completely blank which it has we get it back and if I press this again yeah blank that would appear to be working so that's good and then the abort still works so we in something like this press abort great so those those two things working I might try and tidy this up at some point in time but but didn't really have enough space to put this in the board up here at the time I think probably keeping it separate for the moment will be fine those changes have been done we've wired in the reset and abort we've got our monitor working now the only thing we haven't been able to test yet is the save and load from the serial port and so what we'll be doing in the next video is we'll be adding a modern serial Port so this is in fact a 1655 50 uart so this is one of the faster ones and in fact this one happens to be a surface mount device which I have got a video of soldering a surface Mountain device onto a dip connector that we'll look at in the next video and then we'll also just test that we can download S record file format binary files and load and send those as well so if you don't want to miss out on future videos then please hit subscribe and if you can hit like it just helps to make the videos available to more people thanks for watching

2025-03-20 19:28

Show Video

Other news

Trade War and Tech, Tariffs Could Hurt Trump’s AI Goals | Bloomberg Technology 2025-04-12 19:49
Is Your Infrastructure Ready for the Age of AI? 2025-04-12 10:02
Rob Emsley, Dell Technologies | Is Your IT Infrastructure Ready for the Age of AI? 2025-04-13 02:35