game machines

Let's talk about anything related to the 6502 microprocessor.
Memblers
Posts: 64
Joined: 16 Jan 2003
Location: Indianapolis
Contact:

Re: game machines

Post by Memblers »

One little fun fact about the SNES CPU, the speed is often quoted as 3.58Mhz, however that is the maximum speed. It also can run at 2.68Mhz, and most SNES games were released on cartridges where the cheaper ROMs only supported 2.68Mhz. Like BDD mentioned, it slows down to 1.79Mhz during port access, and also there are DRAM refresh cycles that periodically halt the CPU. Years ago before I knew all that, I tried writing some timed code to make a bit-banged UART over the controller port. You can imagine how well that worked out..
cbmeeks wrote:
White Flame wrote:
From the older 8-bit systems, however, I do have a certain affinity for the sprite setup of the TMS9918 (Colecovision, MSX, etc), which was a very interesting balance for the 1970s. 32 1bpp sprites, either 8x8 or 16x16, hardware multiplexed up to 4 per scanline (and it reports which one it last drew, so you could rotate them out). If you want multicolor sprites, you simply overlay them. Emulators often give the option of eliminating the per-scanline sprite limit.
I'm in complete agreement on that. I have a huge fondness for anything using the TMS9918. Especially since my first computer was a TI99-4a and my first console was a Colecovision. My only complaint is that I can't force myself to get serious about the TMS CPU or the Z80. I'd love to tinker with the TMS9918 some, though.
It's an obscure system, but you might like the VTech CreatiVision. It has a 2Mhz 6502, with those TI video/audio chips.
User avatar
cbmeeks
Posts: 1254
Joined: 17 Aug 2005
Location: Soddy-Daisy, TN USA
Contact:

Re: game machines

Post by cbmeeks »

Hugh Aguilar wrote:
Most "programmers" are actually script-kiddies --- their primary skill is to quickly "get up to speed" on some software
I've been a programmer since I was 9 (~36 years). Over 20 of those have been professional (paid). So it's a good thing I have a thick skin or I could have been offended by that. :-)

Memblers wrote:
It's an obscure system, but you might like the VTech CreatiVision. It has a 2Mhz 6502, with those TI video/audio chips.

Yep, I'm familiar with that system. It's on my radar to collect when I can find one. Too bad there weren't many games made for it because those are some good specs for the day.
Cat; the other white meat.
Hugh Aguilar
Posts: 158
Joined: 03 Jun 2016

Re: game machines

Post by Hugh Aguilar »

cbmeeks wrote:
Hugh Aguilar wrote:
Most "programmers" are actually script-kiddies --- their primary skill is to quickly "get up to speed" on some software
I've been a programmer since I was 9 (~36 years). Over 20 of those have been professional (paid). So it's a good thing I have a thick skin or I could have been offended by that. :-)
That was not directed at you --- that was not directed at any particular person.

I meant that, nowadays, most programmers are script-kiddies --- this is well-known --- this is why Python is the most popular language on desktop computers.
DerTrueForce
Posts: 483
Joined: 04 Jun 2016
Location: Australia

Re: game machines

Post by DerTrueForce »

I'm pretty sure a script kiddie is someone who doesn't write their own scripts, and just uses ones someone else has written.
If you consider Wikipedia any kind of help, that seems to be their definition.

If this is correct, calling someone who writes their own code a script kiddie is both incorrect and a nasty insult.
User avatar
BigDumbDinosaur
Posts: 9426
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: game machines

Post by BigDumbDinosaur »

DerTrueForce wrote:
I'm pretty sure a script kiddie is someone who doesn't write their own scripts, and just uses ones someone else has written.
If you consider Wikipedia any kind of help, that seems to be their definition.

If this is correct, calling someone who writes their own code a script kiddie is both incorrect and a nasty insult.
Wikipedia's definition is the likely correct one, as it's the one I've known ever since I started with UNIX in the early 1980s.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: game machines

Post by BigEd »

