JR-IDE & ZM56 Hack

Hardware questions and modifications

JR-IDE & ZM56 Hack

Postby alanh » Sat Jan 18, 2014 9:22 pm

This week my brain has been re-energized on Jr stuff since the re-order of the JR-IDE kits. One mystery that has been bugging me for a while is now solved. The reason JR-IDE board has a full 1MB RAM is I had hoped to use unused RAM in the C, D, and E segments as upper memory blocks (UMBs) to load DOS high. The E and D segments never worked. I thought at the time the side car connector was gated off from the CPU. I was wrong. The side car bus is directly connected to the CPU. The culprit is a 245 buffer that asserts the CPU connected data bus from the 'XD' bus - where system ROM, cartridge slots, the lower 64/128K of RAM, and the graphics/ram refresh VPU are all connected. With that buffer on and no cartridges selected, it drives zeros out and fights the JR-IDE card. The decoding is controlled by a 1Kbit TI ROM chip - ZM56.

The XD bus is gated into the D bus for address ranges 00000 - 1FFFF, B8000 - BFFFF, D0000 - FFFFF. I changed that to only B8000 - BFFFF and F0000 - FFFFF using an off the shelf 16V8 though a custom PCB could be built easily. I also had to reprogram the main JR-IDE CPLD to enable RAM for addresses 00000 - 1FFFFF. It already has register support for enabling upper memory in the C segment in 16KB boundaries and in the D and E segments on 32KB boundaries. The result is no more VPU memory for the lower 128K. I doesn't seem to run any faster. My theory is there are additional wait states generated for that range by the VPU, but I will have to confirm later. There are three significant positive benefits: 1) a whopping 176 KB of UMBs! 2) a full 128KB of CGA memory! and last but not least 3) no more 'infamous PCjr memory hole'!!!!!

The bad news is even with this mod, stock MS-DOS 6.22 fails to boot. I'm not sure why. I will have to investigate further. However VCF-SE planning will be taking up most of my weekends for the next few months :( So not sure how far I will get.

If I can get stock MS-DOS 6.22 or FREEDOS running on the JR w/o the memory area reserved for video RAM, that would be a TRUE 736 KB of conventional RAM and 176 KB of UMBs resulting in 912 KB of usable DOS memory, 128 KB of CGA memory, potentially a bootable ROM disk, 330 KB/s transfer rate SSD, and a RTC!! Someone needs to go back in time and tell IBM they could have built a machine that doesn't suck in the future!
alanh
 
Posts: 252
Joined: Tue May 10, 2011 6:52 pm
Location: Atlanta, GA

Re: JR-IDE & ZM56 Hack

Postby Eric » Sat Jan 18, 2014 10:06 pm

Oh, I tried the going back in time thing and they though I was crazy and I got locked up for about thirty years until they realized I was telling the truth. Bp
Last edited by Eric on Sat Jan 18, 2014 11:09 pm, edited 2 times in total.
PCjr:
Eric
 
Posts: 126
Joined: Tue Aug 21, 2012 6:19 pm

Re: JR-IDE & ZM56 Hack

Postby geoffdaddy » Sat Jan 18, 2014 10:41 pm

I had wondered if the shared memory could be relocated past the 640kB limit in this manner. Good deal!
PCjr: 10MB RACore 01 hard drive expansion, Hotshot 640kB RAM expander, optical mouse, Xircom PE3, speech sidecar.
geoffdaddy
 
Posts: 121
Joined: Wed May 15, 2013 5:22 pm

Re: JR-IDE & ZM56 Hack

Postby alanh » Sun Jan 19, 2014 12:37 am

Success in booting vanilla MS-DOS 6.22 on the JR! I did the same side jump and load offset 15h of the BDA (adapter card ram - or the RAM size the JR really detected) into offset 13h of the BDA (conventional memory size - 48 or 112 KB). What I don't understand is why we just don't make the JR-IDE BIOS do that? I'm not running the latest firmware atm, but I will upgrade soon.

I have other commitments Sunday, however Monday I will modify the USEUMB driver that's out on the net for UMB operation on the JR and see how much I can shove in upper RAM.

