Parallax Forums
  HomeLog InRegisterCommunity CalendarSearch the ForumHelp
   
Parallax Forums > Public Forums > HYDRA System & Propeller Game Development > Atari 2600 emu ramblings :)  Forum Quick Jump
 
New Topic Post Reply Printable Version
111 posts in this thread.
Viewing Page :
 1  2  3  4  5 
[ << Previous Thread | Next Thread >> ] | Show Newest Post First ]

Baggers
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2007
Total Posts : 1773
 
   Posted 12/2/2008 1:08 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Thought I'd start a thread here, so we don't hijack someone elses thread :p
 
Well, We've got a 6502 emu in spin, when I finish work on 10th hop  I'll make a start on converting it to asm.
 
Potatohead, Any further ideas on TIA? or do you want to attempt getting the driver sorted?


http://www.propgfx.co.uk/forum/ home of the PropGFX Lite
 

Back to Top
 

potatohead
640 Pixels... :)



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 1340
 
   Posted 12/2/2008 10:11 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Good call on the thread. I was feeling guilty about the other one!

Yeah, I looked at the TIA last night. I think speed wise, we are ok with a coupla COGs, but it's not as simple as I thought! Lots of timing precise logic is necessary, even for very basic by the book displays. Those would be the early titles, COMBAT, ADVENTURE, AIR SEA BATTLE, etc... All of those are 2K and 4K of ROM.

There is the TIA emulated to very high precision in Stella. A lot of the work required is done there. Those guys worked from the schematics forward.

The 2600 is 1.1Mhz or so. That yields a few more decode instructions, and that's favorable.

Perhaps we should change the thread title too. If we've got a 6502, there are multiple targets. The VCS is appealing because everything fits into the Prop RAM easily enough. I've a few thoughts on that

-the Stella team renders to a frame buffer. Good news there is the 2600 is 160x180-200 resolution. More good news is most of the graphics are more like 40 or 80 pixels horizontally, with only a few unique colors per scan line. We are behind in the intensity department as the VCS has 8 levels, not a show stopper, but it will take some mapping. Seems like there are some options there, without having to do a full on 160 pixel frame buffer.

The other path, given a running 6502, is something like the Apple ][. It's only got a frame buffer, no interrupts either. All we would need is some address translation, to get smaller productions up and running!


Propeller Wiki: Share the coolness!

Chat in real time with other Propellerheads on IRC #propeller @ freenode.net

Back to Top
 

potatohead
640 Pixels... :)



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 1340
 
   Posted 12/2/2008 10:19 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
From the other thread:

If you do, then we are off to the races emulation wise! PASM will nail it. Of that, I'm sure. Only need 1.4Mhz for a VCS.

Hmmm.... Some early 2600 / VCS games are only 2 & 4K of 6502 code. Wonder just how hard the TIA is to emulate... I know that's not a NES, but hey! Start somewhere, right?

From Baggers

Yeah, it's a start :)
1.4Mhz = 17.14etc pasm instructions per 1 6502 instruction to decode.
at least with 2 & 4K of 6502 code we can use HUB-RAM for memory :)
As for TIA, not sure, but I'm sure we'd have a few cogs left to have a good attempt at it lol


Propeller Wiki: Share the coolness!

Chat in real time with other Propellerheads on IRC #propeller @ freenode.net

Back to Top
 

potatohead
640 Pixels... :)



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 1340
 
   Posted 12/2/2008 10:23 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
I think a good first start would be to throw up a character mode display, get the 6502 core running, and do some simple stuff with it. I've got the 8x8 NTSC driver that basically is the same driver computer text displays used. I've an old 400 too. Could write the same code on both, run, benchmark, and verify it's actually doing what it says it's doing.


Propeller Wiki: Share the coolness!

Chat in real time with other Propellerheads on IRC #propeller @ freenode.net

Back to Top
 

Baggers
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2007
Total Posts : 1773
 
   Posted 12/2/2008 10:57 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
As for thread name can keep it as is for now til we have 6502 up n running correctly and at full speed.

As for TIA, could we have a cog generting scan lines, and reading 6502's port or ram addy, to build a small 160x8 scan line buffer, which the TV driver then decodes on the fly a scan line or a few behind, adding the sprites etc. and displaying? :)

But yeah, for starters, lets get a display up and runnng first, and have the spin code 6502 core running exactly the same, as your 400, so we can test it's correctness first, then once we're happy with it's ability, then pasm it :) and run the same tests again :)