It seems clear to me - but evidently not clear to you, Hugh - that throwing in controversial statements is not a way to encourage thoughtful discussions and mutual enlightenment, or a way to keep a discussion on track. It is a way to get some response, yes, but not the kind of response which ultimately results in cooperative and supportive exploration of a 6502 interest. There are places you can go where the idea is to have an argument, and the more heated the better, but this isn't the idea here.
sark02
Posts: 241
Joined: 10 Nov 2015

Re: game machines

Post by sark02 »

sark02 wrote:
Something I do like the look of is JROK's multi-Williams JAMMA board http://www.arcadeshop.com/i/1121/willia ... ma-pcb.htm which is essentially a modern implementation of the logic board of the Defender/Stargate/Robotron/Joust Williams arcade machine. What I like about it is that he went with a real, external 6809, which keeps the design somewhat authentic in a slightly Frankenstein / ship of Theseus way.

A real 40-pin DIP 6502 (to convey the classic roots) attached to an FPGA (and <insert favourite peripherals>) would be a fun toy.
I have a Digilent Nexsys 2 board https://reference.digilentinc.com/refer ... nce-manual, which has a 100-pin Hirose FX2 expansion connector. It occurs to me that I could get a pretty cheap daughtcard PCB made with little more than a mating connector, 65C02 and power decoupling cap.

The 65C02 can run at 3.3V, and the Xilinx Spartan 3E can drive 3.3V I/O. Are there any landmines I'm not seeing?
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: game machines

Post by Dr Jefyll »

sark02 wrote:
the Xilinx Spartan 3E can drive 3.3V I/O.
Might wanna doublecheck what voltage the Spartan 3E attains for a logic high. In this regard 65C02's made by WDC are fussier than others. On most inputs the w65c02s wants at least 70% of Vdd, and inputs PHI2, IRQB, NMIB and RESB ostensibly require Vdd - 0.4V (although I'll bet there's wiggle room on this).
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
sark02
Posts: 241
Joined: 10 Nov 2015

Re: game machines

Post by sark02 »

Dr Jefyll wrote:
sark02 wrote:
the Xilinx Spartan 3E can drive 3.3V I/O.
Might wanna doublecheck what voltage the Spartan 3E attains for a logic high. In this regard 65C02's made by WDC are fussier than others. On most inputs the w65c02s wants at least 70% of Vdd, and inputs PHI2, IRQB, NMIB and RESB ostensibly require Vdd - 0.4V (although I'll bet there's wiggle room on this).
Thanks for the tip.
I'm admittedly unfamiliar with reading DC Characteristics... but it looks like, from the Spartan 3E datasheet https://www.xilinx.com/support/document ... /ds312.pdf page 121, that for LVCMOS33:

Code: Select all

                   65C02                        Spartan 3E LVCMOS33
Vih BE, D0, D7, RDY, SOB     Vdd*0.7 = 2.31V  | Voh  Vcco-0.4 = 2.9V
Vih IRQB, NMIB, PHI2, RESB   Vdd-0.4 = 2.9V

Vil BE, D0, D7, RDY, SOB     Vdd*0.3 = 0.99V  | Vol  0.4V
Vil IRQB, NMIB, PHI2, RESB   Vss+0.4 = 0.4V
So the way I'm reading this is that the min Voh from the FPGA is >= the min required by the 65C02, and the max Vol from the FPGA is <= the max required by the 65C02.

Does this look ok to you, too, or is there more to investigate?
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: game machines

Post by Dr Jefyll »

sark02 wrote:
Does this look ok to you, too, or is there more to investigate?
Uh... both! :)

Seriously, I agree the issue of voltage levels will be OK. But I ended up browsing through that Xilinx document you linked, and there's a LOT of detail :shock: (partly because the 3E has so many options regarding I/O characteristics). It seems certain the 3E can provide appropriate I/O for your project -- which sounds pretty cool, btw :) -- but you'll need to know what you want and how to ask for it.
Quote:
Unless otherwise specified in the FPGA application, the software default IOSTANDARD is LVCMOS25, SLOW slew rate, and 12 mA output drive.
(LVCMOS33 is not the default)
Quote:
High output current drive strength and FAST output slew rates generally result in fastest I/O performance. However, these same settings generally also result in transmission line effects on the printed circuit board (PCB) for all but the shortest board traces. [...] Use the slowest slew rate and lowest output drive current that meets the performance requirements for the end application. [emphasis added]
(Current required to drive an input on a 65C02 is practically nil -- basically just enough to charge & discharge the input capacitance. Minimum slew rate is probably also OK, except perhaps on the pin that drives PHI2.)

ETA: 5 ns is what WDC lists as the slowest permissible Tr and Tf (rise time & fall time) for the w65c02s PHI2 input. AFAICT the other inputs have no maximum Tr / Tf spec.
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
sark02
Posts: 241
Joined: 10 Nov 2015

Re: game machines

Post by sark02 »

Dr Jefyll wrote:
It seems certain the 3E can provide appropriate I/O for your project -- which sounds pretty cool, btw :) -- but you'll need to know what you want and how to ask for it.
Thanks! I've noodled around with FPGAs for a while - this is my 3rd board from Digilent, and I've had it a few years but haven't done anything beyond generating a video signal and lighting the 7-segment displays. I know how the IOSTANDARD is configured, so no problem there. I'm pretty confident when it comes to the digital side of things, but I've never developed competency on the analog side beyond what was required to get me through transistor electronics at university.

I'll be sure to select the slow slew rate.

One other question: Would you think any of these signals will require terminating resistors (assuming 2MHz 6502 clock)? I was thinking these would be point-to-point links, and so would not require termination, but the total traces length from the FPGA to the 6502 will, I imagine, be in the order of 50-75mm.
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: game machines

Post by Dr Jefyll »

Of all the 65C02 pins, PHI2 will be the fussiest about signal integrity. I suspect that's the only one you might need to worry about -- and even that concern is probably unwarranted if you're using the slowest slew rate. But I admit I'm guessing. I didn't check what the FPGA's slowest slew rate is. (Of course if the slowest rate means Tr & Tf > 5ns then you'll have to select a rate that's faster.)

If I were in your shoes I'd simply ensure the PHI2 trace is as short as possible. Orient the 65C02 in a way that places its PHI2 pin closest to the connector from the Diligent board. And I'd recommend a PLCC package, not DIP. You might also allow some room for a terminating network (on the opposite side of the board, perhaps) but I have a hunch it'll be unnecessary.
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
User avatar
MichaelM
Posts: 761
Joined: 23 Apr 2012
Location: Huntsville, AL

Re: game machines

Post by MichaelM »

If I recall correctly, and all the various data sheets have a tendency to run together, the lowest current setting per output is 2mA. With a suitably configured CMOS-based system, this value may still provide a respectable slew rate.

(The FPGA IOBs control voltage and current, which relates to the slew rate by virtue of the capacitance attached to the pin. I suspect that, in most situations, the capacitance an output pin sees is predominated by the sum of the capacitance of inputs it is driving.)
Michael A.
sark02
Posts: 241
Joined: 10 Nov 2015

Re: game machines

Post by sark02 »

From the Nexsys 2 user manual:
Quote:
All signals routed from the FPGA to the FX-2 connector include 75-ohm series resistors.
Any red flags here?
User avatar
Dr Jefyll
Posts: 3526
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: game machines

Post by Dr Jefyll »

sark02 wrote:
Any red flags here?
Because the series resistors are a form of termination I'm even more inclined to suppose you'll need to add no termination of your own.
MichaelM wrote:
If I recall correctly, and all the various data sheets have a tendency to run together, the lowest current setting per output is 2mA.
2 mA is indeed the minimum, Michael. And it seems sensible that current would relate to slew rate according to attached capacitance (if I'm reading you properly), but apparently with this chip you get to make a choice of slew rate that's independent of your choice for current setting. (But excessive capacitance could override the Fast setting, I suppose.)
Pg 18 of the linked PDF wrote:
Each IOB has a slew-rate control that sets the output switching edge-rate for LVCMOS and LVTTL outputs. The SLEW attribute controls the slew rate and can either be set to SLOW (default) or FAST.

Each LVCMOS and LVTTL output additionally supports up to six different drive current strengths as shown in Table 8.
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Post Reply