Jump to content

paulscottrobson

Members
  • Posts

    260
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by paulscottrobson

  1. Lean is basically a macroassembler that *only* does macros. So every action you need is defined as a macro (and some structure, and procedures are provided). So you define your own assembler instructions and register and lean converts it into the target CPU. Lean as implemented chooses something close to the 6502 (e.g. treating XA as a faux 16 bit register) for efficiency. Much of it is 1:1 so y++ maps to iny for example.
  2. Yes. I don't know for the current design, but AFAIK the Vic20 and C64 do not use NMI - it appears to be connected to RESTORE. An NMI would not be suitable for keyboard polling per se perhaps, there may be some hardware accesses that it would mess up, but you could make it an IRQ with a pull up transistor or something. There are pretty stable i2c libraries and ps/2 setups for AVR chips, so it shouldn't be difficult to make what is effectively an i2c keyboard.
  3. Well .... this board seems to have more microcontrollers than Digikey these days.
  4. Why not an ESP32 ; then you have Wifi, i2c and a well tested PS/2 interface all in for a few quid. Then move the sound samples out of VERA (which doesn't have the memory) into an ESP32 (which does) and use that to generate audio (and you might as well put the standard waveforms there as well). Some sort of standard API so you could replace it if necessary. The i2c interface can be used for expansion as well.
  5. PS/2 devices can behave very differently. And many are put through PS/2->USB converters. Generally it seems the case that cheap and basic keyboards are more reliable than those with lots of gadgets, bluetooth and so on. There are three solutions to this. Connect the clock to the interrupt. You could maybe connected to NMI except you'd want to be able to gate it for some hardware, effectively another IRQ. Have some sort of clocked shift register design or an CPLD/FPGA connection that does the work for you Have a microcontroller do it similarly. Polling is a *bad* idea. There've been Microterminals built around Atmel AVRs for years - I built a couple of 1802 based clones round the 8515, but they were matrix keyboards like the C64/Spectrum and you can address them how you like when you like. Nobody managed to get display and PS/2 working together - they'd been working apart soundly for ages - until the AVR1284 I think, which has some clockable register that does serial input or something, can't recall. You then started getting projects like this https://www.instructables.com/Single-Chip-AVR-BASIC-Computer/ which were delayed by this limitation unless you wanted something that worked like a ZX80 and blinked.
  6. How about we have a microcontroller for every single key on the keyboard and every function on the circuit board. Think how fast it will go then. Or we could stop pretending.
  7. The joke is that most of them are the same. The odd ones are the MM57100 (the one with three bats at the start, an early colour variant that was in 2 or 3 models) and some of the ones at the end, which are the later one chip devices in a "cartridge" I remember years ago Elektor magazine publishing a Pong design, no scoring (done by ball bearings on an indented case I think) out of op amps and TTL and so on and it went on for ever, something like 40 standard ICs I think and it just played straight pong, two bats and a ball. Then GI launched the AY-3-8500. This commoditised them - if you had one, especially outside the US, it was likely a 3-8500 based console - that did everything for you. 4 (or 6 if you added the shooting) games, different sizes and speeds, on screen scoring. Any manufacturer could produce them and did. Cyber's model possibly a 3-8500. It looks like one, with the dashed lines, and it's not a well known make I think, but I've never heard of a model with three paddles on one side and two on the other, so it's possible this is an artefact of being photographed or converted from some other format ? I remember getting our first one, oddly it didn't have slider or rotary potentiometers but rollers attached the front of the case with the axes parallel to the fronts that you rolled between your thumb and first finger. But it was great fun.
  8. No, because the output device is basically a slow serial teletype on screen. All you can do is push things out sequentially.
  9. I'd consider writing some C routines in assembler ; probably setWriteAddress writeByte and writeBlock methods. You could do it with byte pointers but given it's for a 6502 most efficient approach is to do it in 6502 assembler
  10. It's not really feasible. You could set aside a buffer of memory , write to that and copy it to the display, but it would be slow. Screen memory is accessed through an I/O port.
  11. I don't think it's speculative, a few do actually exist. All the serials are less than 200 I think, so this is probably a lower and upper bound on the numbers released. Maybe they were development kits ? Obviously the M65 is way more powerful, but it is (I think) backwards compatible.
  12. This is easy. Clock your 6502 at 50Hz, build in a 32 bit hardware multiplier (maybe), and have a BASIC which is optimised for speed. That is fast *enough*. If you had a BBC Micro style assembler built in to it, then that could do the heavy lifting when you need flat out speed. The other alternative is to cross compile on a PC and upload to the X16.
  13. The whole thing is utterly insane. If you want an authentic retro experience, expect the retro problems. The machines aren't that quick and the graphics aren't that great. There's a thing called the "Cerberus 2080". It's a twin 6502/Z80 machine that uses a couple of CPLDs to replace a wodge of TTL. Graphics are monochrome UDGs. If you want a kit, accessible hardware go for that sort of thing. Or one of the ZX81 or Spectrum clones maybe. Or just say s*d it and go down the Commodore X8 type route and push the CPU up as fast as it will go. Same route as the Spectrum Next, and the Mega 65. Something that's fairly technically close to the original idea, cheap to build and doesn't waste time on endless timing issues trying to glue things together. Over engineered solutions to problems created by ridiculous design decisions. Why do we have to have a pretend Vic20 ; what happened to the concept of it being educational. I'm an ex-teacher who started in 1985 and I'd have avoided Microsoft BASIC *then*. Now it should be viewed as a form of child abuse. It's *way* easier to rewrite the Kernel and BASIC than it is to continually try to hack it to get something vaguely acceptable. The code is awful, incomprehensible and chaotic. And we're still stuck with the bizarre filesystem concepts that originate in the old PET IEEE488 design, so presumably half a dozen ancient typeins will work.
  14. You have a choice between very slow (psuedocode) or long winded (think of the 6502 code to add two 16 bit integers). Have a look at the code compilers generate ; Action, C, anything that outputs 6502 code. FORTH doesn't work well particularly ; few registers, one stack. Though jmp ($xxxx,X) has made it better. The best way of deving for the 6502 is to write the slow bits in a fairly compact p-code and the fast bits in raw assembler.
  15. Still have the problem that a 6502 is a very poor compiler target for *anything*.
  16. That's how they wanted it. The Mega65 is meant to actually be an extended Commodore 65 in all areas. So you have the built in keyboard, floppy and ports round the back and joystick ports on the side, which I think is how other CBM machines are.
  17. Surprised. I could understand parts - there are general problems, but cardboard ? Why not send the box later
  18. Suggestion: use an ESP32 or possibly ESP8266. They're cheap, much more powerful than Arduino, there's already a working and well used Mouse/Keyboard/SDCard library for the ESP32 which has been flogged to death (partly by me, it does colour video as well !). You also have a Wifi system thrown in for good measure for later use. Should be possible to bit bang an SPI or I2C connection to transfer data reasonably quickly (not sure about SD Card may be too slow). Many boards can be powered of 5v even if they run at 3v3 and I don't think I2C cares. You could go the whole hog and connect it to the sound chip as well (the library does sound as well ....) and use it as an auxiliary device. Even better, dump the A/D audio system on Vera which doesn't have enough memory and use the memory in the ESP32 to store audio waveforms, and keep Vera for graphics. Authenticity rules ok .....
  19. I think the logical thing to do, perhaps, is to produce a cheap version. Apart from labour , which is technically mostly free, most of the cost is the extra stuff to make it look like a CBM machine (which some people want, which is fine). This has a counterpart in the X16 ; there are some people who want the full kit/case experience and some who just want hardware that does what it says on the tin and aren't particlarly bothered whether it's a real 65C02 or an equivalent FPGA. But if you just want the hardware you can do it for a quarter of the price (it runs on a standard Digilent board). You don't have the keyboard, floppy, case and those sort of things, but it's the same hardware save for the floppy drive. I think most of the development work was done on it. I even have a little 3D printed box for mine. You could produce a cheap Mega65 as just a board, FPGA, Memory and a few other odds and sods quite cheaply I would think.
  20. I think David crowdfunded another project (one of the PlanetX ?) and didn't rate the experience highly
  21. As it's a 16 bit value you could probably just divide the upper byte by 1024, which would be >> 8x >> 2 which would be quicker and only marginally less accurate. It might be quicker to decompose the value into 256.a+b , apply your calculation and simplify it. But I've got to go for a flu jab in a minute
  22. You could approximate. The tick range isn't going to be that large, I wouldn't have thought. 1/60 (0.016667) is pretty close to 1/16 (0.015625), better done here obviously as 4/256. The error is about 6.5%. This is a bit high, high enough to be noticeable perhaps, so you could have a fudge factor or factors to add based around a variety of tick rates, given the limited range of tick in practice. You could knock up some numbers in a spreadsheet and get it near enough for practical purposes. It's even debatable whether there's any point in representing it as a fixed point fraction, I don't think many people are going to be able to tell a difference of 1-2% in tempo.
  23. It was always such a shame that the 6809 got paired so much with the 6847 which makes games look like the colour was vomited onto the screen (I presume there was some technical reason for those colours because no sane person would choose them voluntarilY). An 8Mhz 6809 (in FPGA) and Vera would be an awesome machine. Also it's enjoyable writing for that sort of CPU. Writing 6502 assembler you always feel you are fighting it.
×
×
  • Create New...

Important Information

Please review our Terms of Use