YARRB

discussion of games, software, hardware & emulators relating to the Acorn Atom
User avatar
oss003
Posts: 2515
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: YARRB

Postby oss003 » Mon Aug 01, 2016 8:51 pm

The Egg hit routine is at #3Cxx

Greetings
Kees

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Mon Aug 01, 2016 8:56 pm

There is ram at #A00
The bug in the vhdl is fixed
Chuckie Egg fails with a real processor, I didn't try it with ICE-T65

When it hangs there's an annoying beep which makes Misty bark. Can it be there's something wrong with interrupts?
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
oss003
Posts: 2515
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: YARRB

Postby oss003 » Mon Aug 01, 2016 9:00 pm

Chuckie isn't using the IRQ, only the timer at #B808/9 for sound.
A sound is played when an egg is eaten.

Greetings
Kees

User avatar
oss003
Posts: 2515
Joined: Tue Jul 14, 2009 11:57 am
Location: Netherlands
Contact:

Re: YARRB

Postby oss003 » Mon Aug 01, 2016 9:04 pm

Joe Blade and Egghead are using the same sound routine.

Greetings
Kees

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Mon Aug 01, 2016 9:06 pm

I'll check the timer to see if it is running and test the other two games also.
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
hoglet
Posts: 6357
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: YARRB

Postby hoglet » Tue Aug 02, 2016 10:58 am

I'm just starting to collect together the components for this.

roland wrote:I have two ideas for a MK2 board (if it ever will come):
1. Add a pull up resistor to pin 31 of the EEPROM
2. Replace the 74LS133 by a 74LS30

I hadn't realized just how slow a 74LS133 was - typical tPHL is 40ns; max is 59ns.

RS do a 74ALS133 (link) that's a bit faster, max is 25ns. Price is £2.36 + VAT though.

Another suggestion for MK2: Use a 33uF radial capacitor for the LM3940, then it's easier to find a low ESR type.

Dave
Last edited by hoglet on Tue Aug 02, 2016 11:10 am, edited 2 times in total.

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Tue Aug 02, 2016 11:08 am

hoglet wrote:3. Use a 33uf radial capacitor for the LM3940


I had chosen an axial capacitor because this is less high so it won't clash to the bottom. But a radial capacitor can be bent...
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
hoglet
Posts: 6357
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: YARRB

Postby hoglet » Tue Aug 02, 2016 11:16 am

It's the ESR I was concerned about, because the data sheet specifies quite a low value:

ESR.png

The only thing drawing power is the XC9572XL whuch will be in the range 10mA-50mA, i.e. on the far left of this graph.

So, ideally the ESR should be between 0.1 and 0.6 ohms.

There is a 0.1uF ceramic capacitor close by though, which should help reduce this.

Dave

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Tue Aug 02, 2016 11:19 am

I must admit that I didn't look at the ESR, also not in my Atom2k15 and my 6809 board. But afaik there are no power problems. I didn't look with a scope because I don't have one.
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Tue Aug 02, 2016 11:30 am

hoglet and roland wrote:Shall I start shipping the boards to the UK?
Yes please!


I have reservations from Wim, Hoglet, Mak1024 and TheCorfiot. Anybody else interested?
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Tue Aug 02, 2016 7:19 pm

FYI: I have written a web page with information and building instructions at http://diy.acornatom.nl/yarrb.html
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
hoglet
Posts: 6357
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: YARRB

Postby hoglet » Tue Aug 02, 2016 7:55 pm

roland wrote:FYI: I have written a web page with information and building instructions at http://diy.acornatom.nl/yarrb.html

Excellent - I can't wait to start building this now. I should have all the bits by tomorrow.

Dave

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Tue Aug 09, 2016 7:22 pm

I did some further development with the CPLD and I can switch to BBC Basic and Atom Basic in rom. Also switching between AtoMMC and Atom DOS seems to work fine, just like enable/disable ram at #A00.

I noticed that my ram mapping is a real mess and switching to the rom-less memory profile is also not working fine. Mostly I wonder why the bits of #BFFE are not reset when in this mode (MP1 = 1 and MP0 = 1):

Code: Select all

         -- write BFFE (control register)
         if falling_edge(Phi2) then
            if Reset = '0' then
               if (MP0 = '1' and MP1 = '1') then
                  regBFFE(7 downto 0) <= "00000000";
               else
                  regBFFE(6) <= '0';
                  regBFFE(5) <= '0';
               end if;
            else
               if A15 = '1' and A14 = '0' and nBFFX = '0' and RS = '0' and RW = '0' then
                  regBFFE <= DD;
               end if;
            end if;
         end if;


In any other mode, bits 5 and 6 of #BFFE are always reset (just like the other bits that I had there).

Luckily holidays are coming, so soon I have plenty of time for this puzzle :lol:
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Wed Aug 10, 2016 8:56 pm

I had some (stupid) mistakes in my CPLD design. For example, in the normal RAM/ROM mode I had always RA16 ... RA12 <= '0' so only the lowest 4K of ram were used but mapped at #0000, #1000, #2000 .... #7000. Almost the same mistake in BBC mode ](*,)

The problem of switching to Atom 2k15 mode is also interesting. After switching to this mode the Atom hangs completely. But some logical thinking about it made it clear.

In the design the lowest 32k of RAM are used for bank switching at #Axxx. Then there is a block of memory for 16 kB at #0000 - #3FFF (physical ram address #08000 - #0BFFF). The next 16 kB block is for the operating system (physical ram address #0C000-#0FFFF). The highest 64 kB (physical ram address #10000-#1FFFF) is for 4 banks of 16k at #4000-#7FFF.

If I start the Atom in normal RAM/ROM mode then the first 16 kB are at physical address space #00000 - #03FFF. So when I switch to Atom 2k15 mode the first 16 kb are at physical address space #08000 - #0BFFF and also #4000-#7FFF is at another physical address space. So, when I switch from one mode to another, the physical address changes but the program counter of the processor just increments and fetches the next instruction, which is completely random. This is what causes my Atom to hang.

I am now designing a physical memory layout in a way that in both Atom RAM/ROM mode and Atom 2k15 mode the physical addresses are the same for the memory block #0000 - #7FFF. This is doable, thanks to the programmable logic of the CPLD. No further hardware changes required 8)

If I have the time, I'll implement and test this tomorrow. But still wondering why those bits (#BFFE, see previous post) aren't reset after a <BREAK> :-k
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Thu Aug 11, 2016 10:02 pm

Here it is, my first beta release for the YARRB CPLD.
It supports three memory profiles:
1. ?#BFFE = 0 -> this behaves like the normal RAM/ROM board
2. ?#BFFE = 8 -> this is BBC Basic from the normal RAM/ROM board
3. ?#BFFE = 16 -> this is the Atom 2k15 memory system (i.e. the rom is completely disabled so it will almost certainly hang your Atom if no operating system is loaded into the RAM).

There is also an option 4: that is the same behaviour like the third profile except that the profile selection bits are reset during a <break>.

