Releases: emu-russia/breaks
Books (6502, APU), A4 paper size
The 6502 Core and APU books are converted to A4 size, as the A5 size showed poor results, after a test print (too small).
There are no special corrections, the schematics became larger, the "black squiggles similar to transistors" also became easier to see.
Breaking NES Book - 6502 Core, Revision B (Rus + Eng)
In this revision of the book all found errors are corrected and a detailed description of some 6502 instructions is added.
A C++ simulator has been written on the basis of the studied circuits, which has confirmed their correctness and has passed all functional tests of 6502 by Klaus Dormann.
We are also thankful to ttlworks, for allowing the publication of the optimized 6502 circuits resulting from his 6509 (which is based on the 6502 core) research.
Breaking NES Book - APU, Revision A4 (Rus+Eng)
A4 revision of the APU book, with minor corrections:
- Added pictures of APU topology
- The section and the LFO itself has been renamed as Soft CLK (we found in the official documentation abbreviation of the Frame Counter, which was used by the chip developers).
Breaknes 1.0
Breaking NES Book - APU, Revision A (Rus+Eng)
APU 6502 Core Binding
Here is the PSD source with the analysis of the connection schematics of the 6502 core with the rest of the APU.
More details here: https://github.com/emu-russia/breaks/blob/master/BreakingNESWiki_DeepL/APU/core.md
P.S. 2A03 (NTSC APU) was considered. The PAL version has some changes, but that will be a separate study.
Breaks Debugger 1.8
English:
Iterative update with minor fixes:
- More settings for unit test mode (RunUntilPC, Trace)
- Support for most stable illegal instructions (successfully passing all nestest.nes tests)
- Passing functional tests of 6502 by Klaus Dormann (https://github.com/Klaus2m5/6502_65C02_functional_tests)
With this release we consider the 6502 core simulation task done! The road to the NES/Famicom/Dendy emulator on the gate level is open.
Русский:
Итеративное обновление с незначительными исправлениями:
- Больше настроек для режима юнит-тестирования (RunUntilPC, Trace)
- Поддержка большинства стабильных нелегальных инструкций (успешное прохождение всех тестов nestest.nes)
- Прохождение функциональных тестов 6502 by Klaus Dormann (https://github.com/Klaus2m5/6502_65C02_functional_tests)
Этим релизом мы считаем что задача симуляции ядра 6502 выполнена! Дорога к эмулятору NES/Famicom/Dendy на вентильном уровне открыта.
Breaks Debugger 1.7
English:
Anyone who has read the version history probably remembers the comparison between the debugger and Alien 4.
By a strange coincidence, Ellen Ripley only "got it" on the eighth try. So did our debugger!
The previous version had a few bugs, and to my shame, they were not simulator bugs, but bugs in the 6502 circuits. The bugs were in the V flag circuits and the little ADD/SB7 circuitry that is needed for the ROR/SR instructions.
Also, the M6502Core was added to the Nintendulator to verify proper operation:
https://github.com/ogamespec/nintendulator/blob/master/doc/ReadmeBreaks.md
All nestest.nes tests are successful.
Note: at the first run the simulator creates a large pla.bin file, to optimize the decoder simulation. All subsequent runs are faster.
Русский:
Тот, кто читал историю версий наверняка помнит канву со сравнением отладчика с фильмом Чужой 4.
По странному стечению обстоятельств - Элен Рипли "получилась" только с восьмой попытки.. Как и наш дебаггер!
Предыдущая версия содержала несколько багов, причем к стыду признаться - это были баги не симулятора, а ошибки в схемах 6502. Ошибки были в схемах флага V и в небольшой схеме ADD/SB7, которая нужна для инструкций ROR/SR.
Также для проверки правильности работы, M6502Core был добавлен в Nintendulator:
https://github.com/ogamespec/nintendulator/blob/master/doc/ReadmeBreaks.md
Все тесты nestest.nes проходят успешно.
Примечание: при первом запуске симулятор создает большой файл pla.bin, для оптимизации симуляции декодера. Все последующие запуски происходят быстрее.
Breaks Debugger 1.6
- Added support for unit testing
- Fixed bus multiplexing (SB/DB, SB/ADH commands)
- Fixed emulation of Branch instructions (BR T3)
- Fixed ALU emulation
Almost all fixes are in lower part, except fixing dodgy BR3 circuit:
Now all 6502 instructions are executed (TestAll.asm).
We can consider it as final release.
Many thanks to the Visual6502 project for allowing to compare the work of the circuits.
EDIT: Uploaded a fixed version to run unit tests.
Breakasm 1.1
Breakasm
As simple and dumb assembler as possible, to generate code.
To run:
Breakasm test.asm test.prg
PRG file is always 64 Kbytes (the size of 6502 address space). The current assembly pointer (ORG
) can be set anywhere in the PRG.
Syntax
The source text is split into lines of the following format:
[LABEL:] COMMAND [OPERAND1, OPERAND2, OPERAND3] ; Comments
The label (LABEL
) is optional. The command (COMMAND
) contains 6502 instruction or one of the assebmler directives. The operands depend on the command.
Embedded Directives
Directive | Description |
---|---|
ORG | Set the current PRG assembly position. |
DEFINE | Define a simple constant |
BYTE | Output a byte or string |
WORD | Output uint16_t in little-endian order. You can use both numbers as well as labels and addresses. |
END | Finish the assembling |
PROCESSOR | Defines type of processor for informational purposes |
Example Source Code
Not to write too much, I will just show you an example of the source code. Do it the same way and it should work.
; Test program
LABEL1:
PROCESSOR 6502
; ORG $100
DEFINE KONST #5
LDX KONST
AGAIN:
NOP
LDA SOMEDATA, X ; Load some data
JSR ADDSOME ; Call sub
STA $12, X
CLC
BCC AGAIN ; Test branch logic
ADDSOME: ; Test ALU
ADC KONST
PHP ; Test flags in/out
PLP
RTS
ASL A
SOMEDATA:
BYTE 12, $FF, "Hello, world"
WORD AGAIN
END
Limitations
- Maximum number of labels: 1024
- Maximum number of XREFs: 1024
- Maximum number of Defines: 1024
If you need more, you need to override the values in ASM.h
.