Also one additional thing that must be done in the option ROM BIOS, assuming you have this hack, is to clear the video RAM. Normally this is done by clearing conventional RAM up to the 64/128KB top. However since with this hack video RAM is entirely independent of conventional RAM, it's full of junk. When PC-DOS 5.0 boots, it flips a video page and trashes the screen. No harm done, but kinda funky.

I was thinking if we quantized a 2 hour long movie at 160x200 16 colors and dropped to 20 fps, the JR-IDE card can support a raw read from a hard drive partition at that rate. Would be less than a gig for a 2 hour movie. Simple video page flip with 8x 16KB pages would make for an 'interesting' movie player. Might make 8088 unleashed look like pong in comparison if you could bearably watch Aliens or Top Gun on a JR!
alanh
 
Posts: 252
Joined: Tue May 10, 2011 6:52 pm
Location: Atlanta, GA

Re: JR-IDE & ZM56 Hack

Postby Eric » Sun Jan 19, 2014 1:21 am

What about sound, though? Would it be possible to use a Covox Speech Thing on a PCjr without overworking the poor CPU? Oh wait! PC Enterprises' Game Master would handle sound perfectly, wouldn't it?

I wish that thing wasn't so rare and an internal daughterboard or some sort instead of a bulky sidecar…
PCjr:
Eric
 
Posts: 126
Joined: Tue Aug 21, 2012 6:19 pm

Re: JR-IDE & ZM56 Hack

Postby alanh » Sun Jan 19, 2014 1:54 am

One more clarification. Turns out it's not PC-DOS causing a video page flip and trashing the screen, it's JRCONFIG.DSK.
alanh
 
Posts: 252
Joined: Tue May 10, 2011 6:52 pm
Location: Atlanta, GA

Re: JR-IDE & ZM56 Hack

Postby alanh » Sun Jan 19, 2014 9:09 am

Come to think of it, there's not much reason to use jrconfig anymore. The jr-IDE bios sets the 80 col mode and DOS memory reservation up to and including a lower 32MB video page isn't needed.
alanh
 
Posts: 252
Joined: Tue May 10, 2011 6:52 pm
Location: Atlanta, GA

Re: JR-IDE & ZM56 Hack

Postby Brutman » Sun Jan 19, 2014 11:19 am

The current version of the BIOS sets offset 15 of the BIOS data area and stuffs a hard coded 736KB in there, based on the current version of the card that we all have. You are only mildly out of date - I made that change and distributed it in Nov of 2012. Time to upgrade. ; - 0

One thing to be careful of is that the Jr uses NMI for the keyboard interrupt. Other machines use INT1 and the later versions of DOS assume INT1 and install interrupt handlers where we want the stock BIOS interrupt handler instead. STACKS 0,0 takes care of that problem - I'm assuming you left that in.


Mike
Brutman
Site Admin
 
Posts: 930
Joined: Sat Jun 21, 2008 5:03 pm

Re: JR-IDE & ZM56 Hack

Postby alanh » Sun Jan 19, 2014 3:25 pm

I guess my point is why not just put 736 in offset 13h as well so you don't have to patch DOS's?
alanh
 
Posts: 252
Joined: Tue May 10, 2011 6:52 pm
Location: Atlanta, GA

Re: JR-IDE & ZM56 Hack

Postby Brutman » Sun Jan 19, 2014 4:46 pm

Because I was trying to stay as close to stock PCjr behavior as possible. And with the hole in RAM for the video buffer everybody is using some sort of memory manager already.

How much of a modification is it to go back and retrofit existing jrIDE machines to do this? Reprogramming the CPLDs is a minor problem but I can do that for anybody who needs it. How much work is it to decouple the video memory from the main memory?

If people start doing this I'll add a set of flag bytes so that the entire jrIDE ROM does not have to be flashed; just an option flag can be flipped. And I'll have to add a chicken switch at boot time to throw things into a known "fail safe" configuration if somebody makes a configuration mistake.


Mike
Brutman
Site Admin
 
Posts: 930
Joined: Sat Jun 21, 2008 5:03 pm

Next

Return to PCjr Hardware

Who is online

Users browsing this forum: No registered users and 1 guest