I have two known bugs:
1, Those profile selection bits are not reset when in mode 4 :(
2. My Basic hangs after switching to 2 MHz :(

I have to figure out whether the last issue is due to a bug in the CPLD or it's just my Atom. My Atom also behaves very weird after power on. It keeps selecting clear 3 but after it warms up, this behaviour disappears. Needs some investigation....

I have added a few files for making it a bit easier to understand what I wanted to write in VHDL :wink:
Attachments
yarrb.txt
(10.12 KiB) Downloaded 22 times
yarrb.txt
(10.12 KiB) Downloaded 15 times
YARRB-memory-map.pdf
(22.77 KiB) Downloaded 23 times
ROMRAM-bits.pdf
(90.17 KiB) Downloaded 25 times
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
hoglet
Posts: 6357
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: YARRB

Postby hoglet » Fri Aug 12, 2016 5:29 am

Hi Roland,

Please can upload you UCF file, so we'll get the correct pin out when building.

In fact, it might be worth making a beta release zip file that includes:
- yarrb.xise
- yarrb.vhd
- yarrb.ucf
- yarrd.jed

Many thanks for all your work on this. I'm going to do some testing this morning.

Dave

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Fri Aug 12, 2016 7:09 am

Here is the beta-1 package.
Attachments
yarrb-b1.zip
(13.67 KiB) Downloaded 16 times
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
hoglet
Posts: 6357
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: YARRB

Postby hoglet » Fri Aug 12, 2016 10:45 am

Hi Roland,

Just to let you know I've programmed the Beta 1 version and am now up and running.

Here's what I have found so far....

To boot reliably with a R65C02P2 or R65C02P4, even at 1MHz, I have to connect pins 2-3 of JP4; I don't think this is expected behaviour.

In Atom Ram/Rom mode I can switch to 2MHz without Atom Basic crashing. But at 4MHz it behaves erratically, in a way that looks like the 8255 isn't quite running fast enough. This is to be expected, as I don't think I have ever had this Atom running at 4MHz (I'll need to check the 4MHz thread to be sure though...)

I think the power up behaviour has changed, in that I always now need to press BREAK after power up.

Chuckie Egg seems to work.

Are you working on an updated bootstrap OS loader for the Atom 2k15 mode? The existing one doesn't seem to be compatible. Or would I need to use the Atom 2015 Kernel?

Dave

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Fri Aug 12, 2016 10:59 am

hoglet wrote:To boot reliably with a R65C02P2 or R65C02P4, even at 1MHz, I have to connect pins 2-3 of JP4; I don't think this is expected behaviour.

That is not expected. In that position the Phi2 to the system is exactly the same as the input clock.

hoglet wrote:In Atom Ram/Rom mode I can switch to 2MHz without Atom Basic crashing. But at 4MHz it behaves erratically, in a way that looks like the 8255 isn't quite running fast enough. This is to be expected, as I don't think I have ever had this Atom running at 4MHz (I'll need to check the 4MHz thread to be sure though...)

I have to check some components in my Atom as well. I expect my via and 8255 to to be >1 MHz capable.

hoglet wrote:I think the power up behaviour has changed, in that I always now need to press BREAK after power up.

I didn't intentionally alter something to the power up behaviour. In fact, in my Atom I almost never have to press BREAK after powering up any more.

hoglet wrote:Chuckie Egg seems to work.

Nice. Mine is still hanging after hitting an egg or food.

hoglet wrote:Are you working on an updated bootstrap OS loader for the Atom 2k15 mode? The existing one doesn't seem to be compatible. Or would I need to use the Atom 2015 Kernel?


I have to update my bootstrap OS loader. It is not compatible with the existing one because the bits of #BFFE have changed. And you cannot upload utility roms into the ram from the Atom RAM/ROM mode.
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
hoglet
Posts: 6357
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: YARRB

Postby hoglet » Fri Aug 12, 2016 12:53 pm

roland wrote:I have to update my bootstrap OS loader. It is not compatible with the existing one because the bits of #BFFE have changed. And you cannot upload utility roms into the ram from the Atom RAM/ROM mode.

Am I right thinking that a machine code bootstrap program would have to:
- Load the Atom 2k15 ROM set (C000-FFFF) to 4000 in Atom RAM/ROM mode
- Switch to Atom 2k15 mode
- Copy 4000-7FFF to C000-FFFF
- restart

How is that different to what the Boot loader does currently?

I wondered if a write to C000-FFFF in Atom RAM/ROM mode should be addressed to physical address 1C000-1FFFF.

Then the following would work (albeit slowly!)

Code: Select all

FOR A=#C000 TO #FFFC STEP 4;!A=!A;N.;LINK !-4


Dave

User avatar
hoglet
Posts: 6357
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: YARRB

Postby hoglet » Fri Aug 12, 2016 3:51 pm

Hi Roland,

I'm just wondering if you have managed to get Atom 2k15 mode working at all?

I just tried to write a simple boot loader that does the machine code equivalent following:

Code: Select all

COPY #C000,#FFFF,#4000
?#BFFE=#10
COPY #C000,#7FFF,#C000
?#BFFE=#90
LINK !-4

This kind of works, but the screen gets a bit messed up wherever the cursor goes.

Debugging this with ICE T65, it looks like in Atom 2k15 mode, memory tests on the screen memory are failing. Writes seem to work, but reading back is getting corrupt data. My guess is there is a bus conflict happening. I'll continue to investigate....

Dave

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Fri Aug 12, 2016 3:59 pm

Hi Dave,

I didn't yet tested the Atom 2k15 mode very well so it might not work perfectly.

Greetings,
Roland
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
hoglet
Posts: 6357
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: YARRB

Postby hoglet » Fri Aug 12, 2016 4:04 pm

First bug fix....In the Atom 2k15 mode, the generation of signal CSRAM also needs to exclude the screen memory, so this term needs to be added:

Code: Select all

                 (A15 = '1' and A14 = '0' and A13 = '0')

With this, I'm able to boot into Atom 2k15 mode.

Dave

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Sat Aug 13, 2016 12:49 am

hoglet wrote:First bug fix....In the Atom 2k15 mode, the generation of signal CSRAM also needs to exclude the screen memory, so this term needs to be added:

Code: Select all

                 (A15 = '1' and A14 = '0' and A13 = '0')

With this, I'm able to boot into Atom 2k15 mode.

Dave


That's what beta versions are for :) I'll also update it my files. Thanks for testing.
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Sat Aug 13, 2016 9:38 pm

hoglet wrote:With this, I'm able to boot into Atom 2k15 mode.


Did you already change the init program and also load stuff at #Axxx?

If the Mrs permits I will play with it tomorrow [-o<
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Sun Aug 14, 2016 7:49 am

Dave,

Do you have any idea why the bits of #BFFE aren't reset if MP0 and MP1 are 1?

Greetings,
Roland
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
hoglet
Posts: 6357
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: YARRB

Postby hoglet » Sun Aug 14, 2016 7:54 am

roland wrote:
hoglet wrote:With this, I'm able to boot into Atom 2k15 mode.


Did you already change the init program and also load stuff at #Axxx?

If the Mrs permits I will play with it tomorrow [-o<

All I did was to write the following program as a test:

Code: Select all

   10 DIM LL10
   20 P.$21
   30 FOR I=0 TO 1
   40 P=#3C00
   50[
   60:LL0
   70 LDX @#C0
   80 LDY @#40
   90 JSR LL1
  100 LDA @#10
  110 STA #BFFE
  120 LDX @#40
  130 LDY @#C0
  140 JSR LL1
  150 LDA @#90
  160 STA #BFFE
  170 JMP (#FFFC)
  180:LL1
  190 STX #81
  200 STY #83
  210 LDY @#00
  220 STY #80
  230 STY #82
  240 LDX @#40
  250:LL2
  260 LDA (#80),Y
  270 STA (#82),Y
  280 INY
  290 BNE LL2
  300 INC #81
  310 INC #83
  320 DEX
  330 BNE LL2
  340 RTS
  350]
  360 NEXT
  370 P.$6
  380 P."BOOTING"'
  390 LINK LL0

This just copies the existing OS into OS RAM for Atom 2k15.

Dave

User avatar
hoglet
Posts: 6357
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: YARRB

Postby hoglet » Sun Aug 14, 2016 7:56 am

roland wrote:Do you have any idea why the bits of #BFFE aren't reset if MP0 and MP1 are 1?

I'm pretty sure I don't see that bug.

I did the following:

Code: Select all

?#BFFE = 255
<Hit Break>
P.?#BFFE

And that prints 0

Is this a valid test case for the bug you are seeing?

Dave

User avatar
roland
Posts: 2777
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: YARRB

Postby roland » Sun Aug 14, 2016 9:22 am

Yes, that is a valid test.

IICR you have the jumper JP4 in 2-3 but I haven't. The reset of the bits is at the falling edge of phi2. It might be that there is no phi2 in my Atom because the processor is in a reset state. (This might be otherwise. I never "looked" at Phi2 during a reset.)

I think the reset of #BFFE should be on the falling edge of Phi0. I will test this later today.
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
hoglet
Posts: 6357
Joined: Sat Oct 13, 2012 6:21 pm
Location: Bristol

Re: YARRB

Postby hoglet » Sun Aug 14, 2016 9:47 am

roland wrote:IICR you have the jumper JP4 in 2-3 but I haven't. The reset of the bits is at the falling edge of phi2. It might be that there is no phi2 in my Atom because the processor is in a reset state. (This might be otherwise. I never "looked" at Phi2 during a reset.)

With a R65C02P2 or R65C02P4 I have it on 2-3.

With a SY6502 or UM6502CE have it on 1-2.

#BFFE gets reset to zero with all these configurations.
roland wrote:I think the reset of #BFFE should be on the falling edge of Phi0. I will test this later today.

I'm 99.9% sure that Phi2 do not stop a during reset.

What value do you see in BFFE after writing 255 then pressing BREAK?

What if you do the same test on BFFF?

Dave


Return to “acorn atom”

Who is online

Users browsing this forum: No registered users and 2 guests