http://www.propgfx.co.uk/forum/ home of the PropGFX Lite
 

Back to Top
 

potatohead
640 Pixels... :)



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 1340
 
   Posted 12/2/2008 11:08 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
I'm liking that actually.

Did some digging, and the mess project has a core also, TIA, and 6522 RIOT chip, which could be used to do some sound for KABOOM!

A coupla scanlines behind makes a lot of sense. Basically, the TIA builds it's display a scan at a time. Display entities are sent to it, during the line, or HBLANK time. For the playfield, it can do some very basic stuff, like mirror. That stuff seems to be straightforward.

The trouble lies in the sprites. They are strips like the Atari computers are. That's cool. They don't work out of a RAM buffer, and instead get their data at the time it's needed from the CPU. Finally, to position them, cycle exact writes are often needed to accomplish that.

At least there is a body of existing code.

I'm also intrigued by that little c to spin proggy. Want to have a play with that to see just what it does. Could be very handy. -- No longer hosted there.


Propeller Wiki: Share the coolness!

Chat in real time with other Propellerheads on IRC #propeller @ freenode.net

Post Edited (potatohead) : 12/2/2008 7:41:27 PM GMT

Back to Top
 

Baggers
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2007
Total Posts : 1773
 
   Posted 12/2/2008 11:46 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Yes, sounds good,

as for the cycle timing though, I've been thinking 6.3125 instructions at 80Mhz ( 7.575 at 96Mhz ) per pixel at 160 spanning the 50.5 us scanline, assuming 12 are the sync ( NTSC ) . that could be an issue, as it's 4 instructions per hub op. 2 for the hubop and 2 for the wait.

Yeah that C to spin might be handy, depends on if it's basic C to spin or complex C.


http://www.propgfx.co.uk/forum/ home of the PropGFX Lite
 

Back to Top
 

potatohead
640 Pixels... :)



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 1340
 
   Posted 12/2/2008 1:10 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
I'm gonna go collect some 6502 stuff. We need data sheets, and another core or two to look at. That one seems kind of goofy on a first pass. Also, the C to spin goodie doesn't seem to exist there anymore. Maybe it didn't work? LOL!!

You went right where I was thinking too. Not enough time in the scan to get stuff done. Gonna have to be rendered a few lines behind for sure, meaning at least two COG's for TIA. I think we are forced to render at 8 bits per color too. On the VCS, it can literally be any color, any time. Was thinking 4 colors per scan line, but then remembered lots of tricks... There is one for the background, one for the playfield, one for both sprites. That's 4, but other stuff can happen. That means the shorter, more intense wativid loop...

The 6502 will be doing stuff, right in the middle of the scan line, and when it does stuff, impacts where and what appears on that scan, and sometimes the next one. So no packing it in to the blanking time for the TIA.

I think it's easy enough to just make some target code that assumes a 40 byte text screen, number font starting right at 0, so the value $00 = "0". That's a coupla loops, jump, add, etc... Only a small part of the CPU, nothing complex. I'll start on that too.


Propeller Wiki: Share the coolness!

Chat in real time with other Propellerheads on IRC #propeller @ freenode.net

Post Edited (potatohead) : 12/2/2008 9:18:03 PM GMT

Back to Top
 

Baggers
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2007
Total Posts : 1773
 
   Posted 12/2/2008 1:15 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
What I was thinking was have another cog counting the Horizontal scan, and just getting input from the 6502, for mods to TIA at every scan pos, storing that into a buffer that the TIA renderer accesses :) should be able to do something looking cycle perfect then :)


http://www.propgfx.co.uk/forum/ home of the PropGFX Lite
 

Back to Top
 

potatohead
640 Pixels... :)



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 1340
 
   Posted 12/2/2008 9:14 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Got it. ...I think. So, the CPU core outputs it's R/W state in the HUB, along with what's on it's BUS, for the TIA to read as it would from a regular old hardware BUS? There is a clock tick counter shared by all as well.


Propeller Wiki: Share the coolness!

Chat in real time with other Propellerheads on IRC #propeller @ freenode.net

Back to Top
 

Baggers
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2007
Total Posts : 1773
 
   Posted 12/3/2008 12:21 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
exactly :)


http://www.propgfx.co.uk/forum/ home of the PropGFX Lite
 

Back to Top
 

potatohead
640 Pixels... :)



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 1340
 
   Posted 12/3/2008 7:54 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Cool. On a non-multi processor system, this then would be essentially one big loop. Suppose it could be a coupla processes or threads also. Either it's fast enough, or it isn't. For us on the Prop, our constraint then is # instructions per clock, or the thing falls outta sync, as each thing runs on it's own.

On the 2600, we've got the 6507 variant, with a 12 bit address bus, the RIOT chip, and the TIA. The RIOT is where the RAM lives, and it's only got 128 bytes. That's it for system RAM. 4K addressable ROM. The RIOT chip does I/O for the controllers, and I think sound comes from the TIA.

Here are some document links:

http://www.qotile.net/minidig/docs/2600_riot_map.txt (there are no interrupts hooked up, and the interrupt bit on the 6507 is hardwired to be 0 no matter what)

http://www.zimmers.net/anonftp/pub/cbm/documents/chipdata/r650x/index.html

http://www.atarihq.com/danb/tia.shtml (TIA Info)

http://www.atarihq.com/danb/files/TIA_HW_Notes.txt (has great description of polynomial counters! Never knew why these were used. Now I do. They take the same number of cycles, every iteration.)

Found this also:

MOS 6507 1.19MHz

Television Interface Adapter (TIA or "Stella") 3.58MHz. This chip produces the video display and sounds for the 2600. It also has 6 registers which are used as A/D converters and for the trigger buttons on the joysticks. For those familiar with the Atari 800, this chip is about 1/2 of a TIA/Pokey in all respects. But, there is no ANTIC chip to drive it; the CPU must do all the work that the ANTIC does in the 800.

The TIA runs at colorburst speed. This makes perfect sense to me, given how Ataris generally display things. The CPU then is 1/3 of that. My gut says this is to give the TIA time to deal with what it sees on the BUS in real time.

I've collected the relevant goodies into the attached ZIP file, along with a few handy items from 6502.org.


Propeller Wiki: Share the coolness!

Chat in real time with other Propellerheads on IRC #propeller @ freenode.net

Post Edited (potatohead) : 12/3/2008 4:09:41 PM GMT



File Attachment :
6502.zip   1.93Mb (application/x-zip-compressed)
This file has been downloaded 114 time(s).
Back to Top
 

trodoss
Scrub



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Aug 2008
Total Posts : 268
 
   Posted 12/3/2008 7:57 AM (GMT -8)    Quote This PostAlert An Admin About This Post.

@potatohead

Most likely you have most/all of this info by now, but just in case here another site with 2600 specs/opcodes/etc:

http://nocash.emubase.de/2k6specs.htm

 

 

Back to Top
 

potatohead
640 Pixels... :)



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 1340
 
   Posted 12/3/2008 8:09 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
That's an awesome link. I'm gonna mirror that, just in case.


Propeller Wiki: Share the coolness!

Chat in real time with other Propellerheads on IRC #propeller @ freenode.net



File Attachment :
2k6specs.htm.safe   105KB (application/octet-stream)
This file has been downloaded 144 time(s).
Back to Top
 

potatohead
640 Pixels... :)



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 1340
 
   Posted 12/3/2008 8:21 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
My next step is to clean up my older speed test, and find it actually. That can be a drop in testing ground for the 6502. Text mode screen, with 8x8 font, nothing else. Makes for nice and easy debug. We can have the CPU write to the text screen, to see stuff. And have the actual state of the CPU display there as well. I'll attach that soon.

Got work to do today, so that's it for now. Just collecting some info.


Propeller Wiki: Share the coolness!

Chat in real time with other Propellerheads on IRC #propeller @ freenode.net

Back to Top
 

Baggers
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2007
Total Posts : 1773
 
   Posted 12/3/2008 10:13 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
nice work so far :)
sorry I can't help much at the mo, mad busy with work :( xmas demo n all that lol


http://www.propgfx.co.uk/forum/ home of the PropGFX Lite
 

Back to Top
 

JT Cook
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2006
Total Posts : 354
 
   Posted 12/3/2008 10:23 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
I did a C64 emulator a while back on the PC (never released) and one thing that I found is every document on the 6502 has some difference on how an op code and flag is handled here and there. One thing I would recommend is checking out the source to VICE for the 6502 handling because I think it handles all the op codes (documented and undocumented) correctly. Also MAME's 6502 core is pretty good and I think that is what I mostly used when I had opcode problems to reference.
 
