Jump to content
IGNORED

Homebrew intellivision cartridges ?


Yoruk

Recommended Posts

The BDIR, BC1 and BC2 are wrapped back (i copied the schematic from the t-cart for wiring the signals to slot), but avoiding RAM would be a problem in my case, since i copied the Bin files to RAM in a 65535 uint array and used it to get 10 bits to write the bus in the DTB cycle... well, i've a lot to think about!

Link to comment
Share on other sites

No, I mean run your code FROM RAM. Running it directly from flash might be causing you latency problems. For example, on the Pico my Intellivision bus code runs on core #1, and I designated that code as __time_critical_func, which causes the entire routine to be loaded into RAM at startup:

 

void __time_critical_func(core1_main()){...}
Edited by JohnPCAE
Link to comment
Share on other sites

Now it's clear to me, but Teensy 4.x should have a default "FASTRUN" that works as the time_critical_func on the Pi.

Since Teensy has a 600mhz CPU and 200mhz GPIOs, i probably understimated the timing critical situations.

Now my first goal is made working the 16bit parallel reading (probably i miss some bits in muxing pad or ctl registers), so i can replace the bits ORing and ANDing and the single pinMode() redirection, that costs a lot of cycles, and for use your great "lookup" table for managing the bus cycle (i must invert the BC1 and BC2 bits too, i placed them in my board in different orders than you!).

I wonder if my latching logic is wrong too, i only use the lvc245 Dir pin to enter and quit to the intellivision bus, when you use others 245 for it.... may be i need do the same?

Thank you again for your  support!

Link to comment
Share on other sites

Or you might not be holding the data on there long enough. When I write to the bus with all 16 bits at a time, I then have to keep the data on the bus for at least 600ns before I set my data pins back to input. Oh, and I do reads and writes on multiple pins simultaneously for speed. In the ACC I do them 8 at a time and in the USB board I do them all 16 at a time. The important thing is to get all 16 data bits on the bus before other chips start looking for them.

Edited by JohnPCAE
Link to comment
Share on other sites

Following your hints i get the 1k "Hello world"'s bin working! 

But other 8k  cart freeze after splashscreen (baseball one when players enter in the field, astromash after showing starred sky)...

Maybe i have to handle in some special way the SDBD cycle? at the moment my code only returns to DTB the word pointed in previous BAR/ADAR, but i'm not sure it's enough.

I'll start to write the "choosing bin file" and "rom mapping" routine too.

Link to comment
Share on other sites

You only need to handle BAR, ADAR, DWS, and DTB. You can treat all others like a NACT. And you don't have to care about SDBD. One thing I do is detect MSYNC pulses and reset my internal variables, including setting my "previous bus state" variable back to NACT.

 

You're doing the right thing with DTB. On a BAR or ADAR, I prefetch the word at that address and on a DTB I put that word on the bus. In fact I handle BAR and ADAR in the same portion of code.

 

Try tweaking your timing: how long you hold the data on the bus for DTB and how long you wait for the address to be stable on BAR and ADAR. Maybe you're timing is marginal.

Edited by JohnPCAE
  • Like 1
Link to comment
Share on other sites

I looked at your ACC code, and i'm waiting 482 millis after wrote the bus, and 500 millis since 74ls245 latching before reading the bus.

Made small changes to timing but with no difference since now.

But, why you mentioned the DWS? I thought it's used only in writing to a device, so i don't care about it for my rom emulation.... i'm wrong?

Link to comment
Share on other sites

No, i load game into a 128k array from sdcard, then read each word needed in DTB from the array at index [bus address].

I starting loading the array in the 8mb extmem, but it's a PSRAM so i avoid it for speeding up the reading.

I haven't yet done other test with timing, since i made the file selecting routine (it remain the "/.." handling..) and then i must manage the rom mapping (for now, i load only file smallest than 8k in the &5000-&6fff bank).

 

As i wrote, the code is on github if you find some times to have a look at it: https://github.com/aotta/RTO-Cart/tree/main/RTOCart

As you could see, i copied pieces of code from your ACC, but i give you the credits in the incipit ;)

Edited by aotta
added note
Link to comment
Share on other sites

i think the bin addressing is correct, but i noticed i have some DWS bus state in the $5000 range, and i don't know if i have simply to ignore them or (more probably) is a signal that there's an error....

the strange is that games seems start and freeze after few seconds, and testing baseball bin i noticed weird scoring and setting... could this be useful for understanding what's wrong?

screenshot.thumb.png.480f736d8d3111f4f53cddf23481b4ca.png

Link to comment
Share on other sites

I had solution under my eyes, since Intvnut attached his mail in previous post dated 8 may 2020, but didn't read it with the attention due!!!

I needed to add writing bus in ADAR phase too!!!

Now i'll clean a bit the code and update it to github. And i'd start design the 3d model for the cartridge too...

RTO_Cart_OK.thumb.jpg.e3f88f4cf4aa3529d88e963506d6f112.jpg

 

  • Like 4
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...