Git Product home page Git Product logo

blastforth's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

blastforth's Issues

Issue running on target hardware

Generated ROM image for your Hello World example runs in many emulators, but not on a real Genesis stackup (at least, not with code loaded via a MEGA EVERDRIVE PRO which is how I test).
It also does not run in REGEN v0.97d if you set that emulator to flag illegal memory accesses (in regen.ini set EmulateLockups=1
).
I have debugged it far enough to tell that some code is reading from uninitialized memory (perhaps a variable or a value?) and then using that as a destination to write to.
Code in system/finalize.fs preloads all of RAM with 0xdeadce11, so the bad write is to that address.
Since I don't have time tonight to run this to ground, a hacky work-around is to change the sentinel value from 0xdeadce11 to 0xff8000, which is at least legal to write to and the code can proceed onward.
Here is the relevant code snippet from finalize.fs for the work-around:
\ clear System RAM and CPU registers
\ WAS:
\ rp clear, $deadce11 # d1 move, d2 64 kilobytes cell/ for d1 rpush, loop
\ CHANGED TO
rp clear, $ff8000 # d1 move, d2 64 kilobytes cell/ for d1 rpush, loop

  1. Posting in case this helps someone else, plus since you are more familiar with the code you may come up with a fix quickly
  2. I have been porting this to the Genesis, in case you are curious: https://github.com/RickCarlino/Cosmic-Conquest-1982
  3. I'll also take this opportunity to say NICE WORK!
    Kevin Banks

Something like a MAP file would be super helpful

This is an awesome project, and I am having a lot of fun playing around with it.
However, as a Forth dabbler I am finding it very hard to debug issues like the previous one I filed.
Using tools like Regen (debugger build) it is not too hard to tell what memory address is at fault, but then it is hard to map that back to the original word in the *.fs file.
It would be great if the cross-compilation output included a MAP file telling the ROM addresses of the various words and the RAM addresses of the variables and values.

For variables and values, modifying word buffer: like in the following code snippet (I have not verified I am outputting the correct RAM addresses) shows the general idea, but so far I have not been able to pull off the same trick for ROM addresses.

(snippet from system/forth.fs, new code shown in bold)
( ---------------------------------------------------------------------------- )
( Memory Buffers )
( ---------------------------------------------------------------------------- )
create domem& asm tos push, -1 # tos move, [dfa] tos h move, next
{ : buffer: ( u "name" -- ) host-only
save-input bl parse type space ramspace @ hex. cr restore-input drop
create domem& codefield, +ramspace> h, does> ; }

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.