Search found 17 matches

by melanokardios
Thu Jan 11, 2018 12:24 pm
Forum: SNESdev
Topic: Subroutines in LoRom/Mode 20, Address Decoding
Replies: 2
Views: 2435

Re: Subroutines in LoRom/Mode 20, Address Decoding

lidnariq wrote:With ld65, you really have to structure your LoROM application as a series of 32 KiB slices. Look at tepples's lorom template
Very helpful, thanks!
by melanokardios
Thu Jan 11, 2018 12:12 pm
Forum: SNESdev
Topic: SNES Memory Map Without Adress Decoder?
Replies: 7
Views: 5163

Re: SNES Memory Map Without Adress Decoder?

lidnariq wrote: The /ROMSEL signal on the card edge is literally just "low if ((A22 high or A15 high) and (A23-A17 not equal to 0x7E))". That's the closest thing you get to "the SNES's "native" memory map".
That sounds interesting, where did you get that Information?
by melanokardios
Thu Jan 11, 2018 12:01 pm
Forum: SNESdev
Topic: Subroutines in LoRom/Mode 20, Address Decoding
Replies: 2
Views: 2435

Subroutines in LoRom/Mode 20, Address Decoding

I'm confused about how the PC is loaded if I do a JML or JSL. If I understand the mapping correctly, it means that SNES Address ROM Address $00:8000 $00:0000 $01:8000 $00:8000 $02:8000 $01:0000 . . . And so on. How do absolute long jumps then work? Let's say I tell my assembler to place my reset rou...
by melanokardios
Fri Oct 20, 2017 5:41 pm
Forum: SNESdev
Topic: Question about the SNES reset vector
Replies: 5
Views: 2811

Re: Question about the SNES reset vector

Reset Vector (00FFDH, 00FFCH) 00fffd, you forgot an f. Also, this is actually at position 007ffc-d of the ROM, due to the way ROMs are always loaded to 8000-ffff in the memory map. (At least for LoROM) how does the SNES know how to map/mirror $00:$7FFC to $FF:$FFFC? This is my very dumb answer. One...
by melanokardios
Fri Oct 20, 2017 5:03 pm
Forum: SNESdev
Topic: Question about the SNES reset vector
Replies: 5
Views: 2811

Re: Question about the SNES reset vector

Thank you for your quick reply! I just found a document showing that the SNES will on reset "Jump to the address indicated by Reset Vector (00FFDH, 00FFCH)". Now off to some joypad input and movement :)
by melanokardios
Fri Oct 20, 2017 4:37 pm
Forum: SNESdev
Topic: Question about the SNES reset vector
Replies: 5
Views: 2811

Question about the SNES reset vector

I'm wondering how the SNES finds the reset vector in my ROM file. I understand that the 65816 processor looks at the last 16 bytes for the reset, NMI, IRQ, etc. addresses(both for emulation and native mode). I have written a little program, that will load some sprite data into VRAM, set some registe...
by melanokardios
Tue May 02, 2017 2:32 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

Yes, I can see that now. I know, this wouldn't work on real hardware, but I thought a emulator would give me enough leeway that I could get away with some quick&dirty code(NES emulators seem to be more forgiving in that regard). let's see if I get finally get a sprite displayed tonight. NMI/VBla...
by melanokardios
Tue May 02, 2017 1:24 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

Busy weekend, but today I had some time to code again. And, of course, I ran into a problem again. Here's another weird behavior: whenever I load my ROM into bsnes emulator, at first it won't work(the Properties viewer will show that some of my initial DMA register settings are off, therefore no pro...
by melanokardios
Thu Apr 27, 2017 1:23 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

It makes me wonder if ca65 is confused by the lower half of the byte you're passing through rep; you don't need to set it to 8. No, that wasn't a problem, it was really switching into native mode after setting the status bits. But so far I am moving along fine, I managed to load CG RAM with my pale...
by melanokardios
Thu Apr 27, 2017 12:08 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

I found one of the reasons why my code wouldn't work: I set the A, X and Y registers to 16 bits ( rep #$38 ) before setting the processor to native mode ( clc followed by xce ). Therefore all following opcodes were translated wrongly(with 8 bit registers) as I found out with a help of a disassembler...
by melanokardios
Wed Apr 26, 2017 4:19 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

That format advice is a good one. I was really wondering why there is no "meta header" like they use for NES ROMs for emulators - which are removed if you burn it into a chip to use on a actual NES. Fun, but you need the proper tools like a ROM burner(which I luckely own).
by melanokardios
Wed Apr 26, 2017 4:02 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

Wow, thank you! I never used .smart before, since it is my first 65816 code. A quick look up in the ca65 doc tells me I probably need to study the registers/architecture of the 65816 better - my guess right now is, I'm not using Data Bank and Program Bank registers properly. That would also explain ...
by melanokardios
Wed Apr 26, 2017 3:46 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

nicklausw wrote:Another thing, your header has the title set to 18 bytes instead of 21. Fixing this made a red screen come up, not sure why that's happening but it's better than what was showing up before.
A red screen is what I want! I changed my header, but it still won't work, what emulator do you use?
by melanokardios
Wed Apr 26, 2017 3:24 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

Another problem I see is that you use jsr to call your init code, but that's where you set up the stack, so rts won't return you back where you were, because the stack pointer is no longer pointing at the address you need to return to. You should probably jmp to the init code, and jmp back instead....
by melanokardios
Wed Apr 26, 2017 2:59 pm
Forum: SNESdev
Topic: SNES programming beginner needs code review
Replies: 24
Views: 7403

Re: SNES programming beginner needs code review

Nicole wrote:I notice that your init code already turns off forced blanking. That might be interfering with your writes to $2122, since they're probably not happening during Vblank/Hblank.
True, I moved it to NMI/VBlank, to no avail. Still a black screen.