The Novels

Economics 101, a Novel (Rough Draft) -- My first sustained attempt at a novel, two-thirds finished in rough draft, and heading a little too far south.
What would you do if you and your study partner, with whom you had been seriously discussing marriage, suddenly found yourselves all alone together on a desert island? Study economics?
Sociology 500, a Romance (Second Draft) -- The first book in the Economics 101 Trilogy.(On hold.)
Karel and Dan, former American football teammates and now graduate students, meet fellow graduate students Kristie and Bobbie, and the four form a steady study group.

Featured Post

Sociology 500, a Romance, ch 1 pt 1 -- Introducing Bobbie

TOC Well, let's meet Roberta Whitmer. Bobbie entered the anthropology department office and looked around. Near the receptionis...

Tuesday, February 11, 2020

Backup: 33209: Bootstrapping, or Baby Steps

Backup of https://joelrees-novels.blogspot.com/2020/02/33209-bootstrapping-or-baby-steps.html.
Second backup at https://joel-rees-economics.blogspot.com/2020/02/bk01-33209-bootstrapping-or-baby-steps.html. Major changes from Friday evening.

Chapter 7.5: A little about the 6800 (and Others)

Chapter 8: Bootstrapping, or Baby Steps


After delivering the Saturday morning edition, I lined the inside of the box with sheet metal and installed the fan and the power supply, mounted the mainboard horizontally on offsets, grounded the board to the Faraday cage, mounted the keyboard, and tested that it still worked when everything was assembled.

While I worked on designing the dynamic RAM circuitry and the ROM circuitry, Giselle played with the computer, using Tiny BASIC and asking me how to do things as she experimented.

Departing drastically from the example refresh circuit in the manual, I decided to borrow the video display generator's scan for the refresh strobe.

You may be thinking that the video scan works on the wrong part of the address for refresh. You're right. Dynamic RAM refresh strobes have to count through the row addresses several hundred times per second. The VDG's lower address lines continuously count, completing their count tens of times per second, but if you attach the address lines in the usual way, the lines that count end up being column addresses, not row addresses.

However, contrary to ROM, RAM doesn't really care about the order it is addressed in. Where you write the data is where it reads back from, and if the address lines don't change between write and read, the readback succeeds without any notice that the lines don't match the labels.

Well, many dynamic RAMs have row burst mode for speed, and if you use row burst access, the row must be an actual row. Otherwise, you'd be burst accessing with gaps, which is generally not useful. Row burst wouldn't allow what I did at all. But the Micro Chroma 68 would definitely not need row burst mode. Adding cache RAM and seeing how far beyond 2 Megahertz I could overclock it was not part of the plan.

So, if I swapped the usual rank of row and column, I could borrow the low order address scan count for refresh strobe, by addressing the dRAM rows instead of the columns with the VDG low address lines. Doing this, the row refresh would be completed within the required timing of once every ten or so milliseconds.

I was a little worried that changing VDG modes would cause problems, but it looked like it would still be quick enough, even if the VDG skipped a frame. So I decided to wire it up and see if it would work.

I added a whole 6821 PIA for an extra bit of output to switch between the lower 32K and the upper 32K. That was a waste, but I thought I could use the extra bits elsewhere.

With a bit of additional logic, I was able to decode the selected 32K bank starting just above static RAM, at addresses $2000 to $9FFF, giving 40K of contiguous addressable RAM.

I quickly had enough of a circuit design put together to walk to Radio Shack and pick up perfboards, a bunch of headers and sockets for them, some 74LS series bus buffer latches, and some other parts, and start wiring the circuit up on one of the perfboards, using point-to-point soldering on the low-profile socket pins. I wasn't able to finish wiring the board before bedtime.

*****

On Sunday, Br. Burns gave me the name and contact information of the manager at the local IBM office, Margaret Bight, and told me she would be expecting to hear from me. I invited him to come take a look at the Micro Chroma 68, and he brought his family over to visit after church meetings.

"Not sure what to say. It looks like a very capable toy. Games, maybe?" was his impression.

Hard to argue with.

I spent Sunday evening at a young adult home evening activity, where we had a gospel-oriented discussion and played Uno after.

*****

Monday evening, I finished wiring up the dynamic RAM and wrote some code for testing it. It worked for both banks of 32 kilobytes, keeping memory contents even when switching between VDG modes.

However, when I tried using one bank as a high-speed substitute for mass storage, I discovered that switching banks to write each byte would corrupt  the bank switched out. It wouldn't be a problem to buffer the data in the static RAM, but I didn't see why it should be losing the data when switching for every byte.

While I analyzed the schematic, Giselle tried it out, quite happy at being able to try out some of the larger BASIC programs she had found in a book at the library.

I couldn't find the problem by just analysis.

*****

Tuesday, I dropped by Dr. Brown's office to ask if I could borrow a scope again to analyze the problem. He said I could.

That evening, after homework and before scriptures, I looked more carefully at the 6844 direct memory access controller. I wanted to see if there were some way to squeeze it into the Micro Chroma 68, to reduce the I/O burden on the CPU if I added a floppy disk controller. It was clear I'd have to perform an extensive bit of surgery on the Micro Chroma 68's printed circuit board in order to hook it in.

So I set that idea aside and started working out the EPROM programmer from the EPROM application notes. Realizing I needed more than the 5 volts that the simple power supplies Denny and I had built, I dug through the spec sheets and application notes that Denny had given me and looked at a switched mode power supply controller's application notes.

Wednesday, with Dr. Brown and the classes observing, I determined that the 6821 was drawing more power than I was giving it when I switched it that fast. Adding a decoupling capacitor on the memory board, and running an additional power and ground pair of wires to the RAM board solved the problem.

(The real me never put a scope on the problem, satisfied with 32K of RAM that he was not thinking he would ever fully use. He seems to have preferred painfully slow progress on Tera he and more daydreaming about CPUs, memory, peripherals, and code. Daydreaming. Speaking of which,  the timing on getting the real world Giselle involved with computers was much later, and involved a different CPU. So it might have been power problems, or it might have been timing, or I may have gotten the strobe and the bank switch line crossed up somehow. Until I can un-mothball it, I have no way of knowing.)

At the library, I made a copy of the dRAM circuit diagram for Denny, with notes on the power requirements.

When I got home, I called the IBM office, and the receptionist set me up with an appointment for the next week, instructing me to prepare something written about what I would like to accomplish during the internship. She didn't give me any clues about what kind of goals might be appropriate.

With the RAM circuit settled, I added ROM sockets to the board, using more of the 6821's output bits and some logic to select the ROM socket to enable. Since the EPROMs I had were 4K, I wired the sockets to be addressed as 4K EPROMs.

(The real me ended up wiring the dRAM in the kludge area of the mainboard.)

*****

On Thursday, after delivering the papers, Mom and I were in the kitchen. I was waiting for some toast to pop up, cutting a slice of cheese, for a snack to fuel my work on the EPROM burner design.

Mom was working on Dad's and her income tax records on the kitchen table.

Giselle snuck in through the living room, with a suspicious expression and a squarish load in a plain brown paper grocery sack under her arm and went straight to her room. She returned to the living room, sans load, and announced that she was not, under any circumstances, to be disturbed, then returned to her room and shut the door.

"What do you think is in the box in the bag?"

"Looks about the right size to be a Color Computer," I guessed, semi-randomly.

She nodded and went back to her bookkeeping.

Twenty minutes later, I was back in my room sketching out a tentative design and writing out a parts list, when Giselle came in looking frustrated.

"I need your help. But you have to promise not to tell Mom and Dad."

"Sure. I'm sure you'll tell them yourself anyway, and I'm sure whatever it is can wait until you do. But, just so you know, Mom and I already guessed it looked about the right size for a Color Computer."

"Well!" She stood, arms akimbo, angrily staring at me.

"It was a guess. Giselle, we know you're not going to do anything bad, so just take your time, and if we guessed right just pretend we guessed wrong. Okay?"

She turned without answering and left. From the hall, she called. "Are you coming?"

"Coming."

Spread out on her bed were a Color Computer with only 4 KB RAM, manuals, a program pack cartridge, and a 64 K RAM upgrade kit. "It was on sale," she explained.

"You want me to install the RAM upgrade."

"I want you to make sure I turn it on right."

"Okay."

"Then install the upgrade."

I obliged, fetching my tools and my TV from my room. After letting her check that it turned on okay, I carefully removed the "NO USER SERVICEABLE PARTS INSIDE!" sticker over the middle screw in the base without tearing it, and opened the case up. I may not have been a Tandy service technician, but I sure wasn't just an ordinary user.

Pretty soon we had the 64 K RAMs swapped in, the circuit board modified as necessary, and BASIC showing its welcome message once again on my TV screen. Giselle checked how much RAM she had:
PRINT MEM
24871
"That's not 64 K!"

"True. But that's what half of 64 K looks like after BASIC reserves the RAM it needs and the display RAM. The top half of the RAM shadows the ROMs and ports. To use the full 64 K, you'll need to either copy the BASIC ROM into RAM or use OS-9. And you'll still not be able to access something like 8K, I think."

"OS-9 needs disks."

"Yes, it does."

"So what do I do? I don't have any more savings I dare spend."

"Good question. But you can always use the RAM you do have for whatever you were going to do with it."

"I bought a word processing cart."

"Sounds good."

"I want to run a business typing. How do I print?"

"I don't know much about business, but you need a printer, and your own TV for display, too. I think it's time to consult with Mom and Dad."

She looked at me with a thoughtful face.

"Okay."

And she went in to get Mom.

I watched for a few minutes while she and Mom used my TV and cassette recorder to get familiar with the new computer and word processing cart.

Her word processing cart used the Color Computer's highest density graphics to produce true lower case letters on the screen, and to make preview modes available, where you couldn't see the actual text, but you could see how the text would spread across the page.

