Cannot bootload Atmega1284p, verification error, first mismatch at byte 0x0000

Continuously getting the following:

verification error, first mismatch at byte 0x0000 0xfc != 0xfe

and the like:

verification error, first mismatch at byte 0x0000 0xfe != 0xd6
mismatch at byte 0x0000 0x00 != 0xd6
verification error, first mismatch at byte 0x1fc00 0x00 != 0x01

when trying to bootload standalone Atmega 1284 P (PU) by using Arduino ISP and Mightycore arduino core.

Tried different arduinos, different chips, usb cables and so on, all in vain.

The strange thing is that the program does not even recognize the Atmega1284 signature from time to time, it reads different signatures than it expects. When it gets the correct signature, it returns the above errors. This is different than the error that is the subject of this topic, but I just mentioned it now thinking they might be related somehow.

Other settings :
Clock : 8 Mhz external
Compiler LTO disabled (default)
BOD : 1.8 and 2.7 (tried both)

Full Arduino IDE message :

          System wide configuration file is "C:\Users\lenox\Documents\Arduino\hardware\MightyCore-master\avr/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega1284P
         Chip Erase delay              : 55000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    10   128    0 no       4096    8      0  9000  9000 0xff 0xff
           flash         65    10   256    0 yes    131072  256    512  4500  4500 0xff 0xff
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9705 (probably m1284p)
avrdude: erasing chip
avrdude: reading input file "0x3f"
avrdude: writing lock (1 bytes):

Error while burning bootloader.
Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3f:
avrdude: load data lock data from input file 0x3f:
avrdude: input file 0x3f contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0xfe"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xfe:
avrdude: load data efuse data from input file 0xfe:
avrdude: input file 0xfe contains 1 bytes
avrdude: reading on-chip efuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0xd6"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xd6:
avrdude: load data hfuse data from input file 0xd6:
avrdude: input file 0xd6 contains 1 bytes
avrdude: reading on-chip hfuse data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0xac != 0xd6
avrdude: verification error; content mismatch

avrdude done.  Thank you.

Uh, the output you posted does not contain the error message you describe.

Also, what version of the Arduino IDE?

Finally, when posting verbose output, often the most useful line is the one right before the part you posted, that shows the avrdude command that the IDE is invoking. Please include it.

Sorry, didn't realize that the message was truncated. Now I corrected, and the error message is visible.

I use Arduino IDE 1.8.5

Problem solved. Have not noticed this in the Arduino ISP :

// Uncomment following line to use the old Uno style wiring
// (using pin 11, 12 and 13 instead of the SPI header) on Leonardo, Due...

//#define USE_OLD_STYLE_WIRING

Naturally, I was using the so-called old-style as shown on the arduino site.