Speaking of undocument op codes, I don't know how much the 2600 games used them, but I know pretty much every C64 game did. I think the only thing that didn't the undocumented op codes was the kernal and basic roms.
Back to Top
 

potatohead
640 Pixels... :)



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 1340
 
   Posted 12/3/2008 11:31 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Jt_Cook, I do know many 2600 games use the undocumented ones as well. Lots of homebrew titles do anyway. Gotta work all the tricks on that machine.

Baggars, no worries man. I'm teeing things up for the work to come. Figured we could get a test environment up, driver, framework, etc... That's all stuff I know I can handle and I've got little bits of time to split between this and KABOOM! This is work I know I can do, so I'm gonna because there is work coming I can't do without some help!

From my understanding of the thread so far, having a worthy 6502 at speed is project #1. That's where the framework comes into play. A text display gives us a nice debug, speed test and such, with few hassles. Perhaps it's foolish, but I think working through a core to find if a COG can do it fast enough probably comes before tuning it to handle all the bizarre hacks that people code to that chip. Am I wrong on that?

Got a link to the MAME 6502 core files? Or... is it just go grab the whole thing and pick it out of the source tree? I built it once for SGI. It's HUGE!

Frankly, I'm kind of excited to plug away on something like this. I think it's gonna be fun.


Propeller Wiki: Share the coolness!

Chat in real time with other Propellerheads on IRC #propeller @ freenode.net

Back to Top
 

Baggers
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Mar 2007
Total Posts : 1773
 
   Posted 12/3/2008 12:07 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Yeah, thanks, and yes, I know it's gonna be very intricate with timings etc once we start on TIA.
and project#1 is get the 6502 emu up to speed, well project #1 is get a test framework piece of 6502 that we'll be testing etc. then get the 6502 emu running that code :)

I was gonna say the fact the background is 40 fat pixels is quite cool can use that to our advantage, but some games look higher res than that, they have title images, like garfield etc.
so maybe I'm missing some other mode lol need more reading, but that needs more time. oh well, soon be xmas lol


http://www.propgfx.co.uk/forum/ home of the PropGFX Lite
 

Back to Top
 

Dennis Ferron
Registered Member

Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Jul 2006
Total Posts : 479
 
   Posted 12/3/2008 2:08 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Hey guys; I recently finished a project which connects a Propeller with a real 6502. It was my Propeller design contest entry, the PROP6502 Laptop. I'll be posting the code to the object exchange when I feel better (I'm home sick at the moment). It includes a Spin/asm object that spoon-feeds a 6502 at the bus cycle level. I'm thinking if I can make that object code-compatible with your emulator object, then we could test 2600 games on both the emulated 6507, and my real 6502 chip. It might help debugging.

I've separately been working on a rolling buffer TV driver. What that is, is it's an NTSC driver that takes its pixel color bytes from a line buffer which can be one line, or ten, or the whole screen. What you can do with that is declare a buffer size, say 10 lines, and fill up to line N+9 while the TV is on line N. That way there is some latency between the display line you are rendering, and the display line that is on the TV, so if you fall behind, the TV driver just consumes lines already rendered and you have some opportunity to catch up by doing the next lines more quickly. You could also double up certain lines, that is if you fall behind you could insert a record that indicates "don't move on yet; just display the previous line again" and then you could skip a line and render the next one.

That could be useful for your 2600 emulation because you could use the buffer to give you some breathing room; if some of the time your emulation takes a little longer to render the whole NTSC line than you actually have time for, you could still make up the difference in the next line. Or, say you can only achieve 4/5ths the speed you need, you could render 4 lines and double up the 5th.
Back to Top
 

AndreL
Registered Member



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Apr 2005
Total Posts : 801
 
   Posted 12/3/2008 2:45 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
That's cool -- I made one too last year or so, basically a propeller GPU that you could talk to over a SPI/parallel bus, so one of my developers could experiment with the 6502, and different processors and have a nice GPU to talk to. Anyway, sounds good!

Andre'
Back to Top
 

potatohead
640 Pixels... :)



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 1340
 
   Posted 12/6/2008 10:56 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Here's the very basics.

Text mode screen, SPIN string compatible font, elementary clear screen and print at x,y routine, and some pointers.

I'm going to write a bit of simple 6502 code now.

My assembly hello world is almost always the number counter bit. It's easy, and it works nice with just a text screen.

On the test frame code, the upper left corner of a 40x24 text screen is @ $7bff, 6502 program @ $6000

"0" = $30 -- "9" = $39

That's enough to code something that will actually do something.


Propeller Wiki: Share the coolness!

Chat in real time with other Propellerheads on IRC #propeller @ freenode.net

Post Edited (potatohead) : 12/7/2008 8:05:37 AM GMT



File Attachment :
6502_test_debug - Archive [Date 2008.12.06 Time 23.42].zip   15KB (application/x-zip-compressed)
This file has been downloaded 78 time(s).
Back to Top
 

potatohead
640 Pixels... :)



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 1340
 
   Posted 12/6/2008 11:59 PM (GMT -8)    Quote This PostAlert An Admin About This Post.
Dennis, that sounds really cool actually. Can't wait to see more about it.


Propeller Wiki: Share the coolness!

Chat in real time with other Propellerheads on IRC #propeller @ freenode.net

Back to Top
 

potatohead
640 Pixels... :)



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 1340
 
   Posted 12/7/2008 12:35 AM (GMT -8)    Quote This PostAlert An Admin About This Post.

DAT

test_program

{ Program Origin $6000

                zero = $30
                nine = $39

              screen = $7bff

              numbers = $7cc7

        lda #zero               'get zero digit loaded
        ldx #8                  'we are gonna do nine digits
digits  sta numbers, x          'put them on screen, right to left
        dex                     'next digit?
        cpx #0                  'done ?
        bne digits              'no, continue writing digits to screen!

                                'yes, move on to counting on them....


'hand assembly until I get the 400 sorted, or DASM or something...
'this code is relocatable and simple, so it can be put right into the test proggy with no worries
'which is where it is right now!

}


byte byte  $a9, $30          '         lda #zero
byte byte  $a2, $08          '         ldx #8
byte byte  $9d, $c7, $7c     'digits   sta numbers, x    (check endian on this one)
byte byte  $ca               '         dex
byte byte  $e0, $00          '         cpx #0
byte byte  $d0, $f8          '         bne digits        (check branch offset)



Anyone care to double check me on the branch and endian order for the absolute, x instruction?

And if this is good, just copy paste into the main program DAT section, and we've got some baby test code to execute with an emulated 6502.


Propeller Wiki: Share the coolness!

Chat in real time with other Propellerheads on IRC #propeller @ freenode.net

Back to Top
 

potatohead
640 Pixels... :)



Email Address Not AvailablePersonal Homepage Not AvailablePrivate Messaging Not AvailableAIM Not AvailableICQ Not AvailableY! Not AvailableMSN Not Available
Date Joined Sep 2006
Total Posts : 1340
 
   Posted 12/7/2008 11:40 AM (GMT -8)    Quote This PostAlert An Admin About This Post.
Here's the project with a baby, spud 6502. Just enough to execute the simple text proggy. It works! I was reading about CPU emulation last night, and just had to try a simple case this morning.

I think I'm gonna add enough CPU emulation to get digits counting for a speed metric sanity check in SPIN.


Propeller Wiki: Share the coolness!

Chat in real time with other Propellerheads on IRC #propeller @ freenode.net

Post Edited (potatohead) : 12/7/2008 7:45:45 PM GMT


Image Attachment :
Image Preview
12_07_2008_11_43_06.jpg
  230KB (image/jpeg)
This image has been viewed 183 time(s).

File Attachment :
6502_test_debug01 - Archive [Date 2008.12.07 Time 11.40].zip   16KB (application/x-zip-compressed)
This file has been downloaded 81 time(s).
Back to Top
 
[ << Previous Thread | Next Thread >> ]
New Topic Post Reply Printable Version
111 posts in this thread.
Viewing Page :
 1  2  3  4  5 
 
Forum Information
Currently it is Saturday, November 21, 2009 11:35 AM (GMT -8)
There are a total of 393,858 posts in 55,536 threads.
In the last 3 days there were 84 new threads and 709 reply posts. View Active Threads
Who's Online
This forum has 17692 registered members. Please welcome our newest member, old guy.
56 Guest(s), 13 Registered Member(s) are currently online.  Details
Siri, keith_kw, Jay Kickliter, Mike Green, Bob Lawrence (VE1RLL), Dogg, dMajo, hover1, ErNa, Harley, Tubular, Leon, MicroDirk