Mom asked questions as Giselle tried things, and Giselle let Mom take her turn. Shortly, Giselle had the basics of the word processing cart mastered, and had typed in and saved some sample documents. I went back to my room to work some more on the power supply a little before Dad came home and came into my room.

"Hi, son."

"Hey, Dad. What's up?"

"I need your help. Wheres our Mommy?"

"She and Giselle are ... in her bedroom discussing some things."

Dad ducked out of my room, and I heard him start chuckling quietly in the hallway. Then he came back in my room. "Looks like one of my questions is settled. Can you come give me a hand?"

"Give me a minute to complete my notes and I can."

"What're working on?"

"Need a different power supply than what Denny and I built, different voltages for all the stuff I want to hook up."

"Will you need it for a printer?"

"Depends on what kind of port the printer has. Are you thinking of buying a printer?"

"There was a, I think you called it a dot matrix, printer on sale at Radio Shack."

"Oh."

I finished the line I was drawing and went with Dad to the living room.

"If it won't work, we can take it back today."

I looked at the box, and it was one of the printers that had both a standard parallel interface and a serial interface for the Color Computer. "This will work with Giselle's new, uhm, tool."

"Well, that's good to know."

"I'll need to wire up the ports to use it with the Micro Chroma 68, but it should work okay with that, too."

"Then we'll keep it."

"If you think the family finances are up to it."

 "We'll be okay."

"I upgraded Giselle's computer to 64 K, but she still needs a TV monitor and cassette recorder of her own before she can start using it for real."

"Ah. Yes. I should talk to your mother. He turned toward Giselle's open door. "Max? Can I have a word with you?"

Giselle started and turned around with a guilty look on her face.

Dad grinned at Gizelle. "Hi, Zee."

"Uh, hi, Dad?" She swallowed.

"Nice day for new tools, isn't it?"

"Uhh ..."

"What do you need, Ted? Giselle and I were exploring her word processor program."

Dad indicated the living room with his head.

"Just a minute, Giselle."

I went back into my room, to allow Mom and Dad to consult in private. It didn't take long, and Dad called me into Giselle's room to help hook the printer up.

Giselle's test documents printed nicely, and we were all pleased.

"But I understand you need a TV monitor and a cassette deck of your own."

"Well, ... yeah. I do."

"If I bought them, would you mind sharing? Letting me work on my class handouts and tests when you aren't busy?"

Giselle's face lit up. "I could do that!"

So we went back to Radio Shack and picked up a TV and cassette deck, checking the demo units to see that they worked well with the demo Color Computer.

Back home again, I called Denny.

"Now what?"

"Got the dynamic RAM working pretty cheap."

"Oh, yeah?"

"Used the VDG for the refresh counter."

"Heh. Send me the diagram?"

"Tomorrow. I'm looking at the EPROM burner and other I/O, and we need power at other than 5 volts. I'm looking at building a switcher."

"Are you sure you want to do that? Why not just do a voltage doubler?"

"Voltage doubler, switch mode, .... Hadn't thought of that. Would be a bit less of a reach."

"Well, yeah. That's the point. Get this built so you can use it to help build your real computer."

"Hmm. I guess I'll look at it. So, what I'm really calling for, I'm thinking your surplus store is going to be the best place to get a UV EPROM eraser and a raw disk drive."

"You're wanting to come down for the three-day weekend ...?"

"Was thinking next week or the week after, actually."

 "Why not jump on it now?"

"Giselle has bought herself a Color Computer, and Dad and Mom have bought other things she needs, and she's going to be wanting help this weekend."

"She's what? No, no, she's supposed to wait until we've built our super-duper computers and use them!"

"Heh."

"Well, ..., okay, tell her I forgive her. This time. And to have fun with it."

(As noted previously, this whole episode did not happen at all in the real world. I don't know if Giselle would have taken to the Color Computer as readily as this, if it had.)

*****

Over Friday and the three-day weekend, I got voltage doublers working for RS 232C and the EPROM, and I wired the fast cassette interface, a parallel printer port, and a couple of serial ports on one perfboard. The parallel and serial ports worked fine for the printer, with a cable adapter for the serial port. The fast cassette interface also seemed to work fine, but I wanted to take it in for tuning the next week.

I used my own text editor and text processor to write up a proposal for the internship, focusing on my experience to that point, my interest in using Japanese on computers, and on my interest in how things were done at IBM, and printed it out on the new printer.

Dad got some handouts worked up on Giselle's computer, and Giselle started putting typing samples together to use when talking with clients.

*****

And I somehow had time to go play softball with the church young adult group on Monday.

When Brandy hit a homer in the eleventh inning and our side won, I cheered with "That's my woman!"

She politely but firmly informed me she was not my woman, and I filed that cheering phrase away as one not to use without considering how the woman I was cheering might perceive my interests.

Maybe "That's our woman!" would have been better, but somehow I doubted it.

Chapter 9: Headwind

[Backed up at https://joel-rees-economics.blogspot.com/2020/02/bk-33209-bootstrapping-or-baby-steps.html.]

No comments:

Post a Comment

Keep it on topic, and be patient with the moderator. I have other things to do, too, you know.