![](/media/cache/profiles/251bd0442dfcc53b5a761e050f8022b8.50x50_q85.jpg)
6502 emulator for Commodore 64 ROMs, serial terminal edition for MBED. Recommend terminal echo on, line edit on, caps lock, 115200bps, implicit carriage return on newline, currently non-buffered so don't paste lots of stuff
More details at:
[https://github.com/davervw] [https://techwithdave.davevw.com/2020/03/simple-emu-c64.html]
main.cpp@7:f49fa56672d8, 2020-04-13 (annotated)
- Committer:
- davervw
- Date:
- Mon Apr 13 05:13:26 2020 +0000
- Revision:
- 7:f49fa56672d8
- Parent:
- 4:0461c100cbbb
- Child:
- 8:519febdce8db
Update program description and version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
davervw | 0:90de1cbc8a5f | 1 | // c-simple-emu-cbm.cs - main() |
davervw | 0:90de1cbc8a5f | 2 | // |
davervw | 0:90de1cbc8a5f | 3 | //////////////////////////////////////////////////////////////////////////////// |
davervw | 0:90de1cbc8a5f | 4 | // |
davervw | 0:90de1cbc8a5f | 5 | // c-simple-emu-cbm (C Portable Version) |
davervw | 7:f49fa56672d8 | 6 | // C64/6502 Emulator for Terminal Console |
davervw | 0:90de1cbc8a5f | 7 | // |
davervw | 0:90de1cbc8a5f | 8 | // MIT License |
davervw | 0:90de1cbc8a5f | 9 | // |
davervw | 7:f49fa56672d8 | 10 | // Copyright(c) 2020 by David R. Van Wagner |
davervw | 0:90de1cbc8a5f | 11 | // davevw.com |
davervw | 0:90de1cbc8a5f | 12 | // |
davervw | 0:90de1cbc8a5f | 13 | // Permission is hereby granted, free of charge, to any person obtaining a copy |
davervw | 0:90de1cbc8a5f | 14 | // of this software and associated documentation files (the "Software"), to deal |
davervw | 0:90de1cbc8a5f | 15 | // in the Software without restriction, including without limitation the rights |
davervw | 0:90de1cbc8a5f | 16 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
davervw | 0:90de1cbc8a5f | 17 | // copies of the Software, and to permit persons to whom the Software is |
davervw | 0:90de1cbc8a5f | 18 | // furnished to do so, subject to the following conditions: |
davervw | 0:90de1cbc8a5f | 19 | // |
davervw | 0:90de1cbc8a5f | 20 | // The above copyright notice and this permission notice shall be included in all |
davervw | 0:90de1cbc8a5f | 21 | // copies or substantial portions of the Software. |
davervw | 0:90de1cbc8a5f | 22 | // |
davervw | 0:90de1cbc8a5f | 23 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
davervw | 0:90de1cbc8a5f | 24 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
davervw | 0:90de1cbc8a5f | 25 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE |
davervw | 0:90de1cbc8a5f | 26 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
davervw | 0:90de1cbc8a5f | 27 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
davervw | 0:90de1cbc8a5f | 28 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
davervw | 0:90de1cbc8a5f | 29 | // SOFTWARE. |
davervw | 0:90de1cbc8a5f | 30 | // |
davervw | 0:90de1cbc8a5f | 31 | //////////////////////////////////////////////////////////////////////////////// |
davervw | 0:90de1cbc8a5f | 32 | |
davervw | 0:90de1cbc8a5f | 33 | #include <mbed.h> |
davervw | 0:90de1cbc8a5f | 34 | #include "cbmconsole.h" |
davervw | 0:90de1cbc8a5f | 35 | #include "emuc64.h" |
davervw | 0:90de1cbc8a5f | 36 | #include "emu6502.h" |
davervw | 0:90de1cbc8a5f | 37 | |
davervw | 0:90de1cbc8a5f | 38 | Serial pc(USBTX, USBRX, 115200); |
davervw | 0:90de1cbc8a5f | 39 | |
davervw | 0:90de1cbc8a5f | 40 | int main(/*int argc, char* argv[]*/) |
davervw | 0:90de1cbc8a5f | 41 | { |
davervw | 0:90de1cbc8a5f | 42 | pc.printf("\n"); |
davervw | 7:f49fa56672d8 | 43 | pc.printf("c-simple-emu-cbm version 1.5\n"); |
davervw | 0:90de1cbc8a5f | 44 | pc.printf("Copyright (c) 2020 by David R. Van Wagner\n"); |
davervw | 0:90de1cbc8a5f | 45 | pc.printf("MIT License\n"); |
davervw | 0:90de1cbc8a5f | 46 | pc.printf("github.com/davervw\n"); |
davervw | 0:90de1cbc8a5f | 47 | pc.printf("\n"); |
davervw | 1:256d8a124b55 | 48 | //StartupPRG = "/local/guess2.prg"; |
davervw | 0:90de1cbc8a5f | 49 | C64_Init("/local/basic", "/local/kernal"); |
davervw | 0:90de1cbc8a5f | 50 | ResetRun(ExecutePatch); |
davervw | 0:90de1cbc8a5f | 51 | return 0; |
davervw | 0:90de1cbc8a5f | 52 | } |