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, June 2, 2020

Backup: 33209: Storm Warnings, and Exercising Diskette Drives and Controllers

Backup of https://joelrees-novels.blogspot.com/2020/06/33209-storm-warnings-exercising-diskette-drives-controllers.html.


Chapter 11.9: Headwinds -- Becalmed

Chapter 12: Storm Warnings, and Exercising Diskette Drives and Controllers

[JMR202006031137 rewrite:]

When Julia and I got to the electronics lab after lunch, several of the members of the group were already there. Mark and Jeff were working on their Micro Chromas and daughterboards. Others were reworking their trainer designs to use 68705s.

"Hi guys," I said to all and no one in particular. "I doodled up some ideas about the daughterboard last night."

"How'd you find time?" Jeff smirked, with a meaningful glance at Julia.

Julia rolled her eyes and shook her head.

"I managed. Do you want to see?"

"Ignore Jeff." But Mark also smirked. "Yes. We want to see."

Julia sighed. "Should I take notes on this, too?"

"Could you?"

"Sure." She gave me an indulgent smile.

"Sorry. Appreciate it." I gave her my doodlings from the night before and went to the chalkboard. She sat down between Mark and Jeff at our lab table, and they helped her translate my diagrams and explanations into useful notes.

While I was working at the chalkboard, Winston came in and sat down and started copying the diagrams.

As I completed the diagrams, Bob commented, "You're trying to put the whole computer on the daughterboard."

Suzanne came in about that point, and also sat down and started copying the diagrams

"Yeah, if I actually build one with all of this on the daughterboard connected through the CPU socket, it's likely to shake loose and come unplugged and leave the Micro Chroma with memory but no brains. But it's something to think about. Scratch calculations."

"How about adding just the DMA controller?" Jeff asked.

"If I understand the application notes, this should cover it." I drew a second diagram with just the 68701 and the DMA controller and some support circuitry.

He nodded thoughtfully. "In that case, I'll leave space for the 6844 on mine."

Mark agreed that was a good idea. Others in the group didn't seem so sure.

Dr. Brown came in, carrying rails of ICs. "Mrs. Steward left these 68705s with me last night. As she said, there aren't quite enough for everyone to get one, but she'll be sending more pretty soon. Come get them when you're ready. First come, first serve."

"Should I make a run to Austin tomorrow for more?" I suggested.

Julia reached out and poked me in the back with her pencil. "You need to finish your disk drive controllers. If I understand right, we need those so everyone can program their 68705s."

She was right.

So I sat down and focused on writing a set of programs to exercise and test the disk drives by writing a variety of troublesome pseudorandom data patterns and reading them multiple times. My initial test routines recorded parity errors in addition to reads that didn't match the generated data, but did not attempt retry-on-error.

While the test programs were running, several of us made a run to the parts store out on West County Road, and visited the surplus store nearby. When we came back, Julia had the parts she needed for her Micro Chroma and its daughterboard, and a keyboard that would need a decoder.

Until time to go deliver the newspapers, I made sure the students building Micro Chromas were progressing okay, and helped other students with whatever they were working on, mostly trying to understand the differences between the 6801 and the 6805, and modifying their trainer designs to fit.

Mike was working on adding a 68008 to his daughterboard design as a co-processor.

"You know, anything you do now with the 68008 is strictly theoretical," I warned him. "The specs we have are tentative, and we have no idea when we can get real CPUs."

Mike shook his head. "I'm going to be ready to put one in when they're available."

"How about designing it for the base 68000 ?" I suggested. "I can get you one of those." I sensed Julia staring at my back, and I glanced over my shoulder. With her eyes, she asked me what I was doing. I gave her an it's-okay look, and she wrinkled her forehead and set her mouth slightly to the side.

"The 68000 addresses a word address space." Mike was talking about the 16-bit data bus, twice as wide as a byte wide data bus.

"I've seen application notes for multiplexing the 68000's data bus so it can read sequential bytes in a byte-wide address space."

"That'll be messy and require debugging. Besides, the 68000 is a big 64 pin chip. That's going to make the daughterboard physically unstable, too, like a daughterboard with lots of RAM and ROM."

"Point taken." The rest of his design looked good, so I left him to his own devices.

Several times, I noticed him covertly watching Julia. Once, while I was helping someone across the room, I saw Julia catch him looking at her, and she gave him a look of reproach that could have put ten 68000s in state-preserving static halt and cooled the Three-mile Island reactor core without any physical coolant, and still had effect left over.

I chuckled to myself, and she heard me, but she waited to give me a perplexed frown until Mike had looked away.

Other than Mike's sad-puppy expression, I couldn't read much from his reaction.

Dr. Brown said he'd stick around until dinnertime, so I left everyone at work on their projects and headed home to deliver my newspapers.

When I got back, I stopped the disk exerciser and checked the error counts.

"Errors?" Julia looked over my shoulder.

"There should be a few, from dust in the air and other random environmental stuff. This is about what should be expected."

"But errors are no good, right?"

"The places where the data read doesn't match the data written all show parity errors or sector checksum errors, so we're in good shape. Now I need to add retry routines, to see whether the errors will repeat."

"Hold on here," Julia complained, "I have no idea what you're talking about."

Jennifer, who was also among those watching me work, said, "Dr. Brown has explained parity in class, but some of us didn't really get it."

So I went to the chalkboard again and wrote out a list of numbers and their byte checksum in ordinary arithmetic:
72
101
108
108
111
33
-------
533
533 ÷256 = 2 remainder 21
"If one number changes, the sum and remainder are going to change, right?"

Blank looks.

Mike laughed. "Well, if those are all byte values, yeah, because if the last number is changed to 289, the remainder doesn't change, but 289 stuffed in a byte gets clipped to 33 anyway."

"Exactly."

Still more blank looks than recognition.

Julia gave me a look of resignation. "Step by step, please."

Mike stood up to the board and wrote 33+256=289 beside the 33, then erased the 33 and replaced it with 289, and adjusted the sum to 789, and the integer quotient to 3:
72
101
108
108
111
289     33+256=289
-------
789 
789 ÷256 = 3 remainder 21

"But," he continued, if all of these are bytes of memory, none of them can be larger than 256. And 289 modulo 256 is back to 33." And adjusted the the sum and results accordingly.
72
101
108
108
111
33     33+256=289, 289 modulo 256 = 33
-------
533 
533 ÷256 = 2 remainder 21
He gave me a challenging stare. I gave him a thumbs-up, and lost a little air and sat down.

Stephan shook his head. "But what if there are multiple errors? Couldn't the errors cancel each other out?"

"It's a statistical game, really. In practice, errors that cancel each other out are really rare, and we keep the sector size small to keep it that way."

Jennifer said, "So that's the checksum?"

I nodded. "Except that the actual checksum uses exclusive-or instead of addition."

Dr. Brown laughed as most of the group looked like they were ready to give up on the question. "I'm glad it's not just me that has problems getting this across."

"It is pretty arcane math," I admitted. "It's also a case where having the computer helps a bit. I don't particularly want to clear out the error numbers, but I could write a BASIC program for this."

"I put the numbers in my notes."

Julia gave me a look that expected a reward. I gave her a hug. She stiffened and grumbled under her breath. "Just a hug?"

"I don't want to crush someone," I sub-vocalized back before saying, out loud, "I owe you one. Another one."

Julia smirked and hugged me back.

And there were snickers and chuckles.

I booted Tiny BASIC and typed, with Julia taking notes, and others copying from her notes:
10 DIM A(10)
20 A(1)=72
30 A(2)=101
40 A(3)=108
50 A(4)=108
60 A(5)=111
70 A(6)=33
80 S=0
90 FOR I = 1 to 6
100 S=S+A(I)
110 PRINT CHR$(A(I));
120 NEXT I
130 PRINT
140 PRINT S
150 D=S/256
160 PRINT D
170 PRINT (D-INT(D))*256
200 END
Then I typed "RUN", and Tiny BASIC output the results:
HELLO!   
 533          
 2.0820   
 21      
      

I played with values in the array and showed how different changes produce different results, and how there were very few changes that could preserve the checksum.

Then I modified the summation in line 100 to use the exclusive-or, and again showed how changes in the values changed the checksum.

Several of the other members of the groups tried modifications of their own, and eventually most of the group were satisfied.

"Parity is similar, but it just works on bits, and the parity check is kept for each byte, but we can save demonstrating that for another day. Doing it in BASIC will be confusing, and doing it in assembler might not be much less confusing. And I need to go down the rabbit hole for a while."

Everyone went back to what they were doing, and I rewrote my routines, adding retires on parity and checksum errors, and adding read-after-write checks to the sector write routines. I also altered the tests to track the count of retries and non-recoverable errors, where the automatic retries didn't fix things, separately. And set the new tests running.

While those were running, I checked with Jeff and Mark on their progress. They hadn't been able to get their Micro Chroma boards with their daughterboards to boot far enough to get output on the screen, even though the video controller circuits appeared to be working. Both of their boards came up in what appeared to be a graphic mode, with arbitrary data in the video memory that showed as not-very-meaningful stripes on the screen.

"Do we want to figure out why the contents of video RAM looks like stripes instead of a TV screen filled with static?"

Jeff was quick to say "No." Mark just grinned and shook his head.

We got scopes out and started tracing signals, and found some wiring errors. With those fixed, they both got the TV-BUG prompt to show up.

They both had found decoded keyboards with ASCII output, and, with some testing and rewiring of the keyboards themelves, were able to issue commands to the monitor and get results.

"So are you and Julia going to be working on her Micro Chroma tomorrow?" Mark asked.

Julia and I exchanged glances, and she smiled.

"Probably," she said. I grinned and nodded.

"Where?" Jeff asked. "Can we come crash the party?"

"My place?" I suggested.

Julia nodded. "But only in the afternoon."

Dr. Brown interjected, "If you guys want, I'll open up this lab tomorrow afternoon, from one to four or so. Then you'll have scopes and other tools available. But only if we can shut this party down within the next half-hour or so."

That announcement was met with cheers.

"Change of plans," I declared, and we all shut our work down and packed up.

When I checked, there was only one read parity error during the second test run, and the first automatic retry got the correct data.

*****

"Coming to my house for dinner tonight?" I turned left on Andrews Highway, coming out of the parking lot.

"Just dinner?"

"Well, and homework ..."

Julia put her hand on my hand, where it was resting on the shift lever. "Homework. Do you think we'll get my computer as far as Mark's and Jeff's tonight?" She gave my hand a squeeze.

"Was there something else you wanted to do?"

She sighed. "So many things ... I want to do ... with you ... tonight."

I swallowed hard and almost missed the red light at 27th, squealing the tires to get stopped.

Julia laughed as she braced herself with her free hand. "Wait. I didn't mean what that sounded like."

"No?"

"Maybe." A smile played across her lips.

I turned my hand palm up and returned the squeeze. Then the light turned green and I had to turn it back over and shift. Clumsily. Ground the gears.

She giggled. "Sorry."

"Lousy adrenaline rush."

For a moment, she gazed out the window instead of meeting my gaze. "I guess we need to start talking about religion seriously tonight."

"Dang. And I haven't even been trying to court you for real. But we can do that."

"Court. Sounds so courtly." She turned and smiled shyly. Or was it boldly? How can a woman be bold and shy at the same time?

I took advantage of the clear traffic to lift her hand to my lips and give it a kiss.

"Pay attention to the road."

But she didn't take her hand back.

As I turned right onto 38th Street, I said, "If you ever want to talk about Mike, I'm all ears."

She sighed. "We dated in high school, but that's long past history."

"Well, if you ever need to talk about it."

 She didn't answer that, but I felt the energy in her hand cool somewhat.

[JMR202006031137 rewrite.]

[JMR202006022045 original:]



When Julia and I got to the electronics lab after lunch, Several of the members of the group were already there. Mark and Jeff were working on their Micro Chromas and daughterboards. Others were reworking their trainer designs to use 68705s.

"Hi guys," I said to all and no one in particular. "I doodled up some ideas about the daughterboard last night."

"How'd you find time?" Jeff smirked, with a meaningful glance at Julia.

Julia rolled her eyes and shook her head.

"I managed. Do you want to see?"

"Ignore Jeff." But Mark also smirked. "Yes. We want to see."

Julia sighed. "Should I take notes on this, too?"

"Could you?"

"Sure." She gave me an indulgent smile.

"Sorry. Appreciate it." I gave her my doodlings from the night before and went to the chalkboard.

Winston came in and sat down and started copying the diagrams.

As I completed the diagrams, Bob commented, "You're trying to put the whole computer on the daughterboard."

Suzanne also came in, and also sat down and started copying the diagrams

"Yeah, if I actually build one with all this on the daughterboard, it's likely to shake loose and come unplugged, and leave the Micro Chroma with memory but no brains. But it's something to think about."

"How about adding just the DMA controller?" Jeff asked.

"If I understand the application notes, this should cover it." I drew a second diagram with just the 68701 and the DMA controller and some support circuits.

Jeff nodded thoughtfully. "In that case, I'll leave space for the 6844 on mine."

Mark agreed that was a good idea. Winston and Suzanne didn't seem so sure.

Dr. Brown came in, carrying rails of ICs. "Mrs. Steward left these 68705s with me last night. As she said, there aren't quite enough for everyone to get one, but she'll be sending more pretty soon. Come get them when you're ready. First come, first serve."

"Should I make a run to Austin tomorrow for more?" I suggested.

Julia reached out and poked me in the back with her pencil. "You need to finish your disk drive controllers. If I understand right, we need those so everyone can program their 68705s."

She was right.

So I focused on writing a set of programs to exercise and test the disk drives by writing a variety of troublesome pseudorandom data patterns and reading them multiple times. My initial test routines recorded parity errors in addition to reads that didn't match the generated data, but did not attempt retry-on-error.

While the test programs were running, several of us made a run to the parts store out on West County Road, and visited the surplus store nearby. When we came back Julia, had the parts she needed for her Micro Chroma and its daughterboard, and a keyboard that would need a decoder.

Until time to go deliver the newspapers, I made sure Micro Chromas were progressing okay, and helped other students with whatever they were working on, mostly trying to understand the differences between the 6801 and the 6805, and modifying their trainer designs to fit.

Mike was working on adding a 68008 to his daughterboard design as a co-processor.

"You know, anything you do now with the 68008 is strictly theoretical," I warned him.

Mike shook his head. "I'm going to be ready to put one in."

"How about designing it for the 68000? I can get you one of those." I felt Julia staring at my back, and I glanced over my shoulder. She asked me with her eyes what I was doing. I gave her an it's okay look, and she wrinkled her forehead and set her mouth slightly to the side.

"The 68000 addresses a word address space." Mike was talking about the 16-bit data bus, twice as wide as a byte wide data bus.

"I've seen application notes for multiplexing the data bus so it can read sequential bytes in a byte-wide address space."

"That'll be messy and require debugging. Besides, the 68000 is a big 64 pin chip. That's going to make the daughterboard physically unstable, too, like a daughterboard with lots of RAM and ROM."

The rest of his design looked good, so I left him to his own devices.

Several times, I noticed him covertly watching Julia. Once I saw Julia catch him looking at her, and she gave him a look of reproach that could have put a hundred 6800s in static halt or cooled the Three-mile Island reactor core without any physical coolant.

