detect sei ;hermit's PAL/NTSC/etc detector... bit $d011 bpl *-3 ;wait for upper screen region above rasterline $100 - lda $d012 cmp $d012 ;wait for 1 rasterline (no matter what CPU speed it is :) beq *-3 bit $d011 ;check if we reached 0..$ff raster-region again bmi - sta max_rasterline_low_byte ;the Accumulator here contains the last rasterline that was before $100 ...
detect sei ;hermit's PAL/NTSC/etc detector... bit $d011 bpl *-3 ;wait for upper screen region above rasterline $100 - lda $d012 cmp $d012 ;wait for 1 rasterline (no matter what CPU speed it is :) beq *-3 bit $d011 ;check if we reached 0..$ff raster-region again bmi - sta max_rasterline_low_byte ;the Accumulator here contains the last rasterline that was before $100 ... ;the resulted values in Accu.: PAL/Drean:$37, NTSC:6, old NTSC:5 Maybe something like this has been coded already. This way I'll be able to detect some more types and still free up some memo (unless this code turns out to be unreliable)...
l1 lda $d012 l2 cmp $d012 beq l2 bmi l1
coder 1 dont know what coder 2 does, bugs appear, planless development with "great" ideas.
Now it supports NTSC since yesterday to a great degree in the editor... The PAL/NTSC detection (in commonsubs.inc) was based on Ninja's code