Sunday, 31 May 2015

Planning which ports we can support

I don't have much time at the moment to work on the MEGA65, but we have been able to do some planning on which ports we expect to support.

The following is what we have made electrical provision for.  Note that this is different from what may be on the actual main boards, due to space and/or cost issues, but it is the set of ports that we should be able to support, all with real 5V signals.

1. Stereo SID sockets
2. Stereo RCA audio output
3. VGA video output
4. 100mbit ethernet
5. 34-pin floppy drive interface (720k, 1.44MB and hopefully 2.88MB floppy drives, as well as 5.25" PC floppy drives although we aren't putting special effort into this).
6. C64 and C65 keyboard
7. joysticks (with full paddle support)
8. Expansion/cartridge port (initially only relatively simple ROM cartridges, but we have all signals plumbed, including DMA)
9. IEC serial for 1541 and other Commodore floppy drives
10. Extra SD card socket (in addition to the microSD socket on the FPGA board)
11. Cassette port
12. MIDI interface
13. Composite video (although it will initially be 100% compatible with the C65's composite video port -- i.e., it won't work ;) -- we are just making provision for implementing it later on.
14. DVI/HDMI video (this also won't work initially)

The main omissions compared to a real C64 or C65 is the user port, which shouldn't be any need with all the IO options on the MEGA65.

When I have more time I'll explain how we are connecting all this stuff using just 40 I/O lines on the FPGA.  Perhaps after we have had a chance to see if our way of implementing it actually works ;)

31 comments:

  1. I don't know. User port was a fantastic way to start learning "hacking" on the hw level, ie just put on LEDs, and control them from software. Without using the cartridge port where you need address decoding, latches etc for this purposes. And since mega65 seems also to be a tool for teaching even young people, maybe it should be more important to have an easy way to start build something *really* easy connected to a computer. With modern PCs the problem is the same: in the old times there was the printer port, it's often used as user port in C64 to attach simple home made devices, but PCs usually don't have printer port anymore today. Now it seems the same for mega65/c65gs, that user port is not so much important :( To be honest I would not worry about the lack of user port, just a thought that it's a great way for the first steps (to learn) to build hardware for an existing computer. But it's only my opinion of course. If the number of pins on FPGA is the problem, there can be a way to "switch" the cartridge port lines between cartridge and user ports maybe? Or is it a bad/stupid idea?

    ReplyDelete
    Replies
    1. Hello,

      I agree that the user port is something very nice to have. Part of the de-emphasis on the user port was because we need the physical space it occupies so that we can fit all the other ports in. As for making the expansion port double-time as a user port, this is quite likely possible. Of course, taking that to a little step further, one can put an IO chip on the expansion port. But I understand that avoiding the need for extra components is a significant advantage for the user port. So to give a final answer, I think we can safely say that you can have an expansion port OR a user port, but not both.

      Delete
    2. If the problem is lacking of physical space in computer case you could consider an external box to use as User Port (it could contain only edge connector or logic+connector). On computer side will have only a small connector.

      Delete
    3. It isn't just physical space, it is also address space on the external bus (I'll describe this in more detail later), and the number of IO lines we have available on the FPGA.

      Delete
    4. I'll also miss the user port if it's gone. I agree with the previous comments that it was a great way for newbies to get familiar with usage of digital input/output pins, whether it be to read a switch input, turn an LED on/off or control a motor (one pin for on/off another for direction). Anyway, if io lines are limited, fair enough, but perhaps some might feel this user port has more value/weight to a new user than the datasette port.

      Delete
    5. I'm wondering, if limited physical space was the reasoning behind dropping the user port, could the user port be made smaller? I like the idea of the next generation of coders getting curious about the user port, heading off to their local electronics shop to buy an appropriate connector, soldering on a few LEDs to it, just to see what happens with a casual POKE :) Maybe a smaller port with a connector/socket style that could be found in today's electronics shops would be a good compromise (as I guess the good old edge connectors won't be as easy to find these days?)

      Delete
    6. We also like the idea of this kind of open exploration. If we can fit a user port (in whatever form) in in some way, we will.

      Delete
  2. The stereo sid sockets is a good idea, since the real c65 got two sids - and it would be a godsend for the musicians and composers out there.
    The system could even come with 2 swinsid nano's preinstalled.
    2 soft-sids and 2 real sids = 12 simultaneous voices from the start - and maybe combine it with the ability to play real samples if possible.

    ReplyDelete
    Replies
    1. That is indeed is how it will be: two hardware SIDs and two software SIDs, for a total of 12 voices, plus two 8-bit digital audio channels.

      Delete
  3. I saw in the notes you wrote that you planned to make some emulation of the C128-style turbo bit at $d030/$01 (similarly to that of the Turbo Chameleon) for fast mode. I think it's a good idea for increased compatibility to existing software which have already been using it.

    Maybe you could also do an emulation of the three additional keyboard lines on C128 (at the lower three bits at $d02f) as there are also a few existing software which are using it when running in the C64 mode of the C128, and then they could make an advance of these bits when running in the C64 mode of C65GS, too. If one attached a full USB PC keyboard to the FPGA card, the numeric pad (and also a few additional keys as used by the C128) would be usable through that.

    I think it would be also very nice to have a full Micromys emulation for a USB mouse natively built-in instead of the usage of the joystick ports (likewise to the Turbo Chameleon again). Then the user could also spare on not to have to buy a Micromys (as well as being able to use the mouse together with two joysticks at once).

    ReplyDelete
    Replies
    1. Hello,

      We are supporting the C65's extra keyboard lines. We haven't given real thought to the C128 keyboard lines. Remember that $D02F has a different use on the C65 than on the C128. C128 emulation is a lower priority. However, that said, I do see the potential benefit when using a full USB keyboard.

      As for mouse emulation, this is possible, but we haven't got that far yet.

      Delete
  4. +1 Good idea about the mouse support!

    ReplyDelete
  5. USB mouse support is important if we don't want to be stuck with clunky adapters or antic mice from the 80's.

    ReplyDelete
    Replies
    1. Agreed. One way or another there will be support for a mouse. Most likely it will be that you will be able to connect either a USB keyboard OR USB mouse using the USB port on the FPGA board, which will be articulated to the back of the case -- and this will act just as if you had pressed the keys or used a real mouse on a joystick port, without any special software. The other USB ports might well be able to take a keyboard or mouse, but will not be wired in at such a low level, and so would require special software to allow them to provide transparent keyboard/mouse devices.

      Paul.

      Delete
    2. That would be a good compromise. Even better perhaps if you use a keyboard then the mouse could be emulated by the numeric pad cursor keys (if these remain useless otherwise). Maybe by pressing Num/Lock could one toggle between joystick/mouse emulation modes (and by pressing Scroll/Lock between port1 and port2 or so).

      Delete
    3. Hello,

      This is beyond what I think is helpful, partly because the idea is you shouldn't need a USB keyboard, since it expected that people will connect a C64 or C65 keyboard, leaving the USB port free for a mouse.

      Paul.

      Delete
    4. And what about HID joysticks/joypads? I know it's not a priority but that could be interesting for home-brew control peripheral design as there's quite a few HID controller board out there.
      IIRC ADAFruit make a very small general use board that can be use to emulate keyboard, mice, stick, pads, etc... Just sayin' :)

      Delete
  6. I have one question to ask. Are those changes you are asking complete physical modification of the actual motherboard? Are you adding or doing electrical modification? If that is the case then there is no way I can buy the one available in the market because it wouldn't have these modifications.

    ReplyDelete
    Replies
    1. Which particular modifications are you referring to? In any case, we will provide the boards with all the modifications pre-included.

      Paul.

      Delete
  7. In that case I cannot buy the board on the market. I have to buy it from you instead.

    ReplyDelete
  8. I just have one question to ask. If I purchase this: http://digilentinc.com/Products/Detail.cfm?NavPath=2,1301,1319&Prod=NEXYS4DDR and you do make the modifications are these modifications on the physical board itself or are these modifications an expansion on top of the board? If it is an expansion add-on, does that mean if I can simply buy this board from this link and attach the expansions on the board or I need your custom board?

    ReplyDelete
    Replies
    1. All the plugs come from extensions boards (plural), so you can buy a Nexys4DDR now and complete the thing later on.
      I'll wait for a complete system myself :)

      Delete
    2. Correct - the idea is you can buy the board now and buy the other parts later.

      Delete
  9. Cool! This way I can customize the board the way I like. For, example I can choose whether I want cassette port or not or cartridge port or not. Sweeeeeeeeeeeeeeeeeeeetttttt :)

    ReplyDelete
  10. Will it be necessary to buy a C64 keyboard, or it will be possible to use a normal USB keyboad ?

    I'll probably buy a C64 keyboard anyway in order to get a better "retro experience" :)

    ReplyDelete
    Replies
    1. You can already use a USB keyboard, and we expect to retain this ability unless we run out of FPGA space.

      Paul.

      Delete
  11. An idea about the joystick ports : make them compatible with Sega Genesis/Megadrive 6 buttons (8 in fact) gamepads.
    The MSX guys made an adapter so they can use them and patch games to support more buttons than they do originally, very cool stuff.

    ReplyDelete
    Replies
    1. We can take a look at what is involved in doing this, but not sure whether it will be possible in the first revision.

      Paul.

      Delete
  12. Another idea :
    I was watching how the Famicom did expansion audio yesterday, and it was done by routing the audio in and out from the cart port (one pin each as the Famicom is mono). Could this be possible on the C65GS? I guess that would be 4 more pins (stereo) on the cart port and maybe separate ground for audio.
    That would mean building expansion audio carts would be relatively easy, like adding FM synth capability with one of the many Yamaha YM chips :)
    IIRC the MSX standard do that too.

    ReplyDelete
  13. I'm impressed that y'all are able to support so many ports. What's the actual number of ports likely to be supported, though?

    Obviously, RCA out, C64-or-C65 keyboard, VGA out, Joystick/paddles, the Expansion/cartridge port, and 3.5" floppy of course (it IS a C65-like machine after all).

    IEC serial is more difficult... I can see the utility there, as it will no doubt make it even easier to bridge the old media into digital format. So: reasonable.

    The cassette port, though... I understand, and yet... well, let me just say I think it's the lowest priority of the bunch.

    Now, as to ethernet, the extra SD socket, and composite, DVI, and HDMI. I don't know, but the Raspberry Pi has HDMI out (only) and a small USB hub; one of the USB ports is dedicated as the ethernet connection. It's apparently the economical choice for the RPi. Would that work for MEGA65?



    ReplyDelete
    Replies
    1. Hello,

      It is too early to know which ports we will actually include just yet. RCA is one of the hardest, while IEC serial is actually fairly easy. The tape port is mind-numbingly easy, and there is something about making a computer in 2015 with the ability to use cassette tape storage that just tickles my fancy, so it will probably make it in there.

      Regarding USB, we have a USB port already on the FPGA board that we are using, so it is a bit different than if we were designing our own board. That said, we are planning to add a 2nd USB port that should be able to take a hub, provided someone writes the OS drivers (in 4502!) for it.

      Paul.

      Delete