Other than Mike's sad-puppy expression, I couldn't read much from his reaction.

Dr. Brown said he'd stick around until dinnertime, so I left everyone at work on their projects and headed home to deliver my newspapers.

When I got back, I stopped the disk exerciser and checked the error counts. There were a small number of errors, as I expected, so I worked out routines that included retrying on parity errors. I stopped to explain the new routines to any of the other students who were interested, and Julia took more notes, with Jeff and Mark's help. Then I started the tests running again, keeping count of retries and of non-recoverable errors -- errors where the first retry didn't fix the error, with logic to keep track of expected data errors that weren't caught as parity errors -- bytes with an even number of bits in error.

While those were running, I checked with Jeff and Mark on their progress. They hadn't been able to get their Micro Chroma boards with their daughterboards to boot far enough to get output on the screen, even though the video controller circuits appeared to be working. Both of their boards came up in what appeared to be a graphic mode, with arbitrary data in the video memory that showed as not-very-meaningful stripes on the screen.

"Do we want to figure out why the contents of video RAM looks like stripes instead of a TV screen filled with static?"

Jeff was quick to say "No." Mark just grinned and shook his head.

We got scopes out and started tracing signals, and found some wiring errors. With those fixed, they both got the TV-BUG prompt to show up.

They both had decoded keyboards, and, with some testing and rewiring of the keyboard interface, were able to issue commands to the monitor and get results.

"So are you and Julia going to be working on her Micro Chroma tomorrow?" Mark asked.

Julia and I exchanged glances, and she smiled.

"Probably," she said. I grinned and nodded.

"Where?" Jeff asked. "Can we come crash the party?"

"My place?" I suggested.

Julia nodded. "But only in the afternoon."

Dr. Brown interjected, "If you guys want, I'll open up this lab tomorrow afternoon, from one to four or so. Then you'll have scopes and other tools available. But only if we can shut this party down within the next half-hour or so."

That announcement was met with cheers.

"Change of plans," I declared, and we all shut our work down and packed up.

*****

"Coming to my house for dinner tonight?" I turned left on Andrews Highway, coming out of the parking lot.

"Just dinner?"

"Well, and homework ..."

Julia put her hand on my hand, where it was resting on the shift lever. "Homework. Do you think we'll get my computer as far as Mark's and Jeff's tonight?" She gave my hand a squeeze.

"Want to do something else?"

She sighed. "So many things ... I want to do ... with you ... tonight."

I swallowed hard and almost missed the red light at 27th.

"Wait. I didn't mean what that sounded like."

"No?"

"Maybe." A smile played across her lips.

I turned my hand palm up and returned the squeeze. Then the light turned green and I had to turn it back over and shift. Clumsily. Ground the gears.

She giggled. "Sorry."

"Lousy adrenaline rush."

"I guess we need to start talking about religion seriously tonight." She looked out the passenger window instead of meeting my gaze.

"Dang. And I haven't even been trying to court you for real."

"Court. Sounds so courtly." She turned and smiled shyly. Or was it boldly? How can a woman be bold and shy at the same time?

I took advantage of the clear traffic to lift her hand to my lips and give it a kiss.

"Pay attention to the road."

But she didn't take her hand back.

As I turned right onto 38th Street, I said, "If you ever want to talk about Mike, I'm all ears."

She sighed. "We dated in high school, but that's long past history."

"Well, if you ever need to talk about it."

 She didn't answer that, but the energy in her hand cooled somewhat.

[JMR202006022045 original.]



Chapter 13: storms?

[Backed up at https://joel-rees-economics.blogspot.com/2020/06/bk-33209-storm-warnings-exercising-diskette-drives-controllers.html.
Some notes in https://joel-rees-economics.blogspot.com/2020/05/notes-33209-storms-exercising-diskette-drives-controllers.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.