Re: final cartridge for vic 20

From: Nate Lawson <nate_at_root.org>
Date: Wed, 9 Sep 2015 22:11:04 -0700
Message-Id: <C5C0E008-6E84-4F70-8A2D-224346BD752B@root.org>
> On Sep 9, 2015, at 10:04 PM, Jim Brain <brain@jbrain.com> wrote:
> 
> On 9/9/2015 11:52 PM, Nate Lawson wrote:
>> 
>> The weird part to me is that “reset” doesn’t appear to be registered, yet the inverted value is passed to reset_in by default. So it starts by driving the inverse of HiZ (which is undefined, bad)
> Maybe since you now know reset is the VIC-20 reset line that clears things up.

I see, so reset_in is getting the value of the external reset line (because it’s assigned from an inout wire).

>> by default before “reset_en” goes active. But since “reset” is not registered but both are triggered by “reset_en”, it seems like there’s an undefined region during that change where “reset_in” could be driving the inverse of 0 (1 or active high). That’s probably what resets your config register.
>> 
>> If you tell me what you want this to do, I can suggest how to fix.
> As noted previously:
> 
> "It's supposed to allow the reset line to reset the registers, but the soft reset should reset the machine (through the RESET pin) but not reset the registers. "
> 
> So, if someone sends $80 to $99f2 (I think), the machine should reset but the registers should not.  the VIC-20 reset line is on the CPLD as "reset".  That way, folks could set up the banks they want, hide the registers (if desired), and then hit the soft reset functionality to start the machine up again with the right memory config.

I think the problem is here:

###
assign reset_in =                (reset_en ? 0 : !reset); //if soft reset, 0, otherwise !reset
register #(.WIDTH(6))                cart_config1_reg(clock, reset_in, cart_config1_reg_ce, data[5:0], cart_config1);  // active high reset.
###

If the external reset line goes low (which it does when you set reset_en to do a soft reset), reset_in goes high and the config register is reset. Just stop passing reset_in to the config register and get it from a different source.

-Nate
       Message was sent through the cbm-hackers mailing list
Received on 2015-09-10 06:00:42

Archive generated by hypermail 2.2.0.