GithubHelp home page GithubHelp logo

How can I compile the sources about nesizer2 HOT 12 OPEN

cgerrist avatar cgerrist commented on August 27, 2024
How can I compile the sources

from nesizer2.

Comments (12)

Jaffe- avatar Jaffe- commented on August 27, 2024

Hi Chris,
The code has to be compiled for the Atmega328 with avr-gcc. On Linux it should be enough to install avr-gcc and avr-libc, and Make. It can then be compiled by running make.
I have not tried to compile it on Windows. I think the easiest way to do it would be to install WSL (Windows Subsystem for Linux) and follow the previous description for Linux.
I guess it can also be compiled by installing Atmel Studio.

from nesizer2.

cgerrist avatar cgerrist commented on August 27, 2024

Thanks for the reply. I live in Holland and we have only the PAL version of the sound chip. This chip is different the RP2A07. I am using a Mac. Tonight I wil try to compile it again.

from nesizer2.

Jaffe- avatar Jaffe- commented on August 27, 2024

On Mac it should be possible to install avr-gcc as well. I found this, for example: https://bytes.usc.edu/ee109/macos-64-bit-toolchain/
Seems like you can get avr-gcc from installing the Arduino IDE (some Arduinos use the same chip and the IDE uses avr-gcc to compile the arduino code).

You also need the avrdude tool to actually flash the Atmega chip with the compiled firmware.

Regarding RP2A07 it should work fine, the atmega firmware will determine which version is installed and do the necessary compensation for PAL vs NTSC clock speeds.

from nesizer2.

cgerrist avatar cgerrist commented on August 27, 2024

Thank, I was reading about this chip and is a combine with the 6502 processor. When I had a Apple II I was programming in assembler for the 6502. So I got warm feelings for this chip 😀. This programming was a long time ago. When I was 14. And now I am 58.

from nesizer2.

cgerrist avatar cgerrist commented on August 27, 2024

Hi, I was able to compile the sources. output: sesizer_fw.elf, hex and map

This was the easy step I think :-)

Thanks for the help

from nesizer2.

Jaffe- avatar Jaffe- commented on August 27, 2024

Thank, I was reading about this chip and is a combine with the 6502 processor. When I had a Apple II I was programming in assembler for the 6502. So I got warm feelings for this chip grinning. This programming was a long time ago. When I was 14. And now I am 58.

It should be familiar to you then, you can see in the sources how the 6502 in the 2A07 chip is 'tricked' into doing what we want (load audio synthesizer registers) by just force-feeding it instructions from the Atmega microcontroller :)

Hi, I was able to compile the sources. output: sesizer_fw.elf, hex and map

This was the easy step I think :-)

Thanks for the help

That's great!

from nesizer2.

cgerrist avatar cgerrist commented on August 27, 2024

It should be familiar to you then, you can see in the sources how the 6502 in the 2A07 chip is 'tricked' into doing what we want (load audio synthesizer registers) by just force-feeding it instructions from the Atmega microcontroller :)

I did not read all the sources yet so I did not see this part of the code. Is this all Atmega code or do you have a part logic that you dumb in the memory of the 6502 and a separate part ATmega?

from nesizer2.

Jaffe- avatar Jaffe- commented on August 27, 2024

The 6502 does not have any memory connected, the address bus is just unconnected. The Atmega is just giving it instructions on the data bus and waits for the appropriate number of clock cycles before putting a new one on the bus. It is described in more detail in https://github.com/Jaffe-/NESizer2/blob/master/docs/software.md

The first Nesizer design was based on only the 2A03/2A07 but it turned out to be quite limited how flexible the resulting synthesizer would be as an instrument. The Atmega is quite a bit faster and can do more of the extra computations needed for LFOs, envelopes, sequencing, MIDI etc.
I did consider to share the burden between the two by putting some code in a RAM or ROM for the 6502 to run and make a sort of command interface between the Atmega and the 6502, but when I found the idea of just spoon-feeding the 6502 in another project, I went with that solution. Running code in the 6502 would require more components and be a more complex design.

from nesizer2.

cgerrist avatar cgerrist commented on August 27, 2024

Good morning. I did read hardware.md and looked at the schema I do not understand how the 2 x 512 K ram is connected to the address latch. Also How will the 2A03 make connection to the memory. I looked at the NES schema and is it not easier to use the RAM from the NES. Maybe stupid questions. But I would like to know how everting works before I build The NESizer. In addition, did you order the PCB or made it yourself?

Chris

from nesizer2.

Jaffe- avatar Jaffe- commented on August 27, 2024

The 2A03 does not make any connection to memory. All the address pins are just floating. This project is only interested in the audio processor (APU) inside the 2A03, so the 6502 is just used to access the internal APU registers. These registers are connected internally to the 6502 address and data buses, so they can only be reached through the 6502. So the Atmega programs registers in the APU by first giving the 6502 an instruction to load an immediate value into a register, and then to store that register in a desired APU register address.

The 2 x 512 K RAM is used by the Atmega to store audio samples for the DMC channel, configuration settings, patches (synthesizer programs) and sequences.

from nesizer2.

Jaffe- avatar Jaffe- commented on August 27, 2024

But I would like to know how everting works before I build The NESizer. In addition, did you order the PCB or made it yourself?

Chris

I ordered PCB from a manufacturing service called Elecrow. Don't know if they are operational any more, but there are other similar services that manufacture PCBs quite cheaply these days.

from nesizer2.

cgerrist avatar cgerrist commented on August 27, 2024

Normally I use my cnc to mill the pcb. Maybe I do this also with this project. Thanks for the clarification.

from nesizer2.

Related Issues (15)

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.