Skip to content

PadInput sample that doesn't work yet #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

jonathanpeppers
Copy link
Owner

No description provided.

Comment on lines +459 to +460
C900
F015
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't right, I think F015 should be a bit lower.

But this log message is generally right:

    Reading forward until IL_002c...

The IL looks like:

image

@kant2002
Copy link
Contributor

FYI, this is required to make F# Hello world working, since

while true do
   ()

produces

// loop start (head: IL_003a)
IL_003a: ldc.i4.1
IL_003b: brtrue.s IL_003a
// end loop
IL_003d: ret

@kant2002
Copy link
Contributor

Hello World in F#

open NES
open NES.NESLib

NESLib.pal_col(0uy,0x02uy)  // set screen to dark blue
NESLib.pal_col(1uy,0x14uy) // fuchsia
NESLib.pal_col(2uy,0x20uy) // grey
NESLib.pal_col(3uy,0x30uy) // white

// write text to name table
NESLib.vram_adr(NESLib.NTADR_A(2uy, 2uy))    // set address
NESLib.vram_write "HELLO, WORLD!" // write bytes to video RAM

// enable PPU rendering (turn on screen)
NESLib.ppu_on_all()

// infinite loop
while true do
  ()

@jonathanpeppers
Copy link
Owner Author

Yeah if F# is close to working, let me make a sample for it and make sure CI will test it! Maybe I’ll have some time in the next few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants