Jump to content
IGNORED

A8PicoCart - UnoCart on a Raspberry Pi Pico


Recommended Posts

I think the disk images you are having problems with either use the RAM under the XL's OS, or maybe need a translator. The UnoCart uses a soft OS (I think @phaeron's Altirra OS) to handle calls to SIO for disk I/O, and the problem disks probably stomp all over it (I'm assuming the PicoCart uses the same approach as the UnoCart).

  • Like 1
Link to comment
Share on other sites

On 7/29/2023 at 9:27 PM, E474 said:

I think the disk images you are having problems with either use the RAM under the XL's OS, or maybe need a translator. The UnoCart uses a soft OS (I think @phaeron's Altirra OS) to handle calls to SIO for disk I/O, and the problem disks probably stomp all over it (I'm assuming the PicoCart uses the same approach as the UnoCart).

I have the feeling that there is a detail in the simple density since arcadia is a new game and also load damaged. 😅

Link to comment
Share on other sites

Hi @ascrnet,

 

  OK, unlikely to be a translator issue, I had a quick look at the (Pascal) sources for Arcadia, but couldn't see anything obvious regarding writing to memory under the OS, though I have no idea what the Pascal run-time might get up to. I will try and test it with my UnoCart, to see if it doesn't work on that too (out of curiosity).

Link to comment
Share on other sites

14 minutes ago, E474 said:

Hi @ascrnet,

 

  OK, unlikely to be a translator issue, I had a quick look at the (Pascal) sources for Arcadia, but couldn't see anything obvious regarding writing to memory under the OS, though I have no idea what the Pascal run-time might get up to. I will try and test it with my UnoCart, to see if it doesn't work on that too (out of curiosity).

perfect, also try VisiCalc please. since you have UnoCart do you know if it can be emulated in altirra?  😅

Link to comment
Share on other sites

Hi @ascrnet,

 

   I tried loading Arcadia in my UnoCart, but I got a corrupted tape symbol/powerd by amarok, and then the title screen was all messed up, with a brownish colour scheme. I will try loading it via FujiNet-PC, but I have to do that tomorrow at the earliest. This was v1.2 download from the GitLab repo.

 

   I don't think Altirra emulates a UnoCart (I pretty much only use Linux, and haven't set up Altirra to run with Wine, though I have seen at least one very detailed howto posted).

 

   I might have a copy of VisiCalc somewhere, but I would have to dig it out, and I think there are a few different versions floating round.

 

   The Altirra OS is: "Altirra LLE OS used with permision from Avery Lee (phaeron at atariage)", according to https://github.com/robinhedwards/UnoCart

 

   Maybe @amarok can shed more light on the matter, I guess you could also try loading Arcadia in an emulator with the OS set to Altirra and see if that works.

  • Like 1
Link to comment
Share on other sites

Hi All,

 

Sorry for the lack of updates recently - I've been having an issue with my health, but hopefully normal service will be resumed soon.

 

Since both the carts I got round to sending out to testers have worked fine on a variety of XL/XEs (NTSC and PAL), I'll probably see about open sourcing the design and code fairly soon. It doesn't seem to work on original 400/800's but I seem to remember this was the case with the UnoCart, so not unexpected. I don't have one to test with, so there won't be any progress on that front in the short term, but once it's open source....

 

As far as ATR support goes, it's going to be a bit hit and miss since as noted above its using a soft-OS approach based on Altirra OS.

It should however, be exactly as compatible as the original UnoCart, since the code is pretty much the same.

 

Robin

Edited by electrotrains
  • Like 6
  • Thanks 1
Link to comment
Share on other sites

Hi @electrotrains,

 

  Get well soon!

 

  I think that with PIO you would be able to support 400/800s as I think it's down to timing issues - I believe it's described here: 

 

 

   though 400/800's won't be able to run a soft OS (though you could burn a patched OS to an EPROM/multi-OS board, etc). I've read Chapter 3 on PIO in the RP2040 datasheet and it looks do-able, but not straight forward, and as I don't have a 400/800 or oscilloscope, it's probably too difficult for me to get working. There are also quite a few Youtube videos on the subject, e.g. https://www.youtube.com/@rumbledethumps - though I'm not a hardware hacker so I found them a bit tricky to follow in places.

 

   Also, is the Altirra OS getting a bit long in the tooth, e.g. has a newer (more compatible?) version been released by @phaeron?

 

   Looking forward to the public release!

Link to comment
Share on other sites

9 hours ago, electrotrains said:

Sorry for the lack of updates recently - I've been having an issue with my health, but hopefully normal service will be resumed soon.

Relax, we can wait, first recover well. 😉

 

9 hours ago, electrotrains said:

As far as ATR support goes, it's going to be a bit hit and miss since as noted above its using a soft-OS approach based on Altirra OS.

it needs to be updated, as the UnoCART is a development version and is 7 years old. Lately the altirra OS has been improved a lot.

 

Greetings

Link to comment
Share on other sites

I was curious about this, and dug into the Mad Pascal documentation. In the intro it says it uses 64K of primary memory, there doesn't seem to be a way/command line option to just build for a 48K memory map, so it's more a compiler thing. See: https://mads.atari8.info/doc/en/introduction/

 

None the less, it might be worth updating the Altirra OS to a newer version.

Edited by E474
Link to comment
Share on other sites

2 hours ago, E474 said:

there doesn't seem to be a way/command line option to just build for a 48K memory map

 

Actually, Mad Pascal has a {$DEFINE ROMOFF} compiler directive, but I couldn't find that in a quick scan of the Arcadia sources, though it did use a {$DEFINE BASICOFF}, so I'm not that sure what's going on with the generated code.

 

Arcadia Pascal code looks very clean!

Link to comment
Share on other sites

On 8/2/2023 at 12:35 AM, E474 said:

Maybe @amarok can shed more light on the matter, I guess you could also try loading Arcadia in an emulator with the OS set to Altirra and see if that works.

I am not sure if I can really help you with the issue. I have checked that the game loads and works properly under Altirra v4.1 emulator with OS set to AltirraOS 3.34 for 400/800 and AltirraOS 3.34 for XL/XE/XEGS.

14 hours ago, E474 said:

Actually, Mad Pascal has a {$DEFINE ROMOFF} compiler directive, but I couldn't find that in a quick scan of the Arcadia sources, though it did use a {$DEFINE BASICOFF}, so I'm not that sure what's going on with the generated code.

Arcadia does not use more than 48kB of RAM, I do not disable ROM intentionally, so it should work on Atari 800. I have confirmed it on Altirra and Atari800 emulators with hardware configuration set to Atari 800.

I am not an expert in development under Atari 8-bit system, so I don't know what code generated by MadPascal could cause the problem.

The best for me would be to emulate the UnoCART on Altirra and use debugger to catch the problem, but I don't know if the cartridge can be emulated.

 

On the other hand, you could test my other programs developed with MadPascal and perhaps confirm the phenomena:

 

Link to comment
Share on other sites

Hi @amarok,

 

   Thanks for the detailed reply. I've downloaded your other programs, but I will have to leave testing until tomorrow at the earliest, though unfortunately, more likely the weekend.

 

   I did do a quick test with the atari800 emulator (version 4.1.0) under Debian 11, which ran without a hitch. I used:

 

$ atari800 -atari -800-rev altirra arcadia.atr
 

