1
0
mirror of https://github.com/safiire/n65.git synced 2025-03-20 04:29:53 +00:00

Renaming the program to n65

This commit is contained in:
Safiire 2015-03-29 10:19:19 -07:00
parent dc60139aaa
commit 6e655963f7
23 changed files with 37 additions and 37 deletions

View File

@ -1,8 +1,13 @@
# Assembler6502 0.5
# N65 NES assembler version 0.5
An NES assembler for the 6502 microprocessor written in Ruby
This is an assembler for the Nintendo Entertainment System's 2A03
microprocessor. The 2A03 is an 8-bit processor based on the MOS 6502.
Usage: ./assembler\_6502.rb <infile.asm> -o outfile.nes
```bash
Usage: ./n65 <infile.asm> -o outfile.nes
```
![Scrolling NES Demo](images/assembler_demo.png)
This is a pretty straightfoward assembler, which is currently set up
to produce iNES formatted ROM binaries from 6502 assembly language files.
@ -24,11 +29,10 @@ An NES assembler for the 6502 microprocessor written in Ruby
It is good at knowing which addressing modes are and are not allowed for
each instruction, and contains some examples of correct syntax.
I believe this assembler can now handle bankswitching if you set a
This assembler can now handle bankswitching if you set a
valid mapper in the header, write more than 2 PROG banks, and then
and write whatever bankswitching code is nessessary for the mapper
you've chosen. I have not tried this yet, but I will be testing it
out soon.
you've chosen.
This assembler supports symbolic labels which can be scoped. When
writing assembly it can be easy to run out of effective names for
@ -74,9 +78,8 @@ An NES assembler for the 6502 microprocessor written in Ruby
on the NES.
![Scrolling NES Demo](images/assembler_demo.png)
# Some new additions:
- .byte can now handle hex and binary literals, and symbols
- First version of Midi to NES music converter
- added .inc directive, to include other .asm files
- nes.asm library include file created, naming popular NES addresses
@ -109,11 +112,8 @@ An NES assembler for the 6502 microprocessor written in Ruby
- Tested a ROM that changes background color
# Some Todos:
- Create some documentation.
- Support binary %10101010 addresses and literals
- Create NES music from MIDI files easily
- Make macros that can be used interchangably inline or as a subroutine
- Create a library for common operations, DMA, sound, etc both inline and subroutine options
- Give this project a better name.
- Create an interactive read eval compile loop?
- Make an interactive mode

View File

@ -2,7 +2,7 @@ require_relative 'symbol_table'
require_relative 'memory_space'
require_relative 'parser'
module Assembler6502
module N65
class Assembler
attr_reader :program_counter, :current_segment, :current_bank, :symbol_table, :virtual_memory, :promises

View File

@ -1,6 +1,6 @@
require_relative '../instruction_base'
module Assembler6502
module N65
####

View File

@ -1,7 +1,7 @@
require_relative '../instruction_base'
require_relative '../regexes.rb'
module Assembler6502
module N65
####

View File

@ -1,6 +1,6 @@
require_relative '../instruction_base'
module Assembler6502
module N65
####

View File

@ -1,6 +1,6 @@
require_relative '../instruction_base'
module Assembler6502
module N65
####

View File

@ -1,6 +1,6 @@
require_relative '../instruction_base'
module Assembler6502
module N65
####

View File

@ -1,6 +1,6 @@
require_relative '../instruction_base'
module Assembler6502
module N65
####

View File

@ -1,6 +1,6 @@
require_relative '../instruction_base'
module Assembler6502
module N65
####

View File

@ -1,7 +1,7 @@
require 'json'
require_relative '../instruction_base'
module Assembler6502
module N65
####

View File

@ -1,5 +1,5 @@
module Assembler6502
module N65
####
## This class represents a label, and will create

View File

@ -1,6 +1,6 @@
require_relative '../instruction_base'
module Assembler6502
module N65
####
## This is an .org directive

View File

@ -1,5 +1,5 @@
require_relative '../instruction_base'
module Assembler6502
module N65
####

View File

@ -1,6 +1,6 @@
require_relative '../instruction_base'
module Assembler6502
module N65
####

View File

@ -1,7 +1,7 @@
require 'optparse'
require_relative 'assembler'
module Assembler6502
module N65
####
## This class handles the front end aspects,
@ -55,7 +55,7 @@ module Assembler6502
end
#begin
Assembler6502::Assembler.from_file(input_file, @options[:output_file])
N65::Assembler.from_file(input_file, @options[:output_file])
#rescue StandardError => error
#STDERR.puts("Assemble Failed!")
#STDERR.puts(error.class)

View File

@ -1,7 +1,7 @@
require_relative 'opcodes'
require_relative 'regexes'
module Assembler6502
module N65
####
## Represents a single 6502 Instruction

View File

@ -1,5 +1,5 @@
module Assembler6502
module N65
class InstructionBase

View File

@ -1,5 +1,5 @@
module Assembler6502
module N65
####
## Let's use this to simulate a virtual address space

View File

@ -1,6 +1,6 @@
require 'yaml'
module Assembler6502
module N65
## Load OpCode definitions into this module
MyDirectory = File.expand_path(File.dirname(__FILE__))

View File

@ -1,5 +1,5 @@
module Assembler6502
module N65
require_relative 'instruction'
require_relative 'directives/ines_header'

View File

@ -1,6 +1,6 @@
module Assembler6502
module N65
####
## All the regexes used to parse in one module

View File

@ -1,6 +1,6 @@
require 'pry-byebug'
module Assembler6502
module N65
class SymbolTable
attr_accessor :scope_stack

View File

@ -1,11 +1,11 @@
#!/usr/bin/env ruby
###############################################################################
## 6502 Assembler
## 6502 Assembler for the NES's 2A03
##
## Usage: ./assembler_6502.rb <infile.asm>
## Usage: ./n65 <infile.asm>
##
## This file runs the assembler though the commandline frontend.
require_relative 'lib/front_end'
Assembler6502::FrontEnd.new(ARGV).run
N65::FrontEnd.new(ARGV).run