Jump to content
IGNORED

a800winplus question


bf2k+

Recommended Posts

Some things don't work properly in the emulator so a program can test for such conditions:

 

. Pokey Timers are only scanline exact, not cycle exact.

. POT (paddle) registers count up by cycle on a real machine in fast scan mode - they don't do so on the emulator.

 

 

So, a short bit of code should be enough to determine the running environment.

Link to comment
Share on other sites

OK - short program. Only tested on Version 4.1 but should work on others.

 

EMUTEST.zip

 

(LISTed program, ENTER "H:EMUTEST.BAS")

 

The routine should return a value of 228 in the emulator, 134 on the real machine.

 

It sets the paddles to fast scan mode, then waits for a VBI to execute then waits several scanlines.

Then it starts a Pot Scan and waits one scanline plus a few extra cycles.

 

It could easily be written more efficiently - actually would do better without the NOPs then you could just have a BPL which would branch if running on a real machine.

 

0600: 68		PLA
0601: A9 40	 LDA #$40
0603: 8D 0E D4  STA $D40E  ;NMIEN
0606: AD 32 02  LDA $0232  ;SSKCTL
0609: 09 04	 ORA #$04
060B: 8D 32 02  STA $0232  ;SSKCTL
060E: 8D 0F D2  STA $D20F  ;SKCTL - enable Fast Pot Scan mode
0611: A5 14	 LDA $14	;RTCLOK+2
0613: C5 14	 CMP $14	;RTCLOK+2
0615: F0 FC	 BEQ $0613 ;  Wait for a VBI to complete
0617: 8D 0A D4  STA $D40A  ;WSYNC
061A: 8D 0A D4  STA $D40A  ;WSYNC
061D: 8D 0A D4  STA $D40A  ;WSYNC
0620: 8D 0A D4  STA $D40A  ;WSYNC
0623: 8D 0A D4  STA $D40A  ;WSYNC - wait a few more scanlines
0626: 8D 0B D2  STA $D20B  ;POTGO - start another Pot Scan
0629: 8D 0A D4  STA $D40A  ;WSYNC
062C: EA		NOP
062D: EA		NOP
062E: EA		NOP
062F: EA		NOP
0630: EA		NOP
0631: EA		NOP
0632: EA		NOP
0633: EA		NOP
0634: EA		NOP
0635: EA		NOP
0636: EA		NOP; wait some more 
0637: AD 07 D2  LDA $D207  ;POT7
063A: 85 D4	 STA $D4	;FR0
063C: A9 00	 LDA #$00
063E: 85 D5	 STA $D5	;FR0+1
0640: 60		RTS

Link to comment
Share on other sites

I don't think so.

 

There's been a couple of "requests" threads over the last 2-3 years where we've thrown around ideas of what we'd like in it.

 

It's my emu of choice despite the shortcomings. Just a few more features like stretchable window and more accurate Pokey emulation and it would be near enough to the best emulator for any system.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...