Which should start the emulator in 400/800 mode using the Altirra OS (the commit message was: "Update Altirra OS to version 3.11 included in Altirra-3.20-test4" from https://github.com/atari800/atari800/commit/1df92fe3002514c3dea21d1527931025620e7f96 - so not as recent as your test, but still fairly recent).

 

It might be less of an issue in an emulator as the emulator may set the OS memory as Read-Only, so it might not behave the same as when it's loaded into RAM as a soft OS.

 

I had a quick look on the Mad Pascal thread in the Programming 8-bit forum, but it's 33 pages long. Maybe @tebe can clear up the 400/800 v. XL/XE rules. I saw that you had included a DEFINE BASICOFF directive, but I would expect that if that code got executed on a 400/800, it should only mess up the settings for Joystick 3 or 4, if it did anything at all.

 

I don't have any experience with Mad Pascal, so although it looks like a great development language, I'm just making educated guesses (if that).

 

I don't think the UnoCart is emulated on Altirra, but I will see how much I can figure out. Probably this would be a great situation for an OS with WozMon built in!

 

  • Like 1
Link to comment
Share on other sites

Hi all,

 

New evidence since we are talking about the arcadia game. Everything points to a problem in the ATR emulation. 😅

 

I took AUTORUN.SYS out of the ATR and renamed it ARCADIA.XEX to load it directly. As you can see in the picture there are no problems in the loading.

arcadia_bueno.thumb.jpg.d7416dcb2fcf38199bab5d4fefb8bd1b.jpg

 

But if I run it from an ATR either single density (720sec) or medium density (1040sec) it damages the screen.  

arcadia_malo.thumb.jpg.b6bbe1039389c4ac0fef4b8b5bd9ac5c.jpg


Regards

  • Like 1
Link to comment
Share on other sites

Hi @electrotrains,

 

I'm also looking at a new project for the 576NUC+ based upon your Pi Pico UNO integrated as a daughter board (internal). Thinking of combining this on the same board with some extra RAM for a 1088K system. It will need yet another case variant to allow external access to the USB port, and to provide a place for the push button switch, as well as a possible drive activity LED (see question below).

 

 

Any chance that there is at least one more I/O pin leftover to do an activity LED?   EDIT: after thinking about it, the UNO probably loads files so fast that an activity LED would be mute.

 

Also looking very forward to your release of the schematics so that I can figure out what pin goes where for my upcoming project :)

 

P.S. I hope your health has improved, and you are feeling better.

  • Like 2
Link to comment
Share on other sites

On 8/4/2023 at 2:01 AM, ascrnet said:

Hi all,

 

New evidence since we are talking about the arcadia game. Everything points to a problem in the ATR emulation. 😅

 

I took AUTORUN.SYS out of the ATR and renamed it ARCADIA.XEX to load it directly. As you can see in the picture there are no problems in the loading.

arcadia_bueno.thumb.jpg.d7416dcb2fcf38199bab5d4fefb8bd1b.jpg

 

But if I run it from an ATR either single density (720sec) or medium density (1040sec) it damages the screen.  

arcadia_malo.thumb.jpg.b6bbe1039389c4ac0fef4b8b5bd9ac5c.jpg


Regards

Loading XEX to RAM vs. booting an ATR is like opening a text file directly in an editor vs. reading it from a binary dump of your Window harddisk. For reading the disk you need the complete OS and the file system logic also. XEX is always the most compatible format. The downside is that it is always limited to a single file.

  • Like 1
Link to comment
Share on other sites

Here's a very preliminary layout I'm trying out for a 576NUC+ daughter board to add Pi-Pico-UNO capability and extended RAM. P1 and P2 pick up the original MMU and EMMU signals from the 576NUC+, and the ANTIC will be piggybacked to obtain all of its I/O connections for Address, Data, Buffered Phi2 (B02), and R/W. The EMMU will be reflashed with Jurgen's 1024K JED file.

 

1088NUC_Pico-UNO_PCB.thumb.png.29cf58761b039e242044aa49ff9e4a5e.png

 

Since the 576NUC+ doesn't normally come with cartridge capability, I will be tapping into the Antic and the MMU to pick up most all of the signals required. The /CCTL will be coming from a header already on the 576NUC+ (I need to add a corresponding header on the daughter board). I'll also be adding a switch to toggle the RD signals On/Off to Enable/Disable the UNO aspect.

 

@electrotrains If I had a list of Pi Pico vs. Cart connections I could start routing traces. Is there any way I can get those from you when you get a chance?  You can PM me if you don't want to make that public just yet.

 

Atari_Cart_pinout.png.0bdffd02c4f0be7ea2dcdb0f0410d2bd.png

  • Like 5
Link to comment
Share on other sites

6 hours ago, JAC! said:

