Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

If I have not seen so far it is because I stood in giant's footsteps.


computers / comp.sys.apple2 / Re: Write valid time on bus

SubjectAuthor
* Write valid time on busAnthony Ortiz
`* Re: Write valid time on busCharlie
 `* Re: Write valid time on busAnthony Ortiz
  `- Re: Write valid time on busCharlie

1
Write valid time on bus

<05e39065-6b95-4dc6-a1e9-63cfbe5370ddn@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=4566&group=comp.sys.apple2#4566

 copy link   Newsgroups: comp.sys.apple2
X-Received: by 2002:a05:622a:204:b0:31f:3bb:3294 with SMTP id b4-20020a05622a020400b0031f03bb3294mr18554129qtx.436.1659454311874;
Tue, 02 Aug 2022 08:31:51 -0700 (PDT)
X-Received: by 2002:a05:622a:148f:b0:31f:6de:8ed3 with SMTP id
t15-20020a05622a148f00b0031f06de8ed3mr18601828qtx.536.1659454311657; Tue, 02
Aug 2022 08:31:51 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2
Date: Tue, 2 Aug 2022 08:31:51 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=96.246.98.130; posting-account=_28MFgoAAAAsc-6dxO-CT0K1QNWF5LF1
NNTP-Posting-Host: 96.246.98.130
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <05e39065-6b95-4dc6-a1e9-63cfbe5370ddn@googlegroups.com>
Subject: Write valid time on bus
From: anthonyp...@gmail.com (Anthony Ortiz)
Injection-Date: Tue, 02 Aug 2022 15:31:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2310
 by: Anthony Ortiz - Tue, 2 Aug 2022 15:31 UTC

Hey guys, I've been going over some of the timings for writing data from a peripheral card on to the Apple IIe bus and just when I think I have it, I get confused again. This is for an accelerator I'm working on that replaces the 6502, and it seems to be working for all reads but some errors on the writes so I want to make sure I have it right. I'm using a IIgs for testing but want to make this work across the range of Apple IIs if possible.

In the DMA tech note for the IIe it says that the data bus is valid until Phase 0 falls, and even presents a write scenario where you can gate your write using the 7M signal and hold it *until* Phase 0 falls, but in Sather's IIe book pages 4-7 and 4-8 it states a couple of times that write is held valid for some time *after* Phase 2 falls, and Phase 2 falls in worst-case 65ns after Phase 0 falls, which means I have to hold the write for some time after Phase 0 falls. I know I must be reading this wrong so would someone enlighten me?

I'd like my peripheral-card read/write to work across the Apple II range so I'm wondering if anyone has any timing data on when it's safe to start fiddling with the Address and Data buses and R/W line and when they need to be held stable and valid.

Re: Write valid time on bus

<tcc1fn$1n7sk$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=4569&group=comp.sys.apple2#4569

 copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: charlieD...@verEYEzon.net (Charlie)
Newsgroups: comp.sys.apple2
Subject: Re: Write valid time on bus
Date: Tue, 2 Aug 2022 16:29:41 -0400
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <tcc1fn$1n7sk$1@dont-email.me>
References: <05e39065-6b95-4dc6-a1e9-63cfbe5370ddn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 2 Aug 2022 20:29:43 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="493358b02c69c5dc48e06410059918d1";
logging-data="1810324"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19OTabSrNx5nTomwNL/vmylfFrEpSpMOkw="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Cancel-Lock: sha1:zzb9dhpDg1uzjHBI0YQ/YjNzd+M=
Content-Language: en-US
In-Reply-To: <05e39065-6b95-4dc6-a1e9-63cfbe5370ddn@googlegroups.com>
 by: Charlie - Tue, 2 Aug 2022 20:29 UTC

On 8/2/2022 11:31 AM, Anthony Ortiz wrote:
> Hey guys, I've been going over some of the timings for writing data from a peripheral card on to the Apple IIe bus and just when I think I have it, I get confused again. This is for an accelerator I'm working on that replaces the 6502, and it seems to be working for all reads but some errors on the writes so I want to make sure I have it right. I'm using a IIgs for testing but want to make this work across the range of Apple IIs if possible.
>
> In the DMA tech note for the IIe it says that the data bus is valid until Phase 0 falls, and even presents a write scenario where you can gate your write using the 7M signal and hold it *until* Phase 0 falls, but in Sather's IIe book pages 4-7 and 4-8 it states a couple of times that write is held valid for some time *after* Phase 2 falls, and Phase 2 falls in worst-case 65ns after Phase 0 falls, which means I have to hold the write for some time after Phase 0 falls. I know I must be reading this wrong so would someone enlighten me?
>
> I'd like my peripheral-card read/write to work across the Apple II range so I'm wondering if anyone has any timing data on when it's safe to start fiddling with the Address and Data buses and R/W line and when they need to be held stable and valid.

I've struggled with Apple II timing myself so I feel your pain.
I know next to nothing about how accelerators work but...

Since you are using a IIgs for testing you should be aware that phase 2
on the 65816 in not the same as phase 2 on a 6502 (see Apple IIgs tech
note #68). I believe the phase 2 clock on the 6502 is the same as the
phase 0 clock on the Apple peripheral bus. The phase 2 clock on the
65816 actually varies its period.

You mentioned DMA so I'm thinking that's the timing you are going for.
The IIgs hardware reference says (in reference to cards that work on
other Apple II models) that they will *probably* work if they assert and
remove the /DMA signal within 200 nanoseconds of the rising edge of
phase 0. It also says that normally the IIgs should be running at 1.024
MHz when performing DMAs. There are exceptions to this if you are only
accessing fast ram or rom.
Also with the IIgs you need to set the DMA bank register.

If you are using a logic device (FPGA, etc.), here is a link to Alex
Freed's verilog code for DMA timing on an Apple IIe which may help:

https://sourceforge.net/p/jatcb/code/HEAD/tree/dma.v

Lastly, I like to synchronize all the clocks on the card whether or not
I'm using the 7Mz Apple clock as the system clock or a clock on the card.

Charlie

Re: Write valid time on bus

<6924d493-1137-443e-8483-e8ba9f64224cn@googlegroups.com>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=4592&group=comp.sys.apple2#4592

 copy link   Newsgroups: comp.sys.apple2
X-Received: by 2002:a0c:c68a:0:b0:46b:8e6b:306 with SMTP id d10-20020a0cc68a000000b0046b8e6b0306mr24498121qvj.7.1660151973763;
Wed, 10 Aug 2022 10:19:33 -0700 (PDT)
X-Received: by 2002:a05:620a:2b87:b0:6b9:7b05:2ae3 with SMTP id
dz7-20020a05620a2b8700b006b97b052ae3mr6167029qkb.179.1660151973580; Wed, 10
Aug 2022 10:19:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.apple2
Date: Wed, 10 Aug 2022 10:19:33 -0700 (PDT)
In-Reply-To: <tcc1fn$1n7sk$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=96.246.98.130; posting-account=_28MFgoAAAAsc-6dxO-CT0K1QNWF5LF1
NNTP-Posting-Host: 96.246.98.130
References: <05e39065-6b95-4dc6-a1e9-63cfbe5370ddn@googlegroups.com> <tcc1fn$1n7sk$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6924d493-1137-443e-8483-e8ba9f64224cn@googlegroups.com>
Subject: Re: Write valid time on bus
From: anthonyp...@gmail.com (Anthony Ortiz)
Injection-Date: Wed, 10 Aug 2022 17:19:33 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2759
 by: Anthony Ortiz - Wed, 10 Aug 2022 17:19 UTC

> You mentioned DMA so I'm thinking that's the timing you are going for.
> The IIgs hardware reference says (in reference to cards that work on
> other Apple II models) that they will *probably* work if they assert and
> remove the /DMA signal within 200 nanoseconds of the rising edge of
> phase 0. It also says that normally the IIgs should be running at 1.024
> MHz when performing DMAs. There are exceptions to this if you are only
> accessing fast ram or rom.
> Also with the IIgs you need to set the DMA bank register.
>
> If you are using a logic device (FPGA, etc.), here is a link to Alex
> Freed's verilog code for DMA timing on an Apple IIe which may help:
>
> https://sourceforge.net/p/jatcb/code/HEAD/tree/dma.v
>
> Lastly, I like to synchronize all the clocks on the card whether or not
> I'm using the 7Mz Apple clock as the system clock or a clock on the card.
>
> Charlie

Hey Charlie,

I'm new to VHDL so I was trying to trigger on both the rising/falling edges of 7M to create a counter that offsets from Phase0 rise/fall, that way I could use the counter as a point where to perform certain logic such as read and writes. However, I quickly learned that I know nothing and that just because it's valid VHDL doesn't mean it's synthesizable, lol. I'm just going to create a 100mhz clock so that I have 10ns granularity and use that instead.

You mention the Carte Blanche; have you done a lot of prototyping with it? Do you have any projects you're working on?

Re: Write valid time on bus

<td1je1$1vfc0$1@dont-email.me>

 copy mid

https://www.novabbs.com/computers/article-flat.php?id=4594&group=comp.sys.apple2#4594

 copy link   Newsgroups: comp.sys.apple2
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: charlieD...@verEYEzon.net (Charlie)
Newsgroups: comp.sys.apple2
Subject: Re: Write valid time on bus
Date: Wed, 10 Aug 2022 20:44:46 -0400
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <td1je1$1vfc0$1@dont-email.me>
References: <05e39065-6b95-4dc6-a1e9-63cfbe5370ddn@googlegroups.com>
<tcc1fn$1n7sk$1@dont-email.me>
<6924d493-1137-443e-8483-e8ba9f64224cn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 11 Aug 2022 00:44:49 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="ea8739b45b21afc3ca57a423280c5253";
logging-data="2080128"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vjFTxNDwFJnE7bQwBV+hOblc0TAfUx6A="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.12.0
Cancel-Lock: sha1:XukE4y14GkGPvHGggQrnqjUGuuw=
Content-Language: en-US
In-Reply-To: <6924d493-1137-443e-8483-e8ba9f64224cn@googlegroups.com>
 by: Charlie - Thu, 11 Aug 2022 00:44 UTC

On 8/10/2022 1:19 PM, Anthony Ortiz wrote:
>> You mentioned DMA so I'm thinking that's the timing you are going for.
>> The IIgs hardware reference says (in reference to cards that work on
>> other Apple II models) that they will *probably* work if they assert and
>> remove the /DMA signal within 200 nanoseconds of the rising edge of
>> phase 0. It also says that normally the IIgs should be running at 1.024
>> MHz when performing DMAs. There are exceptions to this if you are only
>> accessing fast ram or rom.
>> Also with the IIgs you need to set the DMA bank register.
>>
>> If you are using a logic device (FPGA, etc.), here is a link to Alex
>> Freed's verilog code for DMA timing on an Apple IIe which may help:
>>
>> https://sourceforge.net/p/jatcb/code/HEAD/tree/dma.v
>>
>> Lastly, I like to synchronize all the clocks on the card whether or not
>> I'm using the 7Mz Apple clock as the system clock or a clock on the card.
>>
>> Charlie
>
> Hey Charlie,
>
> I'm new to VHDL so I was trying to trigger on both the rising/falling edges of 7M to create a counter that offsets from Phase0 rise/fall, that way I could use the counter as a point where to perform certain logic such as read and writes.

I program in verilog and I was completely new to it when I started with
the Carte Blanche card.
I'm still pretty much a novice.

However, I quickly learned that I know nothing and that just because
it's valid VHDL doesn't mean it's synthesizable, lol. I'm just going to
create a 100mhz clock so that I have 10ns granularity and use that instead.

I found that out too. ;-)

It is my understanding that triggering on both the rising and falling
edge of a clock signal won't work because the flip-flops in the chip
don't support double clocking. At least they don't on the FPGAs on the
Carte Blanche and Carte Blanche II card.

>
> You mention the Carte Blanche; have you done a lot of prototyping with it?

Most of what I've done is with video. I originally modified Alex
Freed's JAT code for the Carte Blanche so that I could have the colored
text, background and borders on a //e (like a IIgs has).
My next project was to make a video only card for the IIgs with the SHR
video modes.
After that I made a video card for the //e that displays SHR graphics.
I also added code to allow loading a bitstream to the flash memory on
the Carte Blanche from the Apple //e.

When the Carte Blanche II came out I moved my projects to it.
Also added HDMI output and 800x600 resolution so that the IIgs side
borders are visible.

> Do you have any projects you're working on?

One project that I started quite a while ago is using the onboard micro
SD card as a hard drive (something like the CFFA3000 does with USB)
while still maintaining the VGA/HDMI video.
Unfortunately, life gets in the way and I haven't done much with it lately.

Here's my website for more information:

http://noboot.com/charlie/Charlie's%20Stuff.htm

Charlie

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor