Coder Social home page Coder Social logo

visrealm / pico-56 Goto Github PK

View Code? Open in Web Editor NEW
111.0 111.0 10.0 37.16 MB

The HBC-56 (65C02/TMS9918A/AY-3-8910 retro computer) fully emulated on a Raspberry Pi Pico

Home Page: https://youtube.com/@TroySchrapel

License: MIT License

CMake 3.55% C 93.49% Python 2.96%
6502 ay-3-8910 electronics emulation hbc-56 pcb raspberry-pi-pico tms9918a vga

pico-56's People

Contributors

sweetlilmre avatar visrealm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pico-56's Issues

ISO keyboard layout

could be possible to implement the option of choosing between ANSI and ISO keyboard layouts? Maybe without having to recompile the code. Thanks!

Ground plane

Hi there again!

First off not a major issue, so let me start with this:
What a fantastic kit! Super well packaged, labelled and straight forward. My pico-56 is working and I'm amped to get into playing with it. I was lucky enough to to have a mate visiting from Oz that could bring it over for me.

While I was soldering up the board, I had some issues with components connected to the ground plane. I have a good temp controlled iron with a medium chisel tip and good thermal mass, that I usually run at 330C. This wasn't sufficient to create a good joint on certain components e.g. some caps, resistors, a transistor leg, pins on some connectors etc. I ended up having to boost the temp up to about 390-400C with uncomfortably long dwell times.

If I'm the only one with this issue, then tough for me, but I would suggest revising the PCB so that the these components are connected via traces through an island to the ground plane to make assembly easier.

Thanks for the awesome project.

BGR vs RGB

I am curious on how I can change the library to encode pixels as RGB instead of BGR.

I realize I could just swap the wires around (blue pins send to red, etc.) but that doesn't feel right. Also, when I look at the graphic you have the red pins starting on left.

Is there a way to change this in the code or do I just need to rewire things?

Thanks!

void scanline(uint16_t y, uint16_t pixels[VGA_VIRTUAL_WIDTH]) {
    uint16_t c = 0x0000;
    if (y == 0 || y == VGA_VIRTUAL_HEIGHT - 1) c = 0x0000;
    else if (y < 30) c = 0x000f;    // red
    else if (y < 60) c = 0x00f0;    // green
    else if (y < 90) c = 0x0f00;    // blue
    else if (y < 120) c = 0x0f0f;   // fuscia
    else if (y < 150) c = 0x0ff0;   // cyan
    else if (y < 180) c = 0x00ff;   // yellow
    else if (y < 210) c = 0x007f;   // orange
    else if (y < 240) c = 0x0707;   // purple
    for (int x = 1; x < VGA_VIRTUAL_WIDTH - 1; ++x) {
        pixels[x] = c;
    }
    pixels[0] = 0x0000;
    pixels[VGA_VIRTUAL_WIDTH - 1] = 0x0000;
}

Silkscreen / Parts List / Mouser Project not in sync

I (admittedly blindly) ordered 5 PCBs using the PCBWay link and 5x the Mouser Project. When assembling everything, I noticed that the silkscreen doesn't even mention 10nf caps, everything is 100nf. But in my Mouser order there were both values delivered. And I believe one of the resistor values was also a different quantity than what I expected based on the values on the board.

Would be good if silkscreen/PCBWay project, Github README, Mouser project, etc. were all in sync.

Hardware timers causes crash

I'm quite sure I have misconfigured the timer example I was trying, but it seems if you try to use one, the video output just stops.

I was mostly curious if you have run into this.

// code in vga.c

bool repeating_timer_callback(struct repeating_timer *t) {
    return true;
}


static void vgaLoop() {

    struct repeating_timer timer;
    add_repeating_timer_ms(500, repeating_timer_callback, NULL, &timer);

    while (1) {
        uint32_t message = multicore_fifo_pop_blocking();
        if (message & 0x01) {
            vgaParams.scanlineFn(message & 0xfff, rgbDataBufferOdd);
        } else {
            vgaParams.scanlineFn(message & 0xfff, rgbDataBufferEven);
        }
    }
}


Small Nit in release 0.4

Looks like circles.bas does not run correctly in version 0.4 If I revert to the same code from release 0.3 it only ever draws the same circle. Did the RND function get affected?

How does the audio emulation work?

I realize you forked the emu2149 library and added more code for the Pico.

It seems to be pretty straightforward to get the audio piece to work (using AY-3-8910 mode). However, nothing seems to work on my setup.

I suspect that you have to call the audioUpdate() very quickly? I believe you are calling it at the end of each horizontal scanline.
Unfortunately, that won't work for my project as I need a more "general purpose" implementation (called from a 6502).

At the very least, what I am doing is something like:

// setup code
audioInit(3579545 / 2, 44100);
audioWritePsg0(7, 0b00111110);
audioWritePsg0(8, 0b00001111);

// main loop
 audioWritePsg0(0, 223);
audioWritePsg0(1, 1);
audioUpdate();

I really just got those register values from a YouTube video where a guy controls a real AY with an Arduino (which I did years ago).

Do you know what I am missing?

Thanks for any input.

Q1 (2N4401) question

Hi Troy - I have built a PICO-56, and it's almost working...

Is Q1 in the Pico-56 schematic shown the wrong way around? I can't see how KBD ground will be pulled low when 3v3 is present.

Thanks

Steve

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.