Loading XEX to RAM vs. booting an ATR is like opening a text file directly in an editor vs. reading it from a binary dump of your Window harddisk. For reading the disk you need the complete OS and the file system logic also. XEX is always the most compatible format. The downside is that it is always limited to a single file.

that's for sure.  😉

 

As this cartridge inherits part of the UnoCart software it comes with a very old altirra os

 

I downloaded from git the UnoCartOS source code and assembled it to see the exact version

altirraos.png.6e638178e9d1766d7eeebc08ae97b7f9.png

It is indeed a very beta version of AltirraOS, we will have to update it in the future to improve the ATR support 😄

 

Regards

Link to comment
Share on other sites

6 hours ago, mytek said:

 

 

@electrotrains If I had a list of Pi Pico vs. Cart connections I could start routing traces. Is there any way I can get those from you when you get a chance?  You can PM me if you don't want to make that public just yet.

 

Atari_Cart_pinout.png.0bdffd02c4f0be7ea2dcdb0f0410d2bd.png

 

Hi, 

 

   Just struggling with the formatting of this (my) post, but nevertheless...

 

   I can't remember the chapter and verse on this (I think Chapter 3 of the RP2040 datasheet), but if the GPIO pins on the Pico aren't matched to the address lines and data bus sequentially, it makes PIO programming much harder, or impossible. So, for example D0-D7 should be mapped to GPIO 0-7 (or GPIO 10-17, etc.), but whichever GPIO pin D0 is mapped to, the rest of the data lines should be mapped to the sequential pins after it. Same for A0-A12, they need to be mapped to GPIO 0-12, or GPIO 10-22, but it needs to be done sequentially.

 

   I'm hoping this is what @electrotrainshas actually done with the PCB, but I'd like to flag this is something to consider (sorry I can't be more specific with the doc reference)/could be an issue.

 

   Also, I'm interested in the pin mapping too (PM is fine).

  • Like 1
Link to comment
Share on other sites

Hi,

 

Just as a quick test, I booted Arcadia by @amarok using atariserver on a Raspberry Pi using a stock (real) 800XL, and it loaded (and played) fine.

 

Then I tried doing the same but loading the PAL XL Translator (from Atari) first, then booting Arcadia (so a Soft-OS on real hardware). The result was a corrupted display like the second picture in @ascrnet's post above.

 

I got the same results with the xmas version of Arcadia.

 

When I tried gr9lab.atr and unicode.atr, they both worked fine with either stock XL or Translator. I haven't had time to test anything apart from Arcadia itself on the UnoCart.

 

So, obviously there is something going wrong, but I think the problem is more with the Mad Pascal runtime, or something in Arcadia's code.

 

I will try and narrow it down tomorrow, but maybe @tebe knows what might be causing the problem. I was also wondering if one of the segments in the AUTORUN.SYS is loading somewhere it shouldn't, but I don't know which tool to use to analyze files/see the segments involved.

 

Am attaching Arcadia.atr and arcadia_xmas.atr to this post if anyone else wants to see the problem with a stock XL/XE and a translator disk.

arcadia.atr arcadia_xmas.atr

Link to comment
Share on other sites

6 hours ago, E474 said:

. I was also wondering if one of the segments in the AUTORUN.SYS is loading somewhere it shouldn't, but I don't know which tool to use to analyze files/see the segments involved

Open Altirra's debugger, press F8 to continue then drag the XEX to it. 

Link to comment
Share on other sites

{$DEFINE BASICOFF}

this creates a new INI block

// BASIC OFF
// author: Michael Jaskula
// changes: 2023-03-28

//	lda #$01		; OSS cart disabled
//	sta $d508

	lda PORTB
	ora #$02
	sta PORTB
	
	lda #$70		; disable BREAK
	sta $10
	sta $D20E

	lda #$C0
	sta $6A
	sta $2E4

	lda #$01
	sta $03F8

	ldx #0			; reset E:
	lda #$0c
	jsr xcio

	mwa #ename icbufa,x

	mva #$0c icax1,x
	mva #$00 icax2,x

	lda #$03

xcio	sta iccmd,x

	jmp	ciov

ename	.byte 'E:',$9b

 

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   1 member

×
